I have problem with the instrument 1 runs all the midi tracks and the other instruments run nothing. I tried to assign to instruments and midi channels it did not change anything. Instr 1 and channel 1 runs all the music other channels and instruments was useless
This is the picture of midi channels.
This is the code that I used.
form caption("Untitled") size(400, 300), guiMode("queue"), pluginId("def1") keyboard bounds(8, 158, 381, 95) -n -d -a -F a5.mid --midi-key-cps=4 --midi-velocity-amp=5 ; Initialize the global variables. ksmps = 32 nchnls = 2 0dbfs = 1;instrument will be triggered by keyboard widget
instr 3idel = 0.5
knum = p3
kfreq line p4, p3, 440
asig shaker p5, p4, 8, 0.999, knumadp delayr 1/100 // not used, sets max delay time (20 Hz min fo)
aks deltap3 idel // exact delay
delayw asig + (aks + delay1(aks))*0.1 // LP in feedback loop
outs aks, aksendin
instr 1
ktotamp init p5
kamp1 init .5
kcps1 init 5
kamp2 init .4
kcps2 init 3.5
kamp3 init .5
kcps3 init 4.5
kj2 jitter2 ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3
kEnv madsr .1, .2, .6, .4
aOut vco2 p5+kj2, p4
aOut dcblock aOut
outs aOutkEnv, aOutkEnv
endininstr 2
kEnv madsr .1, .2, .6, .4
aOut vco2 p5, p4
outs aOutkEnv, aOutkEnv
endininstr 5
idel = 0.5
knum = p3
kfreq line p4, p3, 440
asig shaker p5, p4, 8, 0.999, knumadp delayr 1/100 // not used, sets max delay time (20 Hz min fo)
aks deltap3 idel // exact delay
delayw asig + (aks + delay1(aks))*0.1 // LP in feedback loop
outs aks, aksendin
;causes Csound to run for about 7000 years... f0 z