<< 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

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
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