Gibberish Serial when using a Midi Input Device

Hello !
I'm using an Arduino UNO.
I'm trying to get data from a synthesizer using a MIDI program from NotesAndVolts, here's the code #include <MIDI.h> // Add Midi Library#define LEDPWM1 3#define LEDPWM2 5#d - Pastebin.com. However, the Serial only shows me a bunch of "⸮i⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮d⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮a⸮⸮", and this constantly (without me playing anything) the characters other than " ⸮⸮" appear when I press some keys. It seems the program does receive information, because I can use the variables such as "pitch" , (atleast it gives different values according to the keys, don't know if it's the right ones tho). Do you guys know where it might come from ?

PS : The monitor is at the same baud rate
Thanks !

Broken link. Can't you post the code in code tags?

MIDI is 31250 baud - not supported by the serial window...

#include <MIDI.h>  // Add Midi Library
#define LEDPWM1 3
#define LEDPWM2 5
#define LEDPWM3 6
#define LEDPWM4 9
#define LEDPWM5 10
#define LEDPWM6 11
#define LED 13    // Arduino Board LED is on Pin 13

//Create an instance of the library with default name, serial port and settings
//MIDI_CREATE_DEFAULT_INSTANCE();

struct MySettings : public midi::DefaultSettings {
  static const long BaudRate = 38400;
};

MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI, MySettings)

void setup() {
  pinMode (LED, OUTPUT); // Set Arduino board pin 13 to output
  MIDI.begin(13); // Initialize the Midi Library.
  // OMNI sets it to listen to all channels.. MIDI.begin(2) would set it 
  // to respond to notes on channel 2 only.
  MIDI.setHandleNoteOn(MyHandleNoteOn); // This is important!! This command
  // tells the Midi Library which function you want to call when a NOTE ON command
  // is received. In this case it's "MyHandleNoteOn".
  MIDI.setHandleNoteOff(MyHandleNoteOff); // This command tells the Midi Library
  // to call "MyHandleNoteOff" when a NOTE OFF command is received.
  Serial.begin(38400);
}

void loop() { // Main loop
  MIDI.read(); // Continuously check if Midi data has been received.
  //Serial.println("oui");
}


// MyHandleNoteON is the function that will be called by the Midi Library
// when a MIDI NOTE ON message is received.
// It will be passed bytes for Channel, Pitch, and Velocity
void MyHandleNoteOn(byte channel, byte pitch, byte velocity) { 
  Serial.println("hello");
  Serial.println(MIDI.getChannel());
  //digitalWrite(LED,HIGH);

}

// MyHandleNoteOFF is the function that will be called by the Midi Library
// when a MIDI NOTE OFF message is received.
// * A NOTE ON message with Velocity = 0 will be treated as a NOTE OFF message *
// It will be passed bytes for Channel, Pitch, and Velocity
void MyHandleNoteOff(byte channel, byte pitch, byte velocity) { 
  //digitalWrite(LED,LOW);  //Turn LED off
}

I was told that yesterday, so I added

struct MySettings : public midi::DefaultSettings {
  static const long BaudRate = 38400;
};

MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI, MySettings)

in order to have custom settings. But still, doesn't work, so I tried with PuTTY (never heard of it, just put the port, clicked on Serial and put 31250 at the opening, and I still have gibberish ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ (not a bug, exactly that)

Can you explain exactly what you expect to see on the serial port?

MIDI is not ASCII so it will not generally show any recognizable characters. You would be better served by printing the hex code for the values you are reading from the serial port and comparing that to the MIDI message specification to see what messages are being sent.

For the moment I just want it to show anything. It should print "hello" when a key is played, and the function recognizes that it is played, but the moment it has read Midi.read(), it cannot print something recognizable. If I print something before, it works normally,

The custom setting specifies 38400 baud - did you try this?