Csound Csound-dev Csound-tekno Search About

[Csnd] csoundScoreEvent question in the java api

Date2012-07-30 21:26
FromDavid M
Subject[Csnd] csoundScoreEvent question in the java api
I'm re-posting this. I didn't get any responses when I posted this for the
first time about 2 weeks ago.


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-tp5714544.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2012-07-30 21:35
FromVictor
SubjectRe: [Csnd] csoundScoreEvent question in the java api
What is the signature in Java of csoundInputMessage()?  It does the same thing, but it might be easier to use.



On 30 Jul 2012, at 21:26, David M  wrote:

> I'm re-posting this. I didn't get any responses when I posted this for the
> first time about 2 weeks ago.
> 
> 
> 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-tp5714544.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 


Date2012-07-30 21:48
FromDavid M
Subject[Csnd] Re: csoundScoreEvent question in the java api
In the java csound api that function looks like this

public void InputMessage(String paramString)

So you mean you could send an i-statement using that function? It does seem
easier.





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

Date2012-07-30 21:53
FromVictor
SubjectRe: [Csnd] Re: csoundScoreEvent question in the java api
Exactly. You can send as many score events as you would like in a single call, separated by newlines.

Victor
On 30 Jul 2012, at 21:48, David M  wrote:

> In the java csound api that function looks like this
> 
> public void InputMessage(String paramString)
> 
> So you mean you could send an i-statement using that function? It does seem
> easier.
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csoundScoreEvent-question-in-the-java-api-tp5714544p5714546.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 


Date2012-07-30 21:55
FromDavid M
Subject[Csnd] Re: csoundScoreEvent question in the java api
I will try it out.

Thanks a lot !!!



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