midi language

86
midi language

description

midi language. what is a byte?. 8-bit digital word. MS b = Most Significant Bit. 128. 64. 32. 16. 8. 4. 2. 1. 1st bit = highest value MSb 1 1 1 1 1 1 LSb. LSb = Least Significant Bit. 128. 64. 32. 16. 8. 4. 2. 1. MSb 1 1 1 1 1 1 LSb last bit = lowest value. - PowerPoint PPT Presentation

Transcript of midi language

midi languagemidi language

what is a byte?

8-bit digital word

MSb = Most Significant

Bit

12864 3216 8 4 2 1

1st bit = highest value

MSb 1 1 1 1 1 1 LSb

LSb = Least Significant Bit

12864 3216 8 4 2 1

MSb 1 1 1 1 1 1 LSb

last bit = lowest value

2 or more bytes (or other digital words) connected create

message

12864 3216 8 4 2 1 12864 3216

0 0 0 0 0 01 1 1 01 0

MSB = Most Significant

Byte

12864 3216 8 4 2 1 12864 3216

LSB = Least Significant Byte

64 3216 8 4 2 1 12864 3216 8 4

MSByte + LSByte = 16 bits 14 in MIDIremember indicator bits

MIDI CommandsMIDI Commands

MIDI commands represent the performance data that is sent as a musician plays a MIDI controller (keyboard, MIDI guitar, etc.).

MIDI CommandsMIDI Commands

Typically 2 or more bytes

MIDI CommandsMIDI Commands

Each MIDI command tells the receiving unit how the following data bytes are to be used and the MIDI channel bits tell it which MIDI channel is to get the command.

DATA BYTE

The data byte contains the data needed to specify how the MIDI command is performed.

It can be divided into two parts:

DATA BYTE

1. The indicator bit (MSb) is always a 0 used to identify the byte as a data byte.

DATA BYTE

2. The actual data that completes the MIDI message signified by the status byte (128 values possible).

More than one data byte can follow a status byte. For example:

10010001 00000001 00000001

Status data (note #) data (vel)

Note on

channel 1

Data bytes can also be strung together to provide data that exceeds 128 values (such is used in pitch bend).

2 data bytes combined to create 14 bits of data = 16,384

11100001 – 01111111 + 01111111

01111111 + 01111111

8,192 4,096 2,048 1,024 512 256 128 64 32 16 8 4 2 1

MIDI MESSAGES

MIDI messages consist of digital bytes that represent specific commands, data, and functions.

MIDI MESSAGES

The binary system of 1s and 0s are used like the alphabet to create words that tell MIDI devices what, when, how, and where.

There are two types of MIDI messages:

o System

MIDI MESSAGES

oChannel

oSystem

MIDI MESSAGES

Channel messages are meant for specific MIDI channels.

Which notes to play, how hard, how loud, etc. are all channel specific.

MIDI MESSAGES

•Channel messages are put into two groups:

oVoice

oMode

MIDI MESSAGES

System messages

Controls the whole SYSTEM. Not channel specific.

MIDI MESSAGES

•System messages are put into three groups:

o Common

o System exclusive

o Real time

MIDI MESSAGES

CHANNEL MESSAGES - VOICE

The combination of a status byte and data

bytes makes up a complete MIDI

message.

The MIDI messages that are MIDI channel specific (go to specific MIDI channels) are:

1. Voice – has an effect on how the MIDI unit produces sounds.

2. Mode – defines the instrument’s response to the voice messages.

CHANNEL MESSAGES - VOICE

Voice messagesVoice messages

Note -On [key is pressed]

Has a status byte and two data bytes

Note value:

There are 128 (0 – 127 / A1 to C8) possible notes since the data byte represents 128 values. An 88-note piano ranges from B2 to C7.

Note value:

Note (attack) velocity:

There are 128 (0 – 127) levels to represent the speed (ppp – fff) the key is played.

Each note has two physical contacts in the keys (assuming that the keyboard is velocity sensitive, an organ is not velocity sensitive).

Contact number 1 determines that pressure (movement) has been applied.

Contact number 2 determines the end of the movement.

VELOCITY CROSSFADE

100-128

64 - 110

0 - 75

Not all MIDI keyboards transmit or respond to 128 levels of MIDI velocity

Non-velocity sensitive keyboards always transmit a value of 64 for velocity data.

Early Yamaha DX7 keyboards transmitted up to around 112 MIDI velocities. This meant that MIDI modules that were played from it never reached their full velocity potential. Some MIDI units can be programmed to receive or transmit velocity in different ways (ex. some drum pads can have their sensitivity changed).

Note-Off [key is released]

Note-off messages are similar to note-on commands comprising of three bytes.

Some MIDI units will respond to the speed that the key is released. For instance, let off quick and the note cuts off immediately; let off slow and the note fades out.

Some MIDI units can be programmed to ignore note-off commands.

This is evident in keyboards/samplers that play drum and bass patterns when the musician hits a key and continues to play the patterns when the key is released so that the player can jam.

Program change messages cause the receiving unit to change to another patch number (ex. piano to strings, or on an effect unit, from reverb to chorus).

Program messages have two bytes.

patch

program

It is important to record program change data into a sequencer on the first beat, and then to allow a couple of beats to go by before playing.

This provides time for the MIDI units to respond to the patch changes before trying to play notes.

If a unit receives a patch change while it is playing a note, it may cut off the note during the patch change.

Some units may not cut off the note, but any effects assigned to the patch may change making the sound change.

(ex. reverb for piano patch to distortion for guitar patch).

BANK SELECTBANK SELECTPresent day MIDI units may contain 1000s of patches compared to the 16/64/128 patches of earlier units.

These 1000s of sounds are still arranges in banks of 128 patches. To get to these patches, a bank-select command must be sent before the program change message.

BANK SELECTBANK SELECTThe additional sounds are selected by preceding the Program Change message with a Control Change message which specifies a new value for Controller 0 (zero) and Controller 32, allowing 16,384 banks of 128 sounds each

BANK SELECTBANK SELECT

Bank select messages are comprised of 2 Continuous Controller (CC) messages.

BANK SELECTBANK SELECT A continuous controller is a

message that is defined in the MIDI specification -ex. Volume (CC7)

BANK SELECTBANK SELECTController 0 and 32 are used to select banks of sounds. Some

sequencers combine these controllers into a single bank

select number.

BANK SELECTBANK SELECT

BANK SELECTBANK SELECT

AFTERTOUCHAFTERTOUCH

The pressure placed on a key after it is initially played (aftertouch) can be used to change the sound in some MIDI devices. For example, pressing down on a key may cause the note to modulate or bend.

AFTERTOUCHAFTERTOUCH

Aftertouch can take up a lot of memory when recorded into a sequencer. Since a musician may accidentally press on keys while playing, a lot of useless data is recorded. Most units allow for aftertouch to be disabled and most sequencers allow for aftertouch to be ignored.

AFTERTOUCHAFTERTOUCH

There are two types of aftertouch; both voice messages.

1.Polyphonic Key Pressure / Aftertouch2.Channel Aftertouch.

Polyphonic aftertouch allows for real time changes of notes held within a chord.

AFTERTOUCHAFTERTOUCH

Polyphonic aftertouch (also known as polyphonic key pressure) messages are composed of three bytes.

AFTERTOUCHAFTERTOUCH

Channel aftertouch is similar to polyphonic aftertouch.

AFTERTOUCHAFTERTOUCH

Except that the pressure on a key will (if programmed) change all of the notes played on a specific MIDI channel.

AFTERTOUCHAFTERTOUCH

In other words, using aftertouch on an organ patch can bring in modulation (the same rate) for all of the notes being played simulating a Leslie cabinet effect.

AFTERTOUCHAFTERTOUCH

pitch bendpitch bend

Pitch bend allows for the player to bend notes like a guitar or sax player. Using a wheel, ribbon , joystick, and aftertouch usually creates this effect.

pitch bendpitch bendThe pitch bend wheel’s position is recorded using this message.

Pitch bend data is made of two data bytes (14 bits) allowing for up to 16, 384 values.

pitch bendpitch bend

CONTROL CHANGEControl change messages are part of the voice messages group. Control change (CC) messages provide the musician the opportunity to control various parameters of the performance of a MIDI device. Learning how to use CCs can lead to exciting effects in the music.

CONTROL CHANGECCs affect various functions built into MIDI devices. The MIDI specification leaves room for manufacturers to create CCs specific to their MIDI products (these are listed as undefined in the MIDI specs). There are 120 possible CCs divided into 6 categories:

CONTROL CHANGE

There are three types of CCs:CONTROL CHANGE

Continuous – full range of settings Switches – on or

offData – enters numerical data (incremental and decremental)

There are three types of CCs:CONTROL CHANGE

Continuous – full range of settings

There are three types of CCs:CONTROL CHANGE

Switches – on or off(polarity + or -)

There are three types of CCs:CONTROL CHANGE

Data – enters numerical data (incremental and decremental)

There are three types of CCs:CONTROL CHANGE

CCs use three bytes:

The status byte signifies a CC, the second byte signifies which CC, and the third byte the value of the CC.

CONTROL CHANGE

The status byte signifies a CC, the second byte signifies which CC, and the third byte the value of the CC.

CONTROL CHANGE

CONTROL CHANGE

Each CC is assigned a number. The most commonly used CCs are:

CONTROL CHANGE

Continuous controllers send continuous data. An example is a volume pedal that sends continuous data about its position as the musician pushes it down to increase volume.

CONTROL CHANGE

Continuous controllers are usually assigned to pedals, wheels, levers, joysticks, potentiometers, or faders that create uninterrupted streams of data (continuous).

CONTROL CHANGE

The controlling unit analyzes the position of the wheel, pedal, etc. a number of times (usually 50 – 100) a second. The data from the analysis is updated and sent as CC messages.

CONTROL CHANGE

Each analysis sends a MIDI message so that a three second pitch bend can result in sending up to 300 MIDI messages. This is why CCs can potentially use up a lot of memory or clog the MIDI data stream.

CONTROL CHANGE

In order to provide more than 128 values, each continuous controller message is represented by 14 bits consisting of a MSB and LSB, which together equals 16,384 values (128 X 128).

When the value of the CC data exceeds 128, two MIDI messages are sent:: first the MSB, then the LSB.

CONTROL CHANGE

CONTROL CHANGE