Quantcast

[Csnd] how works updateValuesFromCsound?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd] how works updateValuesFromCsound?

AndreaS
Hi list,

In a java file of Android studio, I would get a value from Csound to change an imageView. I can't receive k-rate (or i-rate) change.

This code:
float imageValue =  csoundObj.getCsound().GetChannel("setImage");

send always 0.

Do you give me a little snippet to receive a k-rate stream?

I tried also with "CsoundBinding interface Definition", updateValueFromCsound(), but I do know how to juggle.

All the best.

Andrea S.

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how works updateValuesFromCsound?

AndreaS
Hi to all,
I found only an example of updateValuesFromCsound, in WaveViewTestActivity (CsoundForAndroid project), but this test in my phone don't work. Can you help me, Steven?
Andrea S.
 
----- Original Message -----
Sent: Friday, May 05, 2017 1:17 PM
Subject: [Csnd] how works updateValuesFromCsound?

Hi list,

In a java file of Android studio, I would get a value from Csound to change an imageView. I can't receive k-rate (or i-rate) change.

This code:
float imageValue =  csoundObj.getCsound().GetChannel("setImage");

send always 0.

Do you give me a little snippet to receive a k-rate stream?

I tried also with "CsoundBinding interface Definition", updateValueFromCsound(), but I do know how to juggle.

All the best.

Andrea S.

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here



Avast logo

Questa e-mail รจ stata controllata per individuare virus con Avast antivirus.
www.avast.com


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how works updateValuesFromCsound?

Beppi
This post has NOT been accepted by the mailing list yet.
In reply to this post by AndreaS
I did this way:
first you have to create an array to share data with the library

CsoundMYFLTArray metroPtr[] = new CsoundMYFLTArray[1];

then this array must be binded

metroPtr[0] = csoundObj.getOutputChannelPtr("metro", controlChannelType.CSOUND_CONTROL_CHANNEL);

Finally, you'll get the values inside

public void updateValuesFromCsound() {
     int myValue = (int) metroPtr[0].GetValue(0);
}

And the .csd must send the data with this syntax:

chnset kindx, "metro"


I'm really not sure if this is the best way to do it, but it was taken from the multitouch example.
Loading...