Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Does MIDI Offer 127 Notes

Tags:

midi

Is the 127 note values in MIDI musically significant (certain number of octaves or something)? or was it set at 127 due to the binary file format, IE for the purposes of computing?

like image 783
Matt Avatar asked Feb 24 '11 15:02

Matt


People also ask

Why is the number 128 important to MIDI?

Because data bytes define which note is played, and the velocity at which it is played, there are 128 possible MIDI notes – more than a piano – and 127 possible key velocities (0 velocity is a special case). Change each number in a MIDI command and a different musical result occurs.

How many notes are in a MIDI file?

You may be wondering how alternate tunings work... they work just fine. It is up to the synthesizer to produce the correct pitches for these alternate tunings. MIDI simply provides for a selection of 128 different values to be sent.

How many notes are in a MIDI channel?

The General MIDI standard includes 47 percussive sounds, using note numbers 35-81 (of the possible 128 numbers from 0-127), as follows: 35 Acoustic Bass Drum. 36 Electric Bass Drum.

What is the highest MIDI note?

Note pitches are represented as in the MIDI specification, using integers from 0 (lowest pitch) to 127 (highest pitch).


3 Answers

In the MIDI protocol there are status bytes (think commands, such as note-on or note-off) and there are data bytes (think parameters, such as pitch value and velocity). The way to determine the difference between them is by the first bit. If that first bit is 1, then it is a status byte. If the first bit is 0, then it is a data byte. This leaves only 7 bits available for the rest of the status or data byte value.

So to answer your question in short, this has more to do with the protocol specification, but it just so happens to nicely line up to good number of available pitch values.

Now, these pitch values do not correspond to specific pitches. Yes it is true that typically a pitch value of 60 will give you C4, or middle C. Most synths work this way, but certainly not all. It isn't even a requirement that the synth uses the pitch value for pitches! MIDI doesn't care... it is just a protocol. You may be wondering how alternate tunings work... they work just fine. It is up to the synthesizer to produce the correct pitches for these alternate tunings. MIDI simply provides for a selection of 128 different values to be sent.

Also, if you are wondering why it is so important for that first bit to signify what the data is... There are system realtime messages that can be interjected in the middle of some other command. These are things like the timing clock which is often used to sync up LFOs among other things.

You can read more about the types of MIDI messages here: http://www.midi.org/techspecs/midimessages.php

like image 110
Brad Avatar answered Sep 20 '22 06:09

Brad


127 = 27 - 1

It's the maximum positive value of an 8-bit signed integer, and so is a meaningful limit in file formats--it's the highest value you can store in a byte (on most systems) without making it unsigned.

like image 8
Jonathan Grynspan Avatar answered Sep 21 '22 06:09

Jonathan Grynspan


I think what you are missing is that MIDI was created in the early 1980's, not to run on personal computers, but to run on musical instruments with extremely limited processing and storage capabilities. Storing 127 values seemed GIANT back then, especially when the largest keyboard typically has only 88 keys, and most electronic instruments only had 48. If you think MIDI is doing something in a strange way, it is likely that stems from its jurassic heritage.

Yes it is true that typically a pitch value of 60 will give you C4, or middle C. Most synths work this way, but certainly not all.

Yes ... there has always been a disagreement about where middle C is in MIDI. On Yamaha keyboards it is C3, on Roland keyboards it is C4. Yamaha did it one way and Roland did it another.

Now, these pitch values do not correspond to specific pitches.

Not originally. However, in the "General MIDI" standard, A = 440, which is standard tuning. General MIDI also describes which patch is a piano, which is a guitar, and so on, so that MIDI files become portable across multitimbral sound sources.

like image 5
Hamranhansenhansen Avatar answered Sep 18 '22 06:09

Hamranhansenhansen