Hello!
Ive been using midi for a while and just recently have begun learning how to write code in Java. Right now I'm attempting to write a simple program where my application prints out the three bytes from a note on message whenever I press middle C on my midi controller. Ive read a couple articles and know a little bit about midi specifics such as the hex a decimal system, types of messages etc but cannot find much about the protocol for receiving midi information when writing programs compatible with midi. Is there anyone who can help me out ? Thanks!
Best
Alex
Some links:
Transmitting and Receiving MIDI Messages
getting input from MIDI keyboard
Listens to a MIDI port and dump the received event to the console
Java provides a package to interface with the MIDI subsystem. This package have some limitations (regarding sysex or realtime messages for examples), and is quite a departure from standard midi-as-a-serial-protocol because of its object-oriented nature, but it allows to quickly write MIDI enabled software.
https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/package-summary.html
https://docs.oracle.com/javase/tutorial/sound/MIDI-messages.html