Download Modified Roland PG1000

Transcript
DB 46H,40H
DB 1BH
DB 09H
DB 39H
$NEXT
:
;A<A+40
;C<A
;A<EAL
;(BC)<A
LDSTAT ( --- )
(Load current Byte1 to FFE1, last Midi status sent)
BYT1 FFE1 C!
;
:
TSTAT
( --- )
(Check last Midi status sent & send new one if not =)
BYT1 DUP FFE1 C@ =
IF DROP
ELSE TM LDSTAT
THEN
;
MIDI OPERATIONS
:
MCASE
CASE
( --- , Midi routines Case statement)
DUMMY KEYN KEYAT CNTRL PRG CHAT PWHL DUMMY
;
:
KEYN
(Midi routine for Key On and Key Off.
If the slider goes below the top of its travel and the
note is off (as indicated by FLAG=0) then send a MIDI Note
On message.
If ADC=0 and the note is on (indicated by FLAG=FF)
then send a Midi Note Off.)
ADCV 0 =
IF LDLAST FLAG
IF BYT1 TM LDSTAT BYT2 TM FLGOFF 0 TM
ELSE EXIT
THEN
ELSE
FLAG
IF
ELSE
(Midi Note Off)
EXIT
ADCV SLAST - 0<
IF BYT1 TM LDSTAT BYT2 TM FLGON
ADCV 2/ TM
THEN LDLAST
THEN
THEN
;
79
(Midi Note on)