Turning a micro computer system into MIDI device

For general discussion related FlowStone
strangeChild
Posts: 47
Joined: Sat Apr 27, 2013 8:04 pm

Re: Turning a micro computer system into MIDI device

Post by strangeChild »

Sorry... i didn't mean the code from above but the concept of passing the messages you don't want to filter or treat...

Code: Select all

def event i
  m = @midiInput.to_array
  if (m[0] == 144) || (m[0] == 128)
     output Midi.new m[0],m[1],m[2],m[3] if m[2]>@thresh1
  else
     output Midi.new m[0],m[1],m[2],m[3]
  end
end

If the status is 128 or 144 then apply the filter on the event... otherwise let it pass...

"output Midi.new m[0],m[1],m[2],m[3]" is the equivlent of "MIDI.send(type,d1,d2,channel)" in the Arduino/Teensy code.

FYI - on the green side but unrelated to your issue; you only need a trigger switch on the trigger stream... the MIDI split and event primitives can have their integer values connected directly and it will only be output when the trigger is allowed through by the (single) switch.
capture.png
capture.png (15.04 KiB) Viewed 5106 times
User avatar
kortezzzz
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Turning a micro computer system into MIDI device

Post by kortezzzz »

Thanks for the info, strangeChild. Have you succeeded to pass the pitchband messages together with note messages through this rub code without issues? That's the big question :)
Post Reply