Csound Csound-dev Csound-tekno Search About

[Cs-dev] csoundScoreEvent question in the java api

Date2012-07-22 06:00
FromDavid M
Subject[Cs-dev] csoundScoreEvent question in the java api
Hello,
I have a question regarding the Csound API for Java. I was trying the final
example in this article:

http://www.csounds.com/articles/RoryWalsh_CsoundAPI.pdf

I wanted to try out the function: 

PUBLIC int csoundScoreEvent(CSOUND *, char type, const MYFLT  *pFields, long
numFields);

with the java csound api, which is:

public int ScoreEvent(char paramChar, SWIGTYPE_p_double
paramSWIGTYPE_p_double, int paramInt)

In the example mentioned in the article the array of doubles is passed to
the function but in the Java version you can only use as a parameter a
SWIGTYPE_p_double therefore you can’t “send” an array of doubles or at least
that’s what I think since you are not really using a pointer.

Is there a way to use this function in Java?






--
View this message in context: http://csound.1045644.n5.nabble.com/csoundScoreEvent-question-in-the-java-api-tp5714368.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourc

Date2012-07-23 14:53
FromSteven Yi
SubjectRe: [Cs-dev] csoundScoreEvent question in the java api
Hi David,

I'm not sure if there is a way to use it.  You can manipulate MYFLT*
(or Swigtype_p_double) from Java using a CsoundMYFLTArray, but that
only wraps an existing MYFLT*. There's a MyfltVector class generated
that comes from the CsoundCPP source file, but I don't see any way to
use that either.

I usually send score as text to Csound using csound.InputMessage().
Have you tried using that?

steven

On Sun, Jul 22, 2012 at 1:00 AM, David M  wrote:
> Hello,
> I have a question regarding the Csound API for Java. I was trying the final
> example in this article:
>
> http://www.csounds.com/articles/RoryWalsh_CsoundAPI.pdf
>
> I wanted to try out the function:
>
> PUBLIC int csoundScoreEvent(CSOUND *, char type, const MYFLT  *pFields, long
> numFields);
>
> with the java csound api, which is:
>
> public int ScoreEvent(char paramChar, SWIGTYPE_p_double
> paramSWIGTYPE_p_double, int paramInt)
>
> In the example mentioned in the article the array of doubles is passed to
> the function but in the Java version you can only use as a parameter a
> SWIGTYPE_p_double therefore you can’t “send” an array of doubles or at least
> that’s what I think since you are not really using a pointer.
>
> Is there a way to use this function in Java?
>
>
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csoundScoreEvent-question-in-the-java-api-tp5714368.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-07-23 15:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundScoreEvent question in the java api
Would it not be easier to use csoundInputMessage()?

Victor
On 23 Jul 2012, at 14:53, Steven Yi wrote:

> Hi David,
> 
> I'm not sure if there is a way to use it.  You can manipulate MYFLT*
> (or Swigtype_p_double) from Java using a CsoundMYFLTArray, but that
> only wraps an existing MYFLT*. There's a MyfltVector class generated
> that comes from the CsoundCPP source file, but I don't see any way to
> use that either.
> 
> I usually send score as text to Csound using csound.InputMessage().
> Have you tried using that?
> 
> steven
> 
> On Sun, Jul 22, 2012 at 1:00 AM, David M  wrote:
>> Hello,
>> I have a question regarding the Csound API for Java. I was trying the final
>> example in this article:
>> 
>> http://www.csounds.com/articles/RoryWalsh_CsoundAPI.pdf
>> 
>> I wanted to try out the function:
>> 
>> PUBLIC int csoundScoreEvent(CSOUND *, char type, const MYFLT  *pFields, long
>> numFields);
>> 
>> with the java csound api, which is:
>> 
>> public int ScoreEvent(char paramChar, SWIGTYPE_p_double
>> paramSWIGTYPE_p_double, int paramInt)
>> 
>> In the example mentioned in the article the array of doubles is passed to
>> the function but in the Java version you can only use as a parameter a
>> SWIGTYPE_p_double therefore you can’t “send” an array of doubles or at least
>> that’s what I think since you are not really using a pointer.
>> 
>> Is there a way to use this function in Java?
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/csoundScoreEvent-question-in-the-java-api-tp5714368.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net