Reputation: 57
I've looked at the examples that come with Csound for android but I want to call it without using the UI widgets that all the examples seem to be about.
I know about how to load up an instrument but how do I ask it to play a note of a specified frequency?
Do I use sendscore?
Cheers.
Upvotes: 0
Views: 145
Reputation: 11
I am not sure about the Android API to Csound, but if there's a function called sendscore it sounds like the right one. You probably need to send a string like:
i 1 0 10
(This means turn on instrument 1 now (time=0) for 10 seconds) You may want to use more values if your instrument is set up for it (using what are called p-fields in Csound).
The C API functions for this are:
PUBLIC int csoundScoreEvent (CSOUND *, char type, const MYFLT *pFields, long numFields)
PUBLIC int csoundReadScore (CSOUND *csound, const char *str)
Check out:
http://csound.github.io/docs/api/group__CONTROLEVENTS.html http://csound.github.io/docs/api/group__SCOREHANDLING.html
Upvotes: 0