Csound Csound-dev Csound-tekno Search About

[Cs-dev] software busses

Date2008-01-23 19:25
FromJonatan Liljedahl
Subject[Cs-dev] software busses
I think the many simultaneously existing ways of sending data to and
from csound is a bit confusing:

There's the chani and chano opcodes, and their family of API functions
like csoundChanOKGet(). these are numbered channels and not callback-based.

And then there's chnget and chnset, which uses the csoundGetChannelPtr()
API. these are named channels and not callback-based.

And then there's the API function csoundSetChannelIOCallback() which
states (in csound.h) to be called by the opcodes chnsend and chnrecv,
but those opcodes is not mentioned in the reference manual and I don't
know if they actually exists in csound (haven't tried). these are named
channels and callback-based.

And then there's outvalue and invalue, with API functions
csoundSetOutputValueCallback(), etc.. these are named channels and
callback-based.

So this is 4 different external software busses/channels? why?

And except these busses, one can also use the csoundGetSpin/Spout() API
functions for direct audio input/output.

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-23 19:38
FromRory Walsh
SubjectRe: [Cs-dev] software busses
I was talking to Victor and Matt about this recently. They know more 
than I but personally I have always used chnget and chnset because this 
gets Csound to set up all the buses so I don't have to set up and 
allocate channels in my host code. Matt on the other hand prefers to 
take care of channel management himself so he prefers to use the 
outvalue/invalue opcodes. I think Matt suggested a workable way to 
consolidate these two mechanisms on the list a few week back.

Rory.



Jonatan Liljedahl wrote:
> I think the many simultaneously existing ways of sending data to and
> from csound is a bit confusing:
> 
> There's the chani and chano opcodes, and their family of API functions
> like csoundChanOKGet(). these are numbered channels and not callback-based.
> 
> And then there's chnget and chnset, which uses the csoundGetChannelPtr()
> API. these are named channels and not callback-based.
> 
> And then there's the API function csoundSetChannelIOCallback() which
> states (in csound.h) to be called by the opcodes chnsend and chnrecv,
> but those opcodes is not mentioned in the reference manual and I don't
> know if they actually exists in csound (haven't tried). these are named
> channels and callback-based.
> 
> And then there's outvalue and invalue, with API functions
> csoundSetOutputValueCallback(), etc.. these are named channels and
> callback-based.
> 
> So this is 4 different external software busses/channels? why?
> 
> And except these busses, one can also use the csoundGetSpin/Spout() API
> functions for direct audio input/output.
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-23 19:51
FromJonatan Liljedahl
SubjectRe: [Cs-dev] software busses
Yes, I actually use both in my host. chnget and chnset because then I
can let the orchestra define channels like "pitch" or whatever and have
them show up automatically in my host UI. this is good because my host
can ask csound for the list of channels.

and I use outvalue to let each instrument instant be able to send data
(for plotting) to my host, and to identify themselves.. this is good
because csound just calls a callback in my host and the channel name
passed to this is just like an ID string, I need not keep track of it as
a "permanent" bus.

So, I see the point of keeping these two. but the other two?

Rory Walsh wrote:
> I was talking to Victor and Matt about this recently. They know more 
> than I but personally I have always used chnget and chnset because this 
> gets Csound to set up all the buses so I don't have to set up and 
> allocate channels in my host code. Matt on the other hand prefers to 
> take care of channel management himself so he prefers to use the 
> outvalue/invalue opcodes. I think Matt suggested a workable way to 
> consolidate these two mechanisms on the list a few week back.
> 
> Rory.
> 
> 
> 
> Jonatan Liljedahl wrote:
>> I think the many simultaneously existing ways of sending data to and
>> from csound is a bit confusing:
>>
>> There's the chani and chano opcodes, and their family of API functions
>> like csoundChanOKGet(). these are numbered channels and not callback-based.
>>
>> And then there's chnget and chnset, which uses the csoundGetChannelPtr()
>> API. these are named channels and not callback-based.
>>
>> And then there's the API function csoundSetChannelIOCallback() which
>> states (in csound.h) to be called by the opcodes chnsend and chnrecv,
>> but those opcodes is not mentioned in the reference manual and I don't
>> know if they actually exists in csound (haven't tried). these are named
>> channels and callback-based.
>>
>> And then there's outvalue and invalue, with API functions
>> csoundSetOutputValueCallback(), etc.. these are named channels and
>> callback-based.
>>
>> So this is 4 different external software busses/channels? why?
>>
>> And except these busses, one can also use the csoundGetSpin/Spout() API
>> functions for direct audio input/output.
>>
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-24 09:46
Fromjpff
SubjectRe: [Cs-dev] software busses
The software bus was originally conceived by Richard Dobson way back
before the software freeze.  As no one actually submitted code I wrote
the numbered bus commands in September 2004 as part of Csound5. Over a
year later another developer wrote the named versions without
discussions.  Personally I like numbers as they are easier to
manipulate, but whatever.
==John ffitch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-24 19:41
Frommatt ingalls
SubjectRe: [Cs-dev] software busses
AttachmentsNone  None  
well.. i hesitate to join in this discussion because i am still bitter about this... but since we are going of the history:

i added invalue/outvalue around 2000 or something like that -  it was in my original API, even before i merged with Michael's.  It looks like those functions were finally rolled into canonical in 2002.   ( BTW invalue/outvalue can use numbers OR strings for the channel name. )

It is a real shame that the invalue/outvalue system was just not added to (even after my multiple pleas and offer to add my host's code to handle the channel matrixing) and these 2 other "replacement" systems were added instead.  Istvan's system is almost identical to what i do with invalue/outvalue, except for the extra feature (confusion?) of bus direction and channel types.

===

ANYWAY,  it  bugs me that there are multiple ways to do the same thing and was recently ready to suggest to retire invalue/outvalue and only support the other channel bus stuff.    if CsoundChannelIOCallback_t does work, then we could probably have invalue/outvalue call that as well, which would then make invalue/outvalue work with Istvan's chn system, and we could call invalue/outvalue deprecated (but still be functional for the time being).  Host developers would only need to support Istvan's system, although i think implementing a CsoundChannelIOCallback_t should be strongly advised so that orcs could call the same channel multiple times in one k-pass.


-m


On Jan 24, 2008, at 1:46 AM, jpff wrote:

The software bus was originally conceived by Richard Dobson way back
before the software freeze.  As no one actually submitted code I wrote
the numbered bus commands in September 2004 as part of Csound5. Over a
year later another developer wrote the named versions without
discussions.  Personally I like numbers as they are easier to
manipulate, but whatever.
==John ffitch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel





Date2008-01-24 19:47
FromRory Walsh
SubjectRe: [Cs-dev] software busses
It would be nice to agree some kind of standard as more people are using 
the API now then ever. Having the system compatible would be a step in 
the right direction IMO, what do others think?


matt ingalls wrote:
> well.. i hesitate to join in this discussion because i am still bitter 
> about this... but since we are going of the history:
> 
> i added invalue/outvalue around 2000 or something like that -  it was in 
> my original API, even before i merged with Michael's.  It looks like 
> those functions were finally rolled into canonical in 2002.   ( BTW 
> invalue/outvalue can use numbers OR strings for the channel name. )
> 
> It is a real shame that the invalue/outvalue system was just not added 
> to (even after my multiple pleas and offer to add my host's code to 
> handle the channel matrixing) and these 2 other "replacement" systems 
> were added instead.  Istvan's system is almost identical to what i do 
> with invalue/outvalue, except for the extra feature (confusion?) of bus 
> direction and channel types.
> 
> ===
> 
> ANYWAY,  it  bugs me that there are multiple ways to do the same thing 
> and was recently ready to suggest to retire invalue/outvalue and only 
> support the other channel bus stuff. 
>    if CsoundChannelIOCallback_t does work, then we could probably have 
> invalue/outvalue call that as well, which would then make 
> invalue/outvalue work with Istvan's chn system, and we could call 
> invalue/outvalue deprecated (but still be functional for the time 
> being).  Host developers would only need to support Istvan's system, 
> although i think implementing a CsoundChannelIOCallback_t should be 
> strongly advised so that orcs could call the same channel multiple times 
> in one k-pass.
> 
> 
> -m
> 
> 
> On Jan 24, 2008, at 1:46 AM, jpff wrote:
> 
>> The software bus was originally conceived by Richard Dobson way back
>> before the software freeze.  As no one actually submitted code I wrote
>> the numbered bus commands in September 2004 as part of Csound5. Over a
>> year later another developer wrote the named versions without
>> discussions.  Personally I like numbers as they are easier to
>> manipulate, but whatever.
>> ==John ffitch
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
> 
> matt ingalls
> development@gvox.com 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-24 20:09
From"Dr. Richard Boulanger"
SubjectRe: [Cs-dev] software busses
AttachmentsNone  None  
I LOVE invalue/outvalue - and mostly use these for all the instruments that I and
my students design at Berklee.  Please don't remove them.

-dB

On Jan 24, 2008, at 2:41 PM, matt ingalls wrote:

well.. i hesitate to join in this discussion because i am still bitter about this... but since we are going of the history:

i added invalue/outvalue around 2000 or something like that -  it was in my original API, even before i merged with Michael's.  It looks like those functions were finally rolled into canonical in 2002.   ( BTW invalue/outvalue can use numbers OR strings for the channel name. )

It is a real shame that the invalue/outvalue system was just not added to (even after my multiple pleas and offer to add my host's code to handle the channel matrixing) and these 2 other "replacement" systems were added instead.  Istvan's system is almost identical to what i do with invalue/outvalue, except for the extra feature (confusion?) of bus direction and channel types.

===

ANYWAY,  it  bugs me that there are multiple ways to do the same thing and was recently ready to suggest to retire invalue/outvalue and only support the other channel bus stuff.    if CsoundChannelIOCallback_t does work, then we could probably have invalue/outvalue call that as well, which would then make invalue/outvalue work with Istvan's chn system, and we could call invalue/outvalue deprecated (but still be functional for the time being).  Host developers would only need to support Istvan's system, although i think implementing a CsoundChannelIOCallback_t should be strongly advised so that orcs could call the same channel multiple times in one k-pass.


-m


On Jan 24, 2008, at 1:46 AM, jpff wrote:

The software bus was originally conceived by Richard Dobson way back
before the software freeze.  As no one actually submitted code I wrote
the numbered bus commands in September 2004 as part of Csound5. Over a
year later another developer wrote the named versions without
discussions.  Personally I like numbers as they are easier to
manipulate, but whatever.
==John ffitch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Csound-devel mailing list