Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] chani,chano

Date2005-11-05 13:52
FromVictor Lazzarini
SubjectRe: [Cs-dev] chani,chano
I'd say its better if we add the functions, as I
don't think it's a good idea for host apps to be
accessing the CSOUND struct directly. What do we
need to agree exactly? I thought these were just
simple control channels. Can't we have Set/Get
functions for them?

Victor


>
> Victor Lazzarini wrote:
>
> >  What is the API function that gives access to
> > chani, chano. I can only see  (in csound.h) the
> > 'chn'-opcode related functions (as well as the
> > invalue, outvalue). Do we access it with the
> > same function as the chn opcodes, using integers
> > as channel names?
>
> No, there are no functions for chani/chano yet. These
> opcodes use the following members of the CSOUND structure:
>
>      int           nchanik, nchania, nchanok, nchanoa;
>      MYFLT         *chanik, *chania, *chanok, *chanoa;
>
> this is somewhat similar to ZAK, although I am not sure if
> the nchanik, nchania, etc. are the size of the
> corresponding array, or the maximum possible index
> (Opcodes/bus.c seems to be buggy, as it mixes the above
> two possible interpretations, resulting in invalid memory
> accesses). To make it possible to access this bus from a
> host application, new API functions need to be added. This
> should be easy once there is agreement on the name, syntax
> , and expected behavior of the new functions.
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo
> App Server. Download it for free - -and be entered to win
> a 42" plasma tv or your very own Sony(tm)PSP.  Click here
> to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-11-05 14:11
FromIstvan Varga
SubjectRe: [Cs-dev] chani,chano
Victor Lazzarini wrote:

> I'd say its better if we add the functions, as I
> don't think it's a good idea for host apps to be
> accessing the CSOUND struct directly. What do we
> need to agree exactly? I thought these were just
> simple control channels. Can't we have Set/Get
> functions for them?

There are also audio channels. In addition, should the
set/get functions automatically extend the arrays like
the opcodes (in this case perhaps the opcodes could just
call the API functions) ?


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-11-06 20:44
FromIstvan Varga
SubjectRe: [Cs-dev] chani,chano
Victor Lazzarini wrote:

> I'd say its better if we add the functions, as I
> don't think it's a good idea for host apps to be
> accessing the CSOUND struct directly. What do we
> need to agree exactly? I thought these were just
> simple control channels. Can't we have Set/Get
> functions for them?

I have these functions in my (not yet committed) sources. Are the
function names OK ? I think there may be some confusion with the
named channels.

PUBLIC int csoundSetControlInputChannel(CSOUND *, MYFLT value, int n);
PUBLIC int csoundGetControlOutputChannel(CSOUND *, MYFLT *value, int n);
PUBLIC int csoundSetAudioInputChannel(CSOUND *, const MYFLT *value, int n);
PUBLIC int csoundGetAudioOutputChannel(CSOUND *, MYFLT *value, int n);


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-11-06 23:10
FromSteven Yi
SubjectRe: [Cs-dev] chani,chano
AttachmentsNone  

Date2005-11-07 13:48
FromIstvan Varga
SubjectRe: [Cs-dev] chani,chano
I have now committed the new functions:

PUBLIC int csoundChanIKSet(CSOUND *, MYFLT value, int n);
PUBLIC int csoundChanOKGet(CSOUND *, MYFLT *value, int n);
PUBLIC int csoundChanIASet(CSOUND *, const MYFLT *value, int n);
PUBLIC int csoundChanOAGet(CSOUND *, MYFLT *value, int n);

The functions are also available in the CSOUND structure, and
the following C++ wrappers were added to csound.hpp:

int Csound::ChanIKSet(MYFLT value, int n);
int Csound::ChanOKGet(MYFLT &value, int n);
int Csound::ChanIASet(const MYFLT *value, int n);
int Csound::ChanOAGet(MYFLT *value, int n);

Note: make sure to delete the files Opcodes/bus.os and libbus.so
(or whatever their equivalents are on your platform), otherwise
they would conflict with the new code.


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-11-07 13:57
FromVictor Lazzarini
SubjectRe: [Cs-dev] chani,chano
Thanks, Istvan.

Victor
At 13:48 07/11/2005, you wrote:
>I have now committed the new functions:
>
>PUBLIC int csoundChanIKSet(CSOUND *, MYFLT value, int n);
>PUBLIC int csoundChanOKGet(CSOUND *, MYFLT *value, int n);
>PUBLIC int csoundChanIASet(CSOUND *, const MYFLT *value, int n);
>PUBLIC int csoundChanOAGet(CSOUND *, MYFLT *value, int n);
>
>The functions are also available in the CSOUND structure, and
>the following C++ wrappers were added to csound.hpp:
>
>int Csound::ChanIKSet(MYFLT value, int n);
>int Csound::ChanOKGet(MYFLT &value, int n);
>int Csound::ChanIASet(const MYFLT *value, int n);
>int Csound::ChanOAGet(MYFLT *value, int n);
>
>Note: make sure to delete the files Opcodes/bus.os and libbus.so
>(or whatever their equivalents are on your platform), otherwise
>they would conflict with the new code.
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by:
>Tame your development challenges with Apache's Geronimo App Server. Download
>it for free - -and be entered to win a 42" plasma tv or your very own
>Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net