FortySevenEffects / arduino_midi_library

MIDI for Arduino
MIT License
1.59k stars 255 forks source link

MIDI.turnThruOff(); not working #353

Closed AaronHaCohen closed 1 month ago

AaronHaCohen commented 1 month ago

Thanks for providing this library

MIDI.turnThruOff(); does not turn off MIDI thru

Describe your project and what you expect to happen:

Using your Callback.ino example I added MIDI.turnThruOff(); at line 40 in setup but it seems to be ignored. Both original example and with MIDI.turnThruOff() added, compile, upload and run without error. In both cases all incoming MIDI in is sent out. Midi thru is not turned off. MIDI.turnThruOff(); was copied directly from your Chaining.ino (but unchained) Curiously your Chaining.ino example will not compile. It throws an error message: "invalid use of void" and the cursor stops at line 10.

Is the syntax of MIDI.turnThruOff(); wrong?

Note: Attachments (circuit diagrams, code examples) are most welcome and will help us understand your needs better and find a suitable solution for your issue.

--> Callbacks2.ino included below

Describe your problem (what does not work):

MIDI.turnThruOff(); does not turn MIDI thru off

Steps to reproduce

After uploading Callbacks2.ino Connect a MIDI controller to Rx of UNO and a MIDI monitor to Tx. Send any MIDI to the UNO and all incoming messages are sent out to the monitor, tho no messages are sent by the explicit code functions.