Re: [Audacity-nyquist] Loop problem
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Roger D. <rb...@cs...> - 2010-01-12 17:31:29
|
XLISP has some stack and recursion limitations. SIMREP is a macro. I'm not sure what's going on, but 130 seems to be the right order of magnitude to be hitting some stack limits. You can write a loop that repeatedly sets a local variable holding a sound to the sum of the sound and another sound. This should accumulate sounds without growing the stack. -Roger paul beach wrote: > This instruction to create a sum of overtones will not loop more than n > = 130 times. I can't figure that out. > > (simrep ( i n) > (hzosc (+ (* i p) p) ) > ) > > > ;nyquist plug-in > ;version 1 > ;type generate > ;name "Heartbeat ..." > ;action "Overtones..." > ;control p "Fundamental" real "Frequency" 3.5 1 1000 > ;control n "number" int "overtones" 40 1 500 > ;control q "Quality" int "resonance" 2 1 50 > ;control bp "Bandpass Filter" int "center" 200 50 500 > > ; You can hear "muscle avalance" by putting your thumb in > ; your ear, (lightly) and clenching your fist. Put your palm > ; over the other ear to block out distractions. > > ;Realistic rythmn should be loud-soft-silence where loud = +6dB > > (scale 0.1 > (bandpass2 > (simrep ( i n) > (hzosc (+ (* i p) p) ) > ) > bp q) > ) > |