aspose file tools*
The moose likes Beginning Java and the fly likes MIDI Reference? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "MIDI Reference?" Watch "MIDI Reference?" New topic
Author

MIDI Reference?

Jacob Steingart
Ranch Hand

Joined: Mar 28, 2008
Posts: 63
Does anyone know where I could find a list of what numbers different notes and instruments are? Thanks in advance.


I never know what to put in my signature...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38881
    
  23
Do you mean the frequencies of different notes? Try this.
Jacob Steingart
Ranch Hand

Joined: Mar 28, 2008
Posts: 63
Unfortunately no. I'm trying to figure out the mystical numbers that ShortMessage's setMessage method use to set things like the instrument and the note played. I figure that 71 is a B (I don't have full perfect pitch, but I can recognize Bs), and that the notes increase by half steps for each number, but I don't know if there is a cheatsheet I could use to just look up the note I might want.

Ironically, I'm writing this software for two reasons, one just being to familiarize myself with the javax.sound.midi package, the other to write software to help me work on perfect pitch and ear training, yet I'm using my small amount of perfect pitch to write the software to help my perfect pitch!
Antonin Pestrovich
Greenhorn

Joined: Mar 08, 2009
Posts: 1
Hello - I've been experimenting with the java MIDI interface for a couple days, and I think I can help you out. The note values are fairly straightforward - the note C4 is 60, and it increments/decrements one step per digit. For example, 59 is a B, 61 is a C#/Db, 62 is a D, 69 is a 440 Hz A, etc. If you prefer a visual reference, this page has a picture of a keyboard with all they notes & MIDI values filled in: http://phys.unsw.edu.au/jw/notes.html

The instrument values can be a bit trickier - the "standard" MIDI instrument list can be viewed here: http://somascape.org/midi/help/gmins.html - however, what you actually get can vary depending on what your MIDI device has loaded in it. The java installation on my linux box, for example, has a default soundbank with 410 different instruments! The first 128 of them appear to match up with the standard MIDI list from the above page, but I just gave it a quick look over - I didn't verify all of them. Here's a small class that will show you all the instruments included in your default soundbank:



I hope some of this helps, let me know if there is anything else I can try to answer.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38881
    
  23
Welcome to JavaRanch, Antonin Petrovich ( ) and thank you for finding the required information.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: MIDI Reference?