PDA

View Full Version : MIDI in LSB is static 1



symboter
05-23-2008, 11:54 PM
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

Pyrotom
05-24-2008, 02:54 AM
Are you using the MIDI in object version 1.0 or 1.1?? The 1.0 version has some bugs

symboter
05-24-2008, 06:24 AM
Thank you Pyrotom for the hint. Can someone remove the V1.0 please. I got that version :-(
I will try the V1.1 and see if problem disappears, persists or changes,
thank you
symboter

symboter
05-24-2008, 07:30 PM
Well, I downloaded V1.1 and this solved a bit (or better a byte...) of the problem.
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