MIDI in LSB is static 1
Hi all,
I did use the MIDI In routines from the Object Exchange and am encoutering a problem
when accessing Controller Data only
I am assigning a word variable
VAR
word event
start the midi processing with:
midi.start(3, doController) ' 3 is my MidiIn Pin
and read the event with:
event := midi.evtCheck
reading a word returns 2 identical bytes.
The byte has a LSB fixed to 1 so I get readouts
1
1
3
3
5
5
instead of 1 2 3 4 5
Range is ok 1-127
Also I cannot retreive the Midi Channel and Controller Number
Guess, I did something fundamentally wrong...
kind regards and thanks
symboter
I did use the MIDI In routines from the Object Exchange and am encoutering a problem
when accessing Controller Data only
I am assigning a word variable
VAR
word event
start the midi processing with:
midi.start(3, doController) ' 3 is my MidiIn Pin
and read the event with:
event := midi.evtCheck
reading a word returns 2 identical bytes.
The byte has a LSB fixed to 1 so I get readouts
1
1
3
3
5
5
instead of 1 2 3 4 5
Range is ok 1-127
Also I cannot retreive the Midi Channel and Controller Number
Guess, I did something fundamentally wrong...
kind regards and thanks
symboter
Comments
I will try the V1.1 and see if problem disappears, persists or changes,
thank you
symboter
After digging into the spin code of V1.1 I did discover a bug while handling the second byte in some commands,
I fixed it and uploaded V1.2 to the object exchange
The fixes:
Original Version (refers to note value in Controller, that is wrong)
cont_num mov controllerNumber,midiByte ' Save the controller number,
shl noteValue,#8 ' shifting for insertion into event;
mov nextDataHandler,#cont_val ' next byte should be a controller value
jmp #getMidiByte
Fixed:
replace "noteValue" by "controllerNumber"
do similar in:
pitch_wheel_hi
song_pos_ptr_hi
symboter