home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 October
/
PCWorld_2006-10_cd.bin
/
audio-video
/
reaper
/
reaper105-install.exe
/
Effects
/
MIDI
/
arpeggiator_simple
next >
Wrap
Text File
|
2006-08-12
|
907b
|
57 lines
desc:simple MIDI arpeggiator
slider1:1<0.1,4>size (beats)
@init
status=0;
status2=128;
memset(status,-1,128);
memset(status2,0,128);
@slider
div=slider1;
@block
while (
midirecv(ts,msg1,msg23) ?
(
m=msg1&240;
note=msg23&127;
(m == 9*16 && msg23>=256) ? (
status[note]=0;
status2[note]=1;
midisend(ts,9*16,note+127*256); // send note on
) : (m == 8*16 || m == 9*16) ? (
status[note]=-1;
status2[note] ? (
midisend(ts,8*16,note); // send note off
status2[note]=0;
);
);
bla=1;
);
);
inc = samplesblock/srate*(tempo/60)*2/div;
x=0;
loop(128,
status[x]>=0.0 ?
(
status[x] += inc;
status[x] >= 1.0 ?
(
status[x] -= 1.0;
status2[x] ?
(status2[x]=0; midisend(0,8*16,x)) :
(status2[x]=1; midisend(0,9*16,x + 127*256))
);
);
x+=1;
);
@sample