Csound Csound-dev Csound-tekno Search About

[Cs-dev] chnget....

Date2006-05-13 09:52
FromRory Walsh
Subject[Cs-dev] chnget....
I having been experimenting further with the API and was wondering if 
there is anyway I can use chnget outside the scope of an instrument for 
initialisation purposes? I have some controls in a GUI instrument that I 
would like to use to set up my instrument, for example set the sampling 
rate. Is there any way I can do this? Cheers.

Rory.




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-05-16 16:39
FromIstvan Varga
SubjectRe: [Cs-dev] chnget....
AttachmentsNone  

Date2006-05-16 16:49
FromIstvan Varga
SubjectRe: [Cs-dev] chnget....
AttachmentsNone  

Date2006-05-16 18:39
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] chnget....
There is no substantial reason why sr etc should be a constant; it
could be an expression that yields a constant like the expressions in
the C preprocessor.  Not sure that the need has been established for
the effort to implement this though.
==John ffitch
>>>>> "Istvan" == Istvan Varga  writes:

 Istvan> Setting the sample rate, or the other reserved symbols that are
 Istvan> normally set in the orchestra header (kr, ksmps, nchnls, and 0dbfs),
 Istvan> to a non-constant value is trickier because those settings are already
 Istvan> assumed to be known by the time any orchestra code is executed (for
 Istvan> example, memory for instruments and the global variables is allocated
 Istvan> based on the value of ksmps because it determines the amount of space
 Istvan> required by an a-rate variable). Therefore, sr etc. are parsed and set
 Istvan> in a special way (not by executing the = opcode as usual) before
 Istvan> running the orchestra header, and are required to be constants.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-05-16 18:55
FromRory Walsh
SubjectRe: [Cs-dev] chnget....
In my host api I send out a message on the channel "pitch" just after 
csoundCompile(). This message is caught within the instrument like this:

;works...
instr 1
ivalue chnget "pitch"
print ivalue
endin

but not when I do this:

;does not work....
givalue chnget "pitch"
instr 1
print givalue
endin

I don't want to set the value as there is already a value there on that 
channel. Do you see what I mean? I know that this won't help with the SR 
problem but it would be nice all the same. Of course I can just have one 
instrument that passes my GUI controls initialisation values to global 
variables but it would be nice to it similar to the example at the top.

Rory.





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net