-m128
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
//now we call an instrument for each element of the array
instr ArrayIntro
;create the array
iArray[] fillarray 10, 20, 30, 40, 50
;index starts at zero
index = 0
;for each element of the array ...
while index < lenarray(iArray) do
;... get the element ...
iValue = iArray[index]
;... abd send this element to another instrument (as p4)
schedule "CalledInstrument", 0, 1, iValue
;increment index
index += 1
od
endin
instr CalledInstrument
;just print what you received as p4
iReceivedValue = p4
print iReceivedValue
endin
i "ArrayIntro" 0 1
100100320240true255255255