Csound Csound-dev Csound-tekno Search About

[Cs-dev] a-rate channels

Date2013-08-30 05:35
FromAlex Weiss
Subject[Cs-dev] a-rate channels
AttachmentsNone  None  
Hi list

I remember a discussion here a while back about channel mechanisms in the cs6 API and potential changes to them. So I was wondering what the current state is and if there are recommended best practices.

Specifically, what I'm trying to do is to route a-rate signals out of csound for external processing, then send the processed signals back to csound for further processing in the same k-cycle. I was looking at the chn* family of opcodes to accomplish this -- is this encouraged or is there a better way?

Thanks,
Alex

Date2013-08-31 03:36
FromSteven Yi
SubjectRe: [Cs-dev] a-rate channels
Hi Alex,

Doing csound->host->csound arbitrarily within a k-cycle seems like
something that would be very good to have a standard way to do it.  My
initial thought is of an older idea I had of a host opcode, one that
hosts would use that could insert into a CSD. Csound could call the
opcode like any other, and the opcode would be configured to call into
the host.  So something like:

aout host "someCallbackName", aval, kval, ival ...

and when creating a Csound instance, the host could do things like:

csoundSetHostCallback("someCallback1", functionPointer, hostData);
csoundSetHostCallback("someCallback2", functionPointer, hostData);
csoundSetHostCallback("someCallback3", functionPointer, hostData);

and registered functions would get called something like:

outData = functionPointer(hostData, inData);

where inData and outData may be of the same type of struct, one that
holds values from/to csound.

I don't know if that would work well, or maybe if it's just better for
the host to create their own opcodes and use the existing Csound
registration functions for registering opcodes.

Thoughts?
steven

On Fri, Aug 30, 2013 at 12:35 AM, Alex Weiss  wrote:
> Hi list
>
> I remember a discussion here a while back about channel mechanisms in the
> cs6 API and potential changes to them. So I was wondering what the current
> state is and if there are recommended best practices.
>
> Specifically, what I'm trying to do is to route a-rate signals out of csound
> for external processing, then send the processed signals back to csound for
> further processing in the same k-cycle. I was looking at the chn* family of
> opcodes to accomplish this -- is this encouraged or is there a better way?
>
> Thanks,
> Alex
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-31 06:31
FromAlex Weiss
SubjectRe: [Cs-dev] a-rate channels
AttachmentsNone  None  
Hi Steven,

Funny -- your approach is quite literally exactly what I had in mind (except I was going to use numbers instead of names). I do think that this would be a very valuable addition to the API as it makes integration with other synthesis systems and plug-in architectures a lot easier.

Alex


On Fri, Aug 30, 2013 at 7:36 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Alex,

Doing csound->host->csound arbitrarily within a k-cycle seems like
something that would be very good to have a standard way to do it.  My
initial thought is of an older idea I had of a host opcode, one that
hosts would use that could insert into a CSD. Csound could call the
opcode like any other, and the opcode would be configured to call into
the host.  So something like:

aout host "someCallbackName", aval, kval, ival ...

and when creating a Csound instance, the host could do things like:

csoundSetHostCallback("someCallback1", functionPointer, hostData);
csoundSetHostCallback("someCallback2", functionPointer, hostData);
csoundSetHostCallback("someCallback3", functionPointer, hostData);

and registered functions would get called something like:

outData = functionPointer(hostData, inData);

where inData and outData may be of the same type of struct, one that
holds values from/to csound.

I don't know if that would work well, or maybe if it's just better for
the host to create their own opcodes and use the existing Csound
registration functions for registering opcodes.

Thoughts?
steven

On Fri, Aug 30, 2013 at 12:35 AM, Alex Weiss <alexweiss86@gmail.com> wrote:
> Hi list
>
> I remember a discussion here a while back about channel mechanisms in the
> cs6 API and potential changes to them. So I was wondering what the current
> state is and if there are recommended best practices.
>
> Specifically, what I'm trying to do is to route a-rate signals out of csound
> for external processing, then send the processed signals back to csound for
> further processing in the same k-cycle. I was looking at the chn* family of
> opcodes to accomplish this -- is this encouraged or is there a better way?
>
> Thanks,
> Alex
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-31 15:44
FromAndres Cabrera
SubjectRe: [Cs-dev] a-rate channels
AttachmentsNone  None  
Or maybe just add more types to the invalue/outvalue opcodes? They are already callback based.

Cheers,
Andrés


On Fri, Aug 30, 2013 at 10:31 PM, Alex Weiss <alexweiss86@gmail.com> wrote:
Hi Steven,

Funny -- your approach is quite literally exactly what I had in mind (except I was going to use numbers instead of names). I do think that this would be a very valuable addition to the API as it makes integration with other synthesis systems and plug-in architectures a lot easier.

Alex



On Fri, Aug 30, 2013 at 7:36 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Alex,

Doing csound->host->csound arbitrarily within a k-cycle seems like
something that would be very good to have a standard way to do it.  My
initial thought is of an older idea I had of a host opcode, one that
hosts would use that could insert into a CSD. Csound could call the
opcode like any other, and the opcode would be configured to call into
the host.  So something like:

aout host "someCallbackName", aval, kval, ival ...

and when creating a Csound instance, the host could do things like:

csoundSetHostCallback("someCallback1", functionPointer, hostData);
csoundSetHostCallback("someCallback2", functionPointer, hostData);
csoundSetHostCallback("someCallback3", functionPointer, hostData);

and registered functions would get called something like:

outData = functionPointer(hostData, inData);

where inData and outData may be of the same type of struct, one that
holds values from/to csound.

I don't know if that would work well, or maybe if it's just better for
the host to create their own opcodes and use the existing Csound
registration functions for registering opcodes.

Thoughts?
steven

On Fri, Aug 30, 2013 at 12:35 AM, Alex Weiss <alexweiss86@gmail.com> wrote:
> Hi list
>
> I remember a discussion here a while back about channel mechanisms in the
> cs6 API and potential changes to them. So I was wondering what the current
> state is and if there are recommended best practices.
>
> Specifically, what I'm trying to do is to route a-rate signals out of csound
> for external processing, then send the processed signals back to csound for
> further processing in the same k-cycle. I was looking at the chn* family of
> opcodes to accomplish this -- is this encouraged or is there a better way?
>
> Thanks,
> Alex
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-31 16:32
FromAlex Weiss
SubjectRe: [Cs-dev] a-rate channels
AttachmentsNone  None  

The problem with that approach is that it is non-blocking, so round-tripping in the same k-cycle might get tricky.

On Aug 31, 2013 7:45 AM, "Andres Cabrera" <mantaraya36@gmail.com> wrote:
Or maybe just add more types to the invalue/outvalue opcodes? They are already callback based.

Cheers,
Andrés


On Fri, Aug 30, 2013 at 10:31 PM, Alex Weiss <alexweiss86@gmail.com> wrote:
Hi Steven,

Funny -- your approach is quite literally exactly what I had in mind (except I was going to use numbers instead of names). I do think that this would be a very valuable addition to the API as it makes integration with other synthesis systems and plug-in architectures a lot easier.

Alex



On Fri, Aug 30, 2013 at 7:36 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Alex,

Doing csound->host->csound arbitrarily within a k-cycle seems like
something that would be very good to have a standard way to do it.  My
initial thought is of an older idea I had of a host opcode, one that
hosts would use that could insert into a CSD. Csound could call the
opcode like any other, and the opcode would be configured to call into
the host.  So something like:

aout host "someCallbackName", aval, kval, ival ...

and when creating a Csound instance, the host could do things like:

csoundSetHostCallback("someCallback1", functionPointer, hostData);
csoundSetHostCallback("someCallback2", functionPointer, hostData);
csoundSetHostCallback("someCallback3", functionPointer, hostData);

and registered functions would get called something like:

outData = functionPointer(hostData, inData);

where inData and outData may be of the same type of struct, one that
holds values from/to csound.

I don't know if that would work well, or maybe if it's just better for
the host to create their own opcodes and use the existing Csound
registration functions for registering opcodes.

Thoughts?
steven

On Fri, Aug 30, 2013 at 12:35 AM, Alex Weiss <alexweiss86@gmail.com> wrote:
> Hi list
>
> I remember a discussion here a while back about channel mechanisms in the
> cs6 API and potential changes to them. So I was wondering what the current
> state is and if there are recommended best practices.
>
> Specifically, what I'm trying to do is to route a-rate signals out of csound
> for external processing, then send the processed signals back to csound for
> further processing in the same k-cycle. I was looking at the chn* family of
> opcodes to accomplish this -- is this encouraged or is there a better way?
>
> Thanks,
> Alex
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-31 17:44
FromAndres Cabrera
SubjectRe: [Cs-dev] a-rate channels
AttachmentsNone  None  
The invalue and outvalue opcodes are blocking. The opcode will not return until the callback function has returned.

Cheers,
Andrés


On Sat, Aug 31, 2013 at 8:32 AM, Alex Weiss <alexweiss86@gmail.com> wrote:

The problem with that approach is that it is non-blocking, so round-tripping in the same k-cycle might get tricky.

On Aug 31, 2013 7:45 AM, "Andres Cabrera" <mantaraya36@gmail.com> wrote:
Or maybe just add more types to the invalue/outvalue opcodes? They are already callback based.

Cheers,
Andrés


On Fri, Aug 30, 2013 at 10:31 PM, Alex Weiss <alexweiss86@gmail.com> wrote:
Hi Steven,

Funny -- your approach is quite literally exactly what I had in mind (except I was going to use numbers instead of names). I do think that this would be a very valuable addition to the API as it makes integration with other synthesis systems and plug-in architectures a lot easier.

Alex



On Fri, Aug 30, 2013 at 7:36 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Alex,

Doing csound->host->csound arbitrarily within a k-cycle seems like
something that would be very good to have a standard way to do it.  My
initial thought is of an older idea I had of a host opcode, one that
hosts would use that could insert into a CSD. Csound could call the
opcode like any other, and the opcode would be configured to call into
the host.  So something like:

aout host "someCallbackName", aval, kval, ival ...

and when creating a Csound instance, the host could do things like:

csoundSetHostCallback("someCallback1", functionPointer, hostData);
csoundSetHostCallback("someCallback2", functionPointer, hostData);
csoundSetHostCallback("someCallback3", functionPointer, hostData);

and registered functions would get called something like:

outData = functionPointer(hostData, inData);

where inData and outData may be of the same type of struct, one that
holds values from/to csound.

I don't know if that would work well, or maybe if it's just better for
the host to create their own opcodes and use the existing Csound
registration functions for registering opcodes.

Thoughts?
steven

On Fri, Aug 30, 2013 at 12:35 AM, Alex Weiss <alexweiss86@gmail.com> wrote:
> Hi list
>
> I remember a discussion here a while back about channel mechanisms in the
> cs6 API and potential changes to them. So I was wondering what the current
> state is and if there are recommended best practices.
>
> Specifically, what I'm trying to do is to route a-rate signals out of csound
> for external processing, then send the processed signals back to csound for
> further processing in the same k-cycle. I was looking at the chn* family of
> opcodes to accomplish this -- is this encouraged or is there a better way?
>
> Thanks,
> Alex
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel