aUCBLogo Demos and Tests / testmidioutstream
to testmidioutstream
MidiOpen 0
comment [
s=Array 3
s.1=FloatArray [60 1000 127 62 1000 127 64 1000 127 65 1000 127]
s.2=FloatArray [64 1000 127 65 1000 127 67 1000 127]
s.3=FloatArray [67 1000 127 69 1000 127]
MidiOutStreams s
MidiOutStreamsStart
stop
]
;comment [
s=Array 3
s.1=FloatArray [60 500 127 62 500 127 64 1000 127 65 1000 127]
s.2=FloatArray [64 1000 127 65 1000 127 67 1000 127]
s.3=FloatArray [67 1000 127 69 1000 127]
MidiOutStreams s
MidiOutStreamsStart
stop
;]
comment [
MidiOutStream 0 [60 1000 127 62 1000 127 64 1000 127 65 1000 127] waitMS 300
MidiOutStream 1 [64 1000 127 65 1000 127 67 1000 127] waitMS 300
MidiOutStream 2 [67 1000 127 69 1000 127]
stop
sf=MidiOutStreamsFinished
osf=sf
print sf
overwriteMode
y=Cursor.2-1
while [MidiOutStreamsFinished < sf+3]
[ if MidiOutStreamsFinished != osf
[ osf=MidiOutStreamsFinished
setCursor list 0 y
type osf
]
]
insertMode
pr []
]
comment [
MidiProgramChange 0 16
MidiProgramChange 1 16
(MidiOutStream 0 (se
rSeq 0 100 100
rSeq 100 0 100) 10 127)
; (MidiOutStream 1 (sin rSeq 0 5*360 200)*40+60 10 127)
waitMS 2000
(MidiOutStream 0 (sin rSeq 0 3*360 200)*40+60 10 127)
]
comment [
melodynotes =[2 5 7 7 7 7 5 7 9 7 999 2 5 7 5 2 2 0 2 999 2 5 7 5 0 0 -2 0 2 0 999 2 5 7 5 0 0 -2 0 999]
melodyduration=[2 2 4 4 4 2 2 2 1 4 5 2 2 4 4 4 2 1 6 7 2 2 4 4 4 2 2 2 1 4 5 2 2 4 4 4 2 1 6 5]
bassnotes =[10 9 7 7 7 7 14 7 14 7 999 7 10 14 14 14 14 12 14 999 10 9 5 5 5 5 5 999 17 14 12 12 12 12 17 12 999]
bassduration=[ 2 2 4 4 4 2 2 2 1 4 5 2 2 4 4 4 2 1 6 7 2 2 8 8 2 1 4 5 2 2 4 4 4 2 1 6 5]
accord1notes=[1 0 0 0 0 0 0 0 0 0 999 0 1 0 0 0 0 1 0 999 1 0 4 4 4 4 4 999 1 0 1 1 1 1 1 1 999]+bassnotes
basenotes=se 999 rseq 0 0 124
baseduration=se 4 clone 7 [3 3 2 3 3 2]
snarenotes=se 999 rseq 0 0 50
snareduration=se 8 clone 7 [4.5 3.5 8]
agogonotes=rseq 0 0 63
agogoduration=2
MidiProgramChange 3 48
MidiProgramChange 4 119
MidiProgramChange 5 116
MidiProgramChange 6 118
(MidiOutStream 0 melodynotes+58 melodyduration*200 64)
(MidiOutStream 1 bassnotes+58-36 bassduration*200 64)
(MidiOutStream 2 accord1notes+58-36+12+3 bassduration*200 64)
(MidiOutStream 3 bassnotes+58-36+12+7 bassduration*200 64)
(MidiOutStream 4 agogonotes+58+7 agogoduration*200 64)
(MidiOutStream 5 basenotes+58-48+7 baseduration*200 127)
(MidiOutStream 6 snarenotes+58-36+7 snareduration*200 64)
MidiOutStreamsStart
; waitMS (0+melodyduration)*200+10
]
end