Page 4 of 4

Re: Turning a micro computer system into MIDI device

Posted: Sat Nov 28, 2015 8:06 pm
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 5114 times

Re: Turning a micro computer system into MIDI device

Posted: Sun Nov 29, 2015 7:52 pm
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 :)