[Csnd] Problems accessing chn via the Csound Java API
| Date | 2010-08-05 16:23 |
| From | Jacob Joaquin |
| Subject | [Csnd] Problems accessing chn via the Csound Java API |
Hi everybody!
I'm trying to pass data to a chn bus using the Csound Java API, and
failing miserably. Everything I'm doing in terms of communicating with
chn is based off of Jim Hearon's examples from his Csound Journal
article "Processing and csnd.jar."
(http://www.csounds.com/journal/issue11/Processing.html) It's been a
big help. Though unfortunately, his examples no longer run and I've
been unable to find working examples elsewhere on the net.
Using his examples, I've found the code that seems to be causing the
problem. The following conditional returns the error "Invalid memory
access of location 0x0 eip=0x42018a53":
if (csnd.csoundGetChannelPtr(mycsound, myptr, "pitch", mycontch |
myinputch) == 0) { /* ... */ }
If anyone could either help in updating his examples, or point me to
other working examples, that would be much appreciated.
Best,
Jake |
| Date | 2010-08-05 16:47 |
| From | Victor Lazzarini |
| Subject | [Csnd] Re: Problems accessing chn via the Csound Java API |
Why don't you use the GetChannel() method of the Csound class?
cs = new Csound()
...
pitch = cs.GetChannel("pitch")
On 5 Aug 2010, at 16:23, Jacob Joaquin wrote:
> Hi everybody!
>
> I'm trying to pass data to a chn bus using the Csound Java API, and
> failing miserably. Everything I'm doing in terms of communicating with
> chn is based off of Jim Hearon's examples from his Csound Journal
> article "Processing and csnd.jar."
> (http://www.csounds.com/journal/issue11/Processing.html) It's been a
> big help. Though unfortunately, his examples no longer run and I've
> been unable to find working examples elsewhere on the net.
>
> Using his examples, I've found the code that seems to be causing the
> problem. The following conditional returns the error "Invalid memory
> access of location 0x0 eip=0x42018a53":
>
> if (csnd.csoundGetChannelPtr(mycsound, myptr, "pitch", mycontch |
> myinputch) == 0) { /* ... */ }
>
>
> If anyone could either help in updating his examples, or point me to
> other working examples, that would be much appreciated.
>
> Best,
> Jake
> --
> The Csound Blog - http://csound.noisepages.com/
> Slipmat - http://slipmat.noisepages.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"
>
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"
|
| Date | 2010-08-05 16:56 |
| From | Victor Lazzarini |
| Subject | [Csnd] Re: Problems accessing chn via the Csound Java API |
The problem with that code is that it does not seem right. It uses 2 csound instances, (CsoundInstance and mycsound) the first of which seems to be the operational one, which is compiled. The second is created using the C API wrapper (csoundCreate()), but is only used for the channel call, which fails probably because csound is not compiled. Just remove if (csnd.csoundGetChannelPtr(mycsound, myptr, "pitch", mycontch | myinputch) == 0) and you should be OK.If you want to use that if statement with the call to csoundGetChannelPtr(), then change the codemycsound = csnd.csoundCreate(myvoid);On 5 Aug 2010, at 16:23, Jacob Joaquin wrote:
|
| Date | 2010-08-05 16:56 |
| From | Jacob Joaquin |
| Subject | [Csnd] Re: Re: Problems accessing chn via the Csound Java API |
On Thu, Aug 5, 2010 at 8:47 AM, Victor Lazzarini |