<< Chapter < Page Chapter >> Page >

Making a sound: note-on and note-off events

As mentioned earlier, most MIDI messages are three bytes in length: a status byte followed by two data bytes. The status byte for the Note-On event is 1001nnnn (0x 9n in hexadecimal), where nnnn indicates the channel number . Since a four-bit value selects channel, there are a total of 16 channels available. The channels are called “Channel 1” (nnnn=0000) to “Channel 16” (nnnn=1111).

The first data byte indicates the note number to begin sounding, and the second data byte indicates the velocity at which the key was pressed. Since the MSB (most-significant bit) of a data byte is zero by definition, note number and velocity are each 7-bit values in the range 0 to 127.

Hexadecimal notation is commonly used to describe MIDI messages. For example, the three-byte message 0x93 0x5C 0x42 indicates a Note On event on Channel 4 for note number 92 with velocity 66.

The Note-Off event is similar; its status byte is 1000nnnn (0x 8n ). For example, the three-byte message 0x83 0x5C 0x35 indicates that note number 92 on Channel 4 should cease sounding, and that the key release velocity was 53. Synthesizers and sound modules generally equate keypress velocity with amplitude; however, they are less likely to use the release velocity. A “Note On” event with zero velocity is equivalent to a “Note Off” event.

The following screencast video shows MIDI Note On and Note Off messages produced by the Roland XP-10 synthesizer and visualized using the MIDI OX software application . MIDI OX is a free MIDI utility that serves as a MIDI protocol analyzer. The video also shows how MIDI OX can play standard MIDI files such as instruments.mid , a short multi-instrument composition that illustrates the concept of MIDI channels:

[video] Visualize MIDI note-on and note-off messages generated by the Roland XP-10 synthesizer

If you plan to start using MIDI OX right away, take a look at the following screencast that explains how to set up MIDI OX to work with a MIDI device such as a synthesizer, and how to set up your soundcard so that you can visualize the MIDI messages produced by a MIDI player such as Winamp or Windows Media Player. You will also need to install the support application called MIDI Yoke , which serves as a virtual MIDI patch bay to interconnect all of the MIDI-related devices on your computer.

[video] Setting up MIDI-OX to view MIDI messages
[video] Setting up your soundcard to work properly with MIDI-OX and a media player

Selecting a voice: program change

The Program Change message selects which of 128 possible voices (also called sounds, tones, or patches) to associate with a particular channel. The status byte for the Program Change message is 1100nnnn (0x Cn ), where nnnn indicates the channel number. Only one data byte called the program number follows the status byte for this message type. For example, the two-byte message 0xC7 0x5F directs the synthesizer to use program number 95 for all subsequent Note-On and Note-Off messages directed to Channel 8.

The original MIDI standard did not constrain equipment manufacturers in what sounds or voices to associate with program numbers. However, as it soon became apparent that defining standard voices for the 128 program numbers would make it easier for composers to distribute multi-voice (or multitimbral ) compositions with the expectation of the listener hearing what the composer had intended. The General MIDI (GM) standard defines 128 basic voices to be associated with the 128 program numbers. Moreover, Channel 10 is always defined as a percussion instrument under the General MIDI standard. See the GM Level 1 Sound Set for a table of voices and percussion key map. Note that the seven-bit program number ranges from 0 to 127; the associated GM voice will range from 1 to 128. The following screencast video gives you a quick tour of the 128 General MIDI voices as they sound on my Roland XP-10 synthesizer.

Questions & Answers

if three forces F1.f2 .f3 act at a point on a Cartesian plane in the daigram .....so if the question says write down the x and y components ..... I really don't understand
Syamthanda Reply
hey , can you please explain oxidation reaction & redox ?
Boitumelo Reply
hey , can you please explain oxidation reaction and redox ?
Boitumelo
for grade 12 or grade 11?
Sibulele
the value of V1 and V2
Tumelo Reply
advantages of electrons in a circuit
Rethabile Reply
we're do you find electromagnetism past papers
Ntombifuthi
what a normal force
Tholulwazi Reply
it is the force or component of the force that the surface exert on an object incontact with it and which acts perpendicular to the surface
Sihle
what is physics?
Petrus Reply
what is the half reaction of Potassium and chlorine
Anna Reply
how to calculate coefficient of static friction
Lisa Reply
how to calculate static friction
Lisa
How to calculate a current
Tumelo
how to calculate the magnitude of horizontal component of the applied force
Mogano
How to calculate force
Monambi
a structure of a thermocouple used to measure inner temperature
Anna Reply
a fixed gas of a mass is held at standard pressure temperature of 15 degrees Celsius .Calculate the temperature of the gas in Celsius if the pressure is changed to 2×10 to the power 4
Amahle Reply
How is energy being used in bonding?
Raymond Reply
what is acceleration
Syamthanda Reply
a rate of change in velocity of an object whith respect to time
Khuthadzo
how can we find the moment of torque of a circular object
Kidist
Acceleration is a rate of change in velocity.
Justice
t =r×f
Khuthadzo
how to calculate tension by substitution
Precious Reply
hi
Shongi
hi
Leago
use fnet method. how many obects are being calculated ?
Khuthadzo
khuthadzo hii
Hulisani
how to calculate acceleration and tension force
Lungile Reply
you use Fnet equals ma , newtoms second law formula
Masego
please help me with vectors in two dimensions
Mulaudzi Reply
how to calculate normal force
Mulaudzi
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Musical signal processing with labview -- midi for synthesis and algorithm control. OpenStax CNX. Nov 09, 2007 Download for free at http://cnx.org/content/col10487/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Musical signal processing with labview -- midi for synthesis and algorithm control' conversation and receive update notifications?

Ask