Shop OBEX P1 Docs P2 Docs Learn Events
MIDI in LSB is static 1 — Parallax Forums

MIDI in LSB is static 1

symbotersymboter Posts: 3
edited 2008-05-24 12:30 in Propeller 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

Comments

  • PyrotomPyrotom Posts: 84
    edited 2008-05-23 19:54
    Are you using the MIDI in object version 1.0 or 1.1?? The 1.0 version has some bugs
  • symbotersymboter Posts: 3
    edited 2008-05-23 23:24
    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
  • symbotersymboter Posts: 3
    edited 2008-05-24 12:30
    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
Sign In or Register to comment.