[Csnd] loop macro, doesn't work as expected
Date | 2013-03-16 20:26 |
From | Stefan Thomas |
Subject | [Csnd] loop macro, doesn't work as expected |
Dear community, I tried a loop macro, similar to what I found at http://csound.1045644.n5.nabble.com/repeating-sections-in-a-score-td1109342.html#a1109344 In the below quoted code I would expect to hear 4 times the notes c d e f, but after the 2nd time I hear a longer break, that I didn't expect. I have no idea what did cause this unexpected behaviour. Here is my code: <CsoundSynthesizer> <CsOptions> -odac -d </CsOptions> ; ============================================== <CsInstruments> sr = 44100 ksmps = 100 nchnls = 2 0dbfs = 1 gisine ftgen 0,0,2^10, 10, 1 instr 1 iatt = 0.01 idec = p3-iatt ifreq = cpspch(p4) iamp = p5 aenv linseg 0, iatt,1,idec,0 asig poscil iamp*aenv, ifreq, gisine outs asig, asig endin </CsInstruments> ; ========== ==================================== <CsScore> #define patI(T) # i1 [$T+0] 1 8.00 0.1 i1 [$T+1] 1 8.02 . i1 [$T+2] 1 8.04 . i1 [$T+3] 1 8.05 . # #define patx4I(T) # $patI($T) $patI($T+4) $patI($T+8) $patI($T+12) # $patx4I(0) </CsScore> </CsoundSynthesizer> |