Csound Csound-dev Csound-tekno Search About

[Csnd] difference between cs5 and cs6

Date2013-11-21 18:44
FromRory Walsh
Subject[Csnd] difference between cs5 and cs6
Attachmentsdeleteable.csd  
In Csound5 the instrument below get random values for kRand each time
it enters the if/then block (randh freq=sr). In Csound6 kRand never
changes value. It seems the further you set randh's frequency above kr
the less likely you will get random numbers, or at least the less
likely they are to change from one note to the next. Full csd file is
attached. I don't know why one would set the frequency of a control
rate opcode to SR, but I had it like that in an old instrument that I
dug up. I'm sure I meant to set it to KR at the time.

instr 1
kMetro metro 1
if(kMetro==1) then
;--In Cs6 this needs to go outside the if/then--
kRand randh 500, sr, 2
;-----------------------------------------------
event "i", 100, 1, .5, abs(kRand)+100
endif
endin

instr 100
a1 oscil .5, p4, 1
outs a1, a1
endin