A.5 part 1&2

A 5


 MIDI protocol was first communication protocol that made it possible for early synthesizers to communicate through a piano keyboard. Before  MIDI’s creation, many musicians who used synthesizers or keyboards had to jump around onstage in order to control each and every one. MIDI was created to simplify this process by using only one synthesizer to control the others.

MIDI runs using 8-bit bytes, which are sets of eight binary—or base two—numbers in a row. These numbers can only be 1 or 0, meaning that a particular bit is on or off. In binary’s case, each bit represents the number 2 to a certain power. Because MIDI is 8-bit, the bits will represent the numbers 27, 26, 25, 24, 23, 22, 21, and 20—in that order and from left to right. All possible values for the status byte will be 10000000 or above, in base ten notation this means all values will be 128 or higher. The most significant bit of a data byte is 0. This means that all possible values for the data byte will be 01111111 or below; in base ten notation.

A note on message denotes the note being played, the velocity of that note, and the channel it is being played on. Two data bytes are necessary to complete the notation and both have a range of 0 to 127 for possible base ten values. One data byte determines which note is being played; for example, a value of 60 for this byte represents middle C on a keyboard. The other data byte denotes how loud the note is—or its velocity—with a 0 meaning the note is off.


The controller message constitutes three things. First the controller message on channel 1-16, second, controller number 0-127 and last, controller value 0-27. The status byte is a representation of the controller data. It requires two data byte to complete the controller message.


A patch change message only has one purpose, this determines whether or not a patch or program change is being employed on the synthesizer. The status byte determines what channel the message is being sent to, with a value ranging from 192 to 207 in base ten. The one data byte signifies which patch is employed, with a value from 0 to 127. Nothing else is needed in a patch change message, so only one data byte is necessary.


To turn a MIDI note off, you set the second data byte on a note on message to zero. A MIDI note is on until it receives another note on message with a velocity of zero, which causes it to shut the note off. There is a separate MIDI note off message, but that requires an entirely different status byte connected to the MIDI note number.


The status byte of the note on and the controller messages choose the MIDI channels. In a note on messages, the status byte can then have a value in the range of 10010000 to 159 (1001111) meanwhile the controller status byte can have a value in the range of 176, 10110000 to 191 (10111111). This is basically how MIDI allows you to send many messages at the same time in over 16 different channels.


Midi carries information at a rate of 32,000 bits per second with notes on the message consisting of 30 bits three 8-bit bytes that start and stop bytes for each one. A standard MIDI file contains time stamps for each message that is sent,  for example if a note on a message is sent at the very beginning of a MIDI file, the file will contain a 0 on its first time stamp.  The 0 denotes what time the message was received, the 144 denotes what channel the note is played on, the 60 denotes which note is being played, and the 96 denotes the velocity of the note. In this instance, the note will keep playing until a separate note on message with a velocity of zero is received, which will turn the note off. Various messages have different numbers of time stamps as well; for example, each time stamp of a controller message represents a change in controller value.


The patch would contain a virtual keyboard that plays a different drum sound for each key that is pressed. The different velocities represent the various volumes of the drums. Each drum would have to last a short few milliseconds before turning off. All notes exist on one channel and the patch would have to be able to send note on messages with velocities of 0 a short period of time after playing each note, in order for the drum noises to not drag out longer than they need to—and longer than they ordinarily would if they were not synthesized sounds.


Every sound can be simplified to a sine wave which can is also plotted on graph.  Sound waves or sine waves disturb the air. Most sounds create several sine waves at once which leads them to overlap.and interact sine wave frequencies is what makes any given sound unique.


Equal musical intervals do not possess the same changes in frequency between them, but the ratio of frequencies between them tends to be the same. Notes that are one octave apart operate with a frequency ratio of 2:1. The frequencies rise exponentially, so to the human ear, the difference between 100 and 200 Hz sounds the same as 800 Hz to 1600 Hz, just in a different octave.Notes tend to sound good together if the ratio of their frequencies is equal to the ratio of two small whole numbers; for example, 3 to 2 or 4 to 3. A repeating wave shape of frequency 100 Hz can be created through adding sine waves of 100, 200, 300, 400 Hz. Adding the sine waves in the harmonic series for a particular pitch can create that particular pitch with any possible wave shape.


Sine wave consists of no additional harmonic content. Triangle wave contains additional partials at the odd frequencies, with amplitudes at the inverse of the square of the harmonic number. Sawtooth contains all harmonics, with amplitudes as the inverse of the harmonic number. Square wave contains odd partials with amplitudes at the inverse of the partial number. For a brief example and description of the waveform:
Sine – 1 0 0 0 0 0 0 0, Triangle – 1 0 1/9 0 1/25 0, Square – 1 0 1/3 0 1/5 0, Sawtooth – 1 ½ 1/3 ¼ 1/5 1/6