mmwc questions

advertisement
RUE B AMB E NE K
Q UE S T I O NS O N TH E MAT H E MAT ICS O F CO M PUT E R MUS IC, PART 1
MI DI PA GE
1. Explain the historical background of the MIDI protocol. When was it established, and
what type of “performance gesture” was it first designed to capture?
The MIDI protocol was first codified in 1984 and based on a then-current model of
synthesizer hardware. Its purpose was to capture all information on a performance on one
synthesizer and then transfer that information to other synthesizers. Prior to MIDI’s creation,
many musicians who utilized synthesizers or keyboards had to jump around onstage during live
performances as they struggled to control each and every one. MIDI was created to simplify this
process by using only one synthesizer to control the others.
2. Explain MIDI as an 8 bit system. How do Status Byte and Data Bytes differ as regards
the MSB (most significant bit). What is the lowest possible status byte (expressed as base 10
number?) What is the highest possible data byte (expressed as a base 10 number?).
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, which signifies whether that particular bit is on or off. In
binary’s case, each bit represents the number 2 to a certain power. The farthest bit to the right is
20, the next-farthest bit is 21, the bit following that is 22, and so on. Because MIDI is 8-bit, the
bits will always represent the numbers 27, 26, 25, 24, 23, 22, 21, and 20—in that order, from left to
right. The most significant bit of a status byte is 1, so 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, on the other hand, is 0. This means that all possible values for the
data byte will be 01111111 or below; in base ten notation, this means all values will be 127 or
lower. Therefore, the highest possible base ten value for a data byte is 127, while the lowest
possible base ten value for a status byte is 128.
3. Explain the configuration of a Note On message. What does the status byte represent,
and how many data bytes are necessary for a complete Note On message?
A note on message denotes the note being played, the velocity of that note, and the
channel it is being played on. The status byte of a note on message can be between the ranges of
144 to 159, in base ten notation. This byte signifies what channel—one of sixteen different
“layers” of sound a MIDI can produce—the note is coming from. 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 has been “turned off” and is no longer playing.
4. Similarly, explain the configuration of a Controller message (messages from sliders,
joysticks, buttons, food pedals, wind controllers, etc.) What does the status byte represent,
and how many data bytes are necessary for a complete Controller message.
A controller message denotes whether the foot pedal is down or up and whether any
sliders or joysticks have been moved. Sliders, joysticks, and the like only exist on actual
synthesizers, while foot pedals can be commonly found on both synthesizers and regular
keyboards. The status byte in a controller message represents what channel the controller data is
going toward, this time with a value ranging from 176 to 191. In the same manner as the Note
On message, two data bytes are required for a controller message, each one with a value from 0
to 127. One data byte represents which controller was moved, and the other represents how far
the controller was moved. It is important to note that no system can possibly possess 128
different controllers, so there are more than enough values for the data byte representing which
controller was moved. On the other hand, 128 different values are usually not enough to
represent how far a controller was moved in the second data byte.
5. Why is the status byte of a patch change message followed by only one data byte?
A patch change message only has one purpose, which is to determine 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 being employed, with a value from 0 to 127. Nothing else is
needed in a patch change message, so only one data byte is necessary.
6. How are MIDI notes turned off? Is there a separate note off message, or is this managed
in a different (and somewhat musically unintuitive!) way?
To turn a MIDI note off, 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. Simply sending another note on
message with a velocity of zero is a much more efficient way to turn off a note.
7. Explain how MIDI channels work in relationship to Note on and Controller messages.
There are sixteen different MIDI channels, and each one can play different notes at the
same time. Each MIDI message has a different status byte that symbolizes what channel the
message is going toward. For note on messages, the status byte’s range is 144 to 159 in base ten.
Controller messages’ bytes have a range of 176 to 191 in base ten, patch change messages’ bytes
go from 192 to 207, and pitch bend messages’ bytes go from 224 to 239. For simplicity’s sake,
the range of each message’s byte can be written in a different way in base two—1001nnnn for
note on, 1011nnnn for controller, 1100nnnn for patch change, and 1110nnnn for pitch bend. The
values for each n can be different, but each permutation will fall under the range of its respective
MIDI message. There are also several other MIDI messages that use different ranges, but they
are hardly used nowadays in comparison to the previously mentioned four.
8. How is a midi file structured in relationship to a millisecond time stamp?
MIDI transmits information along a wire, at a rate of approximately 32,000 bits per
second. Because a note on message consists of 30 bits—three 8-bit bytes and start and stop bytes
for each one—one can assume that MIDI operates at about one note on message per millisecond.
A standard MIDI file contains time stamps for each message that is sent; for example, if a note
on message is sent at the very beginning of a MIDI file, the file will contain a 0 on its first time
stamp. An example time stamp of a note on message at the beginning of the piece could be 0 144
60 96. 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.
9. Imagine a drum pad trigger, where each pad triggers a different MIDI note. How would
you set up a patch that would play different instruments on a drum kit? What would the
velocities represent?
Assuming that each note represents a different percussive sound, the patch would contain
a virtual keyboard that plays a different drum sound for each key that is pressed. The different
velocities would presumably represent the various volumes of the drums—however, each drum
would have to last a short few milliseconds before cutting out. All notes can presumably exist on
one channel, so that would not have to change. However, 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.
MAT H E MAT ICS O F S INE WAVE PA GE
10. The Mathematics of the Sine Wave. Read through this page and try to explain what this
is saying in your own words. Those of you working regularly with mathematical concepts
will likely find this relatively simple. If your major or area of study is not so mathematical,
it has maybe been awhile since you’ve done trigonometry! Do your best to either explain
what you read here, or write down questions for Tuesday’s class. You will not yet be able to
run the Max demos, be we will look at these on Tuesday.
A standard sine wave can be plotted on a simple x-y plot, where the x-axis represents
time and the y-axis represents distance from zero. Any physical system that starts to vibrate in a
sinusoid manner—for example, strings on a violin, air in a wind instrument, or the human
throat’s vocal cords—will create sound waves, which are essentially disturbances in the air. The
easiest way to define a sound wave is to describe it as a sine wave. Most sources of sound vibrate
with multiple frequencies at once, which can be explained as the sum of several sine waves
moving at different frequencies at the same time. By putting together the right sine waves, a
synthetic producer of sound can create or imitate any musical tone in existence. Usually, the
strongest sine wave determines the pitch, and the relative amount of other frequencies in that
wave denotes the timbre.
Essentially, the sine wave shows a trip around a circle happening in real time. To find the
sine value of an angle within the unit circle, one must make a right triangle with one leg on the xaxis and a vertex in the center of the unit circle. The angle created at that vertex must be the one
with the sine one wishes to define. The length of the opposite side of the right triangle from that
angle is the sine of that particular angle. At 90 degrees, the horizontal side of the right triangle
becomes equal to the length of the unit circle, so the sine of 90 degrees is 1.
(I was not able to understand the rest of the article because some of the images refused to
load and I could not run the demos.)
ADDI T I VE S YNT H E S IS /H ARMO NIC S E RIE S PAGE
11. Similarly, read through the page on Harmonics and Additive Synthesis. Explain this
page as best you can in your own words.
Equal musical intervals do not possess the same changes in frequency between them, but
the ratio of frequencies between them is the same. For example, notes that are one octave apart
operate with a frequency ratio of 2:1. One possible frequency for G is 100 Hz, so the next G is
200 Hz, then 400 Hz, and so forth. For notes like A, the frequency goes from 110 Hz to 220 Hz
to 440 Hz, etc. 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 by adding sine waves of 100, 200, 300, 400 Hz, etc. together. Adding the
sine waves in the harmonic series for a particular pitch can create that particular pitch with any
possible wave shape.
12. Conclude with describing the spectral content of a sine, triangle, square and sawtooth
wave. How much energy (or amplitude) is present for each integer multiple of a
fundamental tone, and how would you succinctly summarize that?
Ordinarily, a sine wave doesn’t have any additional harmonic content. A triangle wave
sound closest to a sine wave, but contains additional partials at the odd frequencies. Its
amplitudes exist at the inverse of the square of the harmonic number in question; for example, at
1/32, 1/52, etc. The sawtooth wave contains all harmonics, and its amplitudes exist as the inverse
of each harmonic number. The square wave has odd partials with amplitudes at the inverse of the
partial number; for example, 1/3, 1/5, etc.
(I’m not yet sure how to answer the latter part of this question. Is there something here
that I’m not getting?)
Download