| Or if you need a callback based mechanism (csound using a callback
function to update values), you can use the invalue/outvalue opcodes
and their corresponding API functions.
Cheers,
Andrés
On Fri, Dec 18, 2009 at 11:19 PM, victor wrote:
> Unless you are doing some extra processing in your opcode, then you don't
> need to write a new opcode at all. All you need is to use the software bus.
> You will use the 'chn' opcodes (eg. chnset, chnget) to send/get data to/from
> your host. The API call is
> csoundGetChannelPtr() and you can use control or audio rate signals. Look in
> csound.h for the reference documentation on this function.
>
> If you are doing some processing that is not done by any of the 1000+
> opcodes, then your opcode can produce control (or audio) signals that you
> can plug into chnset to send to your application. This is the recommended
> way of communicating with the host.
>
> Victor
>
>
> ----- Original Message ----- From: "audio.video.atmosphere"
>
> To:
> Sent: Friday, December 18, 2009 10:25 PM
> Subject: [Csnd] New opcodes, api & communication between csound & host?
>
>
>>
>> Hi, im creating a new application for audio, video & atmosphere stage
>> lighting using csound for the scripting and audio.
>> If i create new plugins for opcodes then how can i communicatate between
>> these opcode plugins and my host application.
>>
>> For instance I create a new opcode called "movex", i wish this opcode to
>> move an image within my video application. or for example another opcode
>> like "lighton" to change the level of a stage light.
>>
>> i need a way to comminicate between the plugins and my c++ host
>> application.
>>
>> any ideas?
>>
>> Im loading csound within my c++ application with:
>>
>> csound = csoundCreate(this);
>> const char *argv[] = {"csound", "synth.csd"};
>> csoundCompile(csound, 2, (char **)argv);
>>
>> am i right in using something like shared memory or Semaphores for example
>> this example here :
>> http://www.codeproject.com/KB/threads/multithreadedsignalingcpp.aspx
>> or am i looking completly in the wrong direction and theres something
>> included with csound to do the job?
>>
>> any advice please.
>> Thanks.
>>
>> --
>> View this message in context:
>> http://old.nabble.com/New-opcodes%2C-api---communication-between-csound---host--tp26836073p26836073.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
--
Andrés
Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |