Yeah! Thank you! Believe it or not, I opened this mail to attach a simple example of a subtle but significant difference between looping linear and exponential envelopes:
<CsoundSynthesizer>
<CsOptions> </CsOptions>
<CsInstruments>
sr = 44100 kr = 44100 ksmps = 1 nchnls = 1 0dbfs = 1
instr 1 kcps = 208
asine1 oscil3 1, kcps, 1 ;ksig loopseg kfreq, ktrig, ktime0, kvalue0, t, v, t, v kloopseg1 loopseg kcps, 0, 0, 1, .25, .25, .25, 1, .5, 1 alimitPlus limit asine1, -1, kloopseg1
aenv1 expseg .00001, 1, .5, p3-2, .5, 1, .00001
aout = alimitPlus*aenv1 out aout
endin
instr 2 kcps = 208
asine1 oscil3 1, kcps, 1 kexp oscil3 1, kcps, 2 alimitPlus limit asine1, -1, kexp
aenv1 expseg .00001, 1, .5, p3-2, .5, 1, .00001
aout = alimitPlus*aenv1 out aout
endin
instr 3 kcps = 208
asine1 oscil3 1, kcps, 1 krate1 linseg 1, p3*.5, 12, p3*.5, 4 kmod oscil3 .3, krate1, 1 ;ksig loopseg kfreq, ktrig, ktime0, kvalue0, t, v, t, v kloopseg1 loopseg kcps, 0, 0, 1, .25+(kmod*.5), .5+kmod, .25+(kmod*.5), 1-kmod, .5, 1 alimitPlus limit asine1, -1, kloopseg1
aenv1 expseg .00001, 1, .5, p3-2, .5, 1, .00001
aout = alimitPlus*aenv1 out aout
endin
</CsInstruments>
<CsScore>
t 0 60
f 1 0 8388608 09 1 1 0 f 2 0 8388608 05 1 2097152 .25 2097152 1 4194304 1
i 1 0 6 i 2 6 6 i 3 12 6
e
</CsScore>
</CsoundSynthesizer>
Even in this example, where the difference between the two seems very minor, the huge potential of looping different shapes should be hinted at. Using transfer functions and other distortions, the angularity of indexing waveforms can result in significantly different end results, especially as far as bandwidth limiting and aliasing. And of course the great thing about loopx is that you have an easily modulatable and radically flexible event generator/oscillator.
Thanks again, whoo-hoo!
-Cameron Bobro |