Victoria, B.C. Canada


 
HOME
 
PROJECT
 
TEAM
 
FILES
 
GALLERY
 
LINKS
 
THANKS

 

 

What is Pedalboard?

[+]  Introduction
[+]  Objective  
[+]  Midi Specification  
[+]  Hardware Design
[+]  Software Design
[+]  Midi Programs
[+]  Features of our Midi Compatible Organ Pedal
 


MIDI stands for Musical Instrument Digital Interface. The development of the MIDI system has been a major catalyst in the explosion of music technology. MIDI has put powerful computer instrument networks and software in the hands of less technically versed musicians and has provided new and time-saving tools for computer musicians.

The MIDI protocol is made up of messages. A message consists of a string in series of 8-bit bytes (0’s or 1’s). MIDI has many such defined messages. Some messages consist of only 1 byte. Other messages can have 2 or more bytes. The one thing that all messages have in common is that the first byte of the message is the Status byte. This is a special byte because it's the only byte that has bit #7 set. Any other following data bytes in that message will not have bit #7 set. A start of a MIDI message is detected when the bit #7 of the Status byte is set. Therefore, the Status byte is in the range 0x80 to 0xFF. The remaining bytes of the message will be in the range 0x00 to 0x7F.

The Status bytes of 0x80 to 0xEF are for messages that can be broadcast on any one of the 16 MIDI channels. Because of this, these are called Voice messages. For these Status bytes, you break up the 8-bit byte into two 4-bit nibbles. The high nibble specifies what type of MIDI message this is. Here are the possible values for the high nibble, and what type of Voice Category message each represents:

8 = Note Off
9 = Note On
A = AfterTouch (i.e., key pressure)
B = Control Change
C = Program (patch) change
D = Channel Pressure
E = Pitch Wheel

The low nibble is the MIDI channel bit. There are 16 possible MIDI channels, with 0 being the first. Almost all MIDI devices are equipped to receive MIDI messages on one or more of 16 selectable MIDI channel numbers.

Status Byte

Data Byte 1

Data Byte 2

Message

Legend

1000nnnn

0kkkkkkk

0vvvvvvv

Note Off

n=channel* k=key # 0-127(60=middle C) v=velocity (0-127)

1001nnnn

0kkkkkkk

0vvvvvvv

Note On

n=channel k=key # 0-127(60=middle C) v=velocity (0-127)

1010nnnn

0kkkkkkk

0ppppppp

Poly Key Pressure

n=channel k=key # 0-127(60=middle C) p=pressure (0-127)

1011nnnn

0ccccccc

0vvvvvvv

Controller Change

n=channel c=controller v=controller value(0-127)

1100nnnn

0ppppppp

[none]

Program Change

n=channel p=preset number (0-127)

1101nnnn

0ppppppp

[none]

Channel Pressure

n=channel p=pressure (0-127)

1110nnnn

0ccccccc

0fffffff

Pitch Bend

n=channel c=coarse f=fine (c+f = 14-bit resolution)

For example, a message for turning on a note (middle C) on MIDI channel #5 very loudly (with a velocity or force of 127, the maximum) is shown below in binary.

status byte

data byte

data byte

10010100

00111100

01111111

Simultaneous events in MIDI must be sent as a string of serial commands. A 3-note chord, for example, will be transmitted as three separate note #-velocity pairs. Because of the 31.25 Kbaud transmission speed, this is normally perceived as simultaneity.

To make more efficient use of the limited bandwidth, MIDI manufacturers adopted a shortcut called running status. Running status allows a single status byte's action to remain in effect for an unlimited number of data byte pairs which follow. For example, to play three 'simultaneous' notes on the same MIDI channel, a Note On status byte can be sent, followed by six data bytes.

status(note on, ch 1) key1-velocity key2-velocity key3-velocity

To help minimize excessive data by using running status, the Note On command can also function to turn notes off by sending a velocity value of zero for the key # to be turned off.

status(note on, ch 1) key1-velocity1 key2-velocity2 key3-velocity3 key1-velocity0 key2-velocity0 key3-velocity0

 

       

Copyright © 2005, Midi Tech Ltd. All Rights Reserved