[Csnd] krate udo recursion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] krate udo recursion

jhearon
Hi,
I cannot seem to get krate recursion going in a UDO and is segfaulting on Csound 6.10 .  I'm wondering if I'm going about it the wrong way?  Seems like irate, and arate recursion are working using this approach.  Also krate without recursion seems to work too.

Thanks for any suggestions.
Regards,
Jim

<CsoundSynthesizer>
<CsOptions>
csound -s -d -+rtaudio=ALSA -odevaudio -b1024 -B16384  
</CsOptions>
<CsInstruments>

sr = 22050 ;ksmps = sr/kr
kr = 1
0dbfs = 1
nchnls    = 2

        opcode Recursion_kRate, k, k
k1 xin
k2 = 5
 if (k1 < k2) kgoto One
    kgoto Two
One:
kcall  Recursion_kRate k1 + 1 ;recursion
Two:
printks2 "*k1*: %f\n", k1
   xout kcall
       endop

    instr 1 ;call krate UDO
kout Recursion_kRate 1
printks2 "--kout-- %f\n", kout
    endin

</CsInstruments>
<CsScore>
i 1 0 3 ;krate UDO
</CsScore>
</CsoundSynthesizer>

Csound mailing list [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] krate udo recursion

Victor Lazzarini-2
I never tried this type of recursion. Usually we set up the recursive structure at i-time and then at perf-time the signal gets routed through it. If you look at the examples in the manual, or in the book, that is how it is done.

Not sure what you want to achieve with this,
but I suspect it won’t work in the way you are trying to write it.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 Feb 2018, at 18:51, James Hearon <[hidden email]> wrote:

Hi,
I cannot seem to get krate recursion going in a UDO and is segfaulting on Csound 6.10 .  I'm wondering if I'm going about it the wrong way?  Seems like irate, and arate recursion are working using this approach.  Also krate without recursion seems to work too.

Thanks for any suggestions.
Regards,
Jim

<CsoundSynthesizer>
<CsOptions>
csound -s -d -+rtaudio=ALSA -odevaudio -b1024 -B16384  
</CsOptions>
<CsInstruments>

sr = 22050 ;ksmps = sr/kr
kr = 1
0dbfs = 1
nchnls    = 2

        opcode Recursion_kRate, k, k
k1 xin
k2 = 5
 if (k1 < k2) kgoto One
    kgoto Two
One:
kcall  Recursion_kRate k1 + 1 ;recursion
Two:
printks2 "*k1*: %f\n", k1
   xout kcall
       endop

    instr 1 ;call krate UDO
kout Recursion_kRate 1
printks2 "--kout-- %f\n", kout
    endin

</CsInstruments>
<CsScore>
i 1 0 3 ;krate UDO
</CsScore>
</CsoundSynthesizer>

Csound mailing list [hidden email] 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
Csound mailing list [hidden email] 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