Re: [Cs-dev] Channels
Date | 2009-02-05 22:06 |
From | Pinball |
Subject | Re: [Cs-dev] Channels |
Attachments | None None |
I don't think it's up to the "user" to handle the lock. res_type csoundSetParameter (param_name_type, param_value_type);The locking will be handled internally, like this... ... csoundSetParameter... { LOCK(); //... UNLOCK(); }SOME SAMPLE USAGE: 1) int ret = csoundSetParameter("delay", 20);or 2) #define PARAM_TYPE_VAL 1 #define PARAM_TYPE_REF 2 typedef struct _param { int type, MYFLT val, MYFLT *ref, int count } PARAM; PARAM param; param.type = PARAM_TYPE_VAL; param.val = 20; int ret = csoundSetParameter("delay", ¶m); View this message in context: Re: Channels Sent from the Csound - Dev mailing list archive at Nabble.com. |
Date | 2009-02-05 22:34 |
From | Fons Adriaensen |
Subject | Re: [Cs-dev] Channels |
Attachments | None |
Date | 2009-02-06 00:11 |
From | Pinball |
Subject | Re: [Cs-dev] Channels |
Fons Adriaensen-2 wrote: > > On Thu, Feb 05, 2009 at 02:02:43PM -0800, Pinball wrote: > > Which would mean a lot of back-to-back UNLOCK();LOCK() pairs > if a users want to modifiy not one but a set of parameters, > each pair potentially being two system calls. > For bulk operations you can pass data by the "ref" pointer. That's why i provided the PARAM_TYPE_REF option. The Orchestra code should be able to define the parameters contiguously. Ciao -- View this message in context: http://www.nabble.com/Channels-tp21852607p21864136.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2009-02-11 15:58 |
From | Pinball |
Subject | Re: [Cs-dev] Channels |
Attachments | None None |
Anyway since an api like csoundSetParameter
would be called while performing, i wouldn't
address the parameter by name, directly, like this:
int ret = csoundSetParameter("delay", 20);Resolving the name might take precious time. A resolution function, to be called before starting the performance, would be a solution. int param_index_delay = getParameterByName("Delay"); int param_index_gain = getParameterByName("Gain"); // start the performance // ... csoundSetParameter(param_index_delay, 20); csoundSetParameter(param_index_gain, 0.7);This assumes that, internally, there's an array of channel pointers. View this message in context: Re: Channels Sent from the Csound - Dev mailing list archive at Nabble.com. |