This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

MIDI Reference?

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know where I could find a list of what numbers different notes and instruments are? Thanks in advance.
 
Marshal
Posts: 65098
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean the frequencies of different notes? Try this.
 
Jacob Steingart
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 65098
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Antonin Petrovich ( ) and thank you for finding the required information.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!