[Csnd] how to know the rate of an input variable from within a Csound UDO
Date | 2018-07-07 00:07 |
From | Oscar Pablo Di Liscia |
Subject | [Csnd] how to know the rate of an input variable from within a Csound UDO |
Dear list: I'm probably asking something stupid, but is there a way to know the rate of an input variable from within a Csound UDO? This is asked in order to improve the performance of an opcode without doing an i-rate version of it. I mean: opcode anything, a, ak aIn, aOut, kParam xin ;try to find whether kParam is an k or i rate variable if(kParam is an i-rate variable) then ("do something") else ("do a different thing") endif xout aOut endop Thanks in advance. Dr. Oscar Pablo Di Liscia Profesor Titular Director Programa de Investigación "Sistemas Temporales y Síntesis Espacial de Sonido en el Arte Sonoro"Escuela Universitaria de Artes Universidad Nacional de Quilmes |
Date | 2018-07-07 02:11 |
From | thorin kerr |
Subject | Re: [Csnd] how to know the rate of an input variable from within a Csound UDO |
Not a great solution, but a krate input will always be 0 at init time, whereas an irate input will keep its value. Thorin On Sat, 7 Jul. 2018, 9:08 am Oscar Pablo Di Liscia, <oscarpablodiliscia@gmail.com> wrote:
|
Date | 2018-07-07 02:23 |
From | thorin kerr |
Subject | Re: [Csnd] how to know the rate of an input variable from within a Csound UDO |
Or... haven't checked this mind... If you write two UDO's with the same name, except one with krate input, and the other with irate, then Csound will choose the UDO based on the input. I think. T On Sat, 7 Jul. 2018, 11:11 am thorin kerr, <thorin.kerr@gmail.com> wrote:
|
Date | 2018-07-07 12:23 |
From | Victor Lazzarini |
Subject | Re: [Csnd] how to know the rate of an input variable from within a Csound UDO |
Hi Oscar,
this is not possible in the way you describe. Normally this is done by overloading the opcode (i.e. writing different versions for
different inputs, but using the same opcode name).
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2018-07-07 16:10 |
From | Oscar Pablo Di Liscia |
Subject | Re: [Csnd] how to know the rate of an input variable from within a Csound UDO |
Many thanks Victor, that was my "b plan", i appreciate very much to know for sure that is the right way. Best El sábado, 7 de julio de 2018, Victor Lazzarini <Victor.Lazzarini@mu.ie> escribió:
-- Dr. Oscar Pablo Di Liscia Profesor Titular Director Programa de Investigación "Sistemas Temporales y Síntesis Espacial de Sonido en el Arte Sonoro"Escuela Universitaria de Artes Universidad Nacional de QuilmesCsound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-07 16:12 |
From | Oscar Pablo Di Liscia |
Subject | Re: [Csnd] how to know the rate of an input variable from within a Csound UDO |
Many thanks for these hints also, Thorin. Best El viernes, 6 de julio de 2018, thorin kerr <thorin.kerr@gmail.com> escribió:
-- Dr. Oscar Pablo Di Liscia Profesor Titular Director Programa de Investigación "Sistemas Temporales y Síntesis Espacial de Sonido en el Arte Sonoro"Escuela Universitaria de Artes Universidad Nacional de QuilmesCsound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-07-07 16:59 |
From | Victor Lazzarini |
Subject | Re: [Csnd] how to know the rate of an input variable from within a Csound UDO |
yes, that’s what I meant by ‘overloaded’. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|