MIDI was not delcared in this scope, error message


I’m trying to make a MIDI breath controller and I keep getting this message in the Arduino IDE. (see picture). The MIDI library is installed and everything seems to be fine. Plus, the code is not from me (got it on a blog) and I did’nt change anything.

If someone could help me here, I would really appreciate.

Thx so much! :slight_smile:


Either you didn't copy the code correctly or it has never worked. You need to create a MIDI instance with a command like


If you look at any of the examples that come with the MIDI library you'll see that.


Ok you are right, thank you so much!