Hi all,
I’m trying to figure out how global k-rate variables work for a larger project. For the purposes of clarity, I’ve isolated the technique over here. I want to try and use gk variables to control ADSR data across multiple instruments. A global linseg doesn’t seem to work.
I’m trying this approach, but it doesn’t seem very intuitive to me. Can anyone correct/suggest something?
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1
gklinseg init 0
;gklinseg linseg 0, 30, 440
instr 1
gklinseg = gklinseg+0.1
aoscil oscil 1.0, gklinseg
outs aoscil, aoscil
endin 
</CsInstruments>
<CsScore>
f   1         0       4096	10	 1
i1  0   5
i1  8   5
i1  0   5
i1  16   5
</CsScore>
</CsoundSynthesizer>
        

      
    
