Csound Csound-dev Csound-tekno Search About

[Csnd] New opcodes, api & communication between csound & host?

Date2009-12-18 22:25
From"audio.video.atmosphere"
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.

Date2009-12-18 23:19
Fromvictor
Subject[Csnd] Re: New opcodes, api & communication between csound & host?
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"

Date2009-12-19 10:28
FromAndres Cabrera
Subject[Csnd] Re: Re: New opcodes, api & communication between csound & host?
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"

Date2009-12-20 20:18
From"audio.video.atmosphere"
Subject[Csnd] Re: Re: New opcodes, api & communication between csound & host?
stage lighting(DMX) has 512 channels, thats a lot of chsets to deal with

i really need something more that chget/set's

Date2009-12-20 23:15
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: New opcodes, api & communication between csound & host?
Tables? You can get/set values on tables.

Victor
On 20 Dec 2009, at 20:18, audio.video.atmosphere wrote:

>
> stage lighting(DMX) has 512 channels, thats a lot of chsets to deal  
> with
>
> i really need something more that chget/set's
> -- 
> View this message in context: http://old.nabble.com/New-opcodes%2C-api---communication-between-csound---host--tp26836073p26866923.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"