arduino_midi_library icon indicating copy to clipboard operation
arduino_midi_library copied to clipboard

Teensy 3.2 and Midi, output going to Serial Monitor

Open dimitre opened this issue 6 years ago • 2 comments

Hello, I've been using this library with Teensy 3.2. I'm using the default TX pin and it always worked ok with MIDI.begin() in the latest version now it is sending all MIDI information to the serial port instead of TX pin. not sure if it is this library or something else. Happening both on Arduino 1.8.9 and 1.8.10 minimal code to reproduce

#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();

void setup() {
  MIDI.begin();
}

void loop() {
  MIDI.sendNoteOn(42, 127, 1);    // Send a Note (pitch 42, velo 127 on channel 1)
  delay(1000);                // Wait for a second
  MIDI.sendNoteOff(42, 0, 1);     // Stop the note
  delay(100);
  // put your main code here, to run repeatedly:

}

Screen Shot 2019-09-22 at 9 08 37 PM

Thank you

dimitre avatar Sep 23 '19 00:09 dimitre

It seems to be working on latest master But I have this issue if I install via Arduino Libraries

dimitre avatar Sep 23 '19 00:09 dimitre

Is this expected? I have the same on mega1280. Same for master and arduino installed versions. My MIDI device which is connected via TX>1 detects random nonsense commands.

... ok using Serial1 and TX1 separates the output but the commands detected are still erratic

//Arduno Mega + Hairless Midi = 19200;
// Mega: Serial1 = TX1
struct CustomBaudRate : public midi::DefaultSettings{
  static const long BaudRate = 19200;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, MIDI, CustomBaudRate);

hurzl avatar Sep 17 '21 22:09 hurzl