lecture notes • Spring, 2013
Designing an instrument
Assigning tasks within your team
Meta-events: events about events.
• Tempo: accelerate & ritard
• Range: high and low, or restrict to key, scale, chord
• Tendency masks: "clouds" of random numbers controlling function to keep it within certain limits, and changing the limits over time
• Crescendo and diminuendo, using velocity (control over individual notes, but only one velocity byte per event) vs. volume (continuous control of level, affects all notes on that MIDI channel)
• Harmony: distance between notes. Does it follow key, scale, or chord?
• Counterpoint: how musical voices move against each other, parallel, opposing, combination
• Orchestration: use multiple Reason modules on multiple MIDI channels to layer different sounds or create an orchestra
• Density: growing/shrinking chords or clusters using module's polyphony setting
9-5 weekdays, wide open. Other times, must have 2 people. No work after midnight without prior permission.
Goggles at all times when working with power tools.
Unplug soldering irons when done.
Put things away in marked drawers and spaces!
wiring: digital pins, need resistors on open circuits (1-10kΩ) to prevent noise. On analog pins use devices as voltage dividers.
Custom Max object: include it in your patch, then just do receive ("r") object a0-5 (analog) or d0-15 (digital) to get the data from the Arduino.
makenote, note#, vel, length. Has to then go to a noteout. Takes care of note durations so you don't have to worry about note-offs. Should test for not-zero [ != 0 ] velocity so incoming note-offs are ignored.
Arithmetic functions. Use space after operator, Enter when done.
Select, waits for value, passes 1.
Relational operators. <. >, =, != (not equal). Puts out 1 when condition is met, 0 when it's not.
Clocker=metro that reports the time since it starts
Gates: pass data or not.
Can have multiple patches open and active.
zl: list functions, zl mth chooses mth number in list.
Intro to sensors:
Toggle, push-button, momentary, lever, magnetic
Rotary encoder: has two different switch contacts, “0” and “1”. Speed of encoder determined by how fast switch contacts are made; direction determined by order of contacts.
Continuous sensors can act as resistors or current generators. Some, like rotary or slide potentiometers, can be connected directly to MIDItron. Others need buffering, amplification, and/or filtering to provide usable signal.
• Force-sensing resistor=pressure. Button-type or strip.
• “Softpot”, flat variable resistor, ribbon or circular
• Flex sensor=bending angle
• Infrared distance sensor=from about 1.5-10 inches. Available in various ranges. Get too close and the field inverts.
• Photocell: presence or absence of light
• Accelerometer: 1-axis, 2-axis, 3-axis. More sensitive ones can measure tilt (responding to gravity)
• Piezoelectric foil=striking or bending force. High voltage.
Intro to Max:
Launch Max. Before opening a patch, check Max's MIDI Setup: in a is MPD or keyboard, out a is "From MaxMSP1". Disable all other inputs and outputs
Launch Reason. Set Preferences>Advanced> Bus A to "FromMaxMSP1"
Edit and locked mode: command-E toggles, or click on lock icon.
object box = function
start typing, list of objects appears. To list them all, Max Help: objects A-Z or by function
Number box = for monitoring.
Can choose to display MIDI note numbers OR names (get info)
Patch cables connect everything.
notein: port a, note#, vel, ch.
Use 0 as argument to pass input through.
cntlin: controller value, controller #, channel (if no channel, will accept
all. If wrong channel, won't respond)
Sliders, default to 0-127, can change min value and range (Get Info)
Pipe: number of arguments is number of messages passed, with last one being delay time in ms. "0 0 0 time" will delay a MIDI message (zeroes are placeholders).
Random n=puts out random value between
1 and n
Metro=clock, number of milliseconds.
Makenote: creates a note event with on and off commands, with specified duration. Send to note out.
MIDI Scope: a patch for monitoring and checking MIDI inputs.
Akai MPD26 and Reason
MPD26s are in large cabinet,
along with USB cable. Just plug the cable into the USB hub at each station.
Vyzex Editor on all of the computers.
CC=Common channel, set on Global page. You can use common channel or individual channels for each pad and control. In a Reason rack with multiple modules, each module is assigned a MIDI channel, and can be individually addressed by pad or control.
Use Preset page to set functions of pads, sliders, knobs.
Pads send note, velocity, and aftertouch (if you want).
Sliders and knobs send controllers. (Also program changes, but Reason doesn't recognize them.)
Looking up Reason controller numbers for module parameters: in folder called "ReasonCC"
Using Editor: Click on name of patch to change, then Store it in the current bank. You can set up 30 patches in a bank. Save the bank with your name on it. Don’t use default save folder—it’s hard to find—use the Documents folder. Also save on your thumb drive!!
Using multiple modules in Reason: each one responds to a different MIDI channel. Use a mixer to route the audio from multiple modules out to a common output (i.e., the Mac)
NN19 can record sounds, import them from libraries. There are SFX and instrument libraries in the Documents folder "sounds". Make sure to File>Self-contain settings>"Check all" when you save a rack with samples in it, so that the samples get saved in the file itself, and Reason doesn't have to go looking for it.
What Makes a Good Instrument?
(thanks to Joe Paradiso, MIT Media Lab)
- Good feel (ergonomics, haptic response)
- Fun to play (at least eventually)
- Ability to master with practice
- Stable, causal, reliable characteristics
- But at the edge of playability -- some chaos
- Good instruments are hard to learn!
- Good sonic vocabulary and expressiveness
- Match between gesture and sounds
- Causality for audience
- Visual aesthetic
Reason NN19 module
uses short digital recordings—samples—instead of simple waveforms, and adds many of the same filtering and envelope parameters as Subtractor.
Record directly into module using an external mic and audio interface. Samples can be looped and edited.
Translating MIDI into sound parameters
in Reason: See controller chart for each Reason module.
MIDI can be generated with non-keyboard instruments such as Akai MPD, Yamaha wind controller, YouRock Guitar.
Sliders, breath control, knobs can be mapped to vibrato, timbre, attack or release time, etc.
are a synthesizer's parameters?
Pitch, detune (in 1/100 of a semitone)
Filter cutoff frequency and resonance
Amplitude envelope, filter envelope: ADSR is approximation of real world, but works well.
LFO rate and depth
Saving a whole rack (.reason) in Reason.
Familiar vs. unfamiliar user interfaces for music
Familiar: keyboard, guitar, drums, malletboard, violin, woodwind, brass. Advantage, people already know how to use it. Doesn't require new skills, practicing, rethinking how you make music.
Most commonly in electronic world: keyboard. Used with Moog synths, Switched-on Bach. Became glorified organs with thousands of stops, people play all of them the same way.
But, can extend technique to play keyboard in new way that has different expressive parameters (aftertouch, wheels, pedals).
Adaptive: or extended, like keyboard with pedals; stringless guitar; wind controllers with more buttons and levers than a conventional wind instrument; violins with sensors on the bow, etc.
Unfamiliar: like Theremin: hard for guitar players used to articulating with right hand. Using different parts of the body, or in different ways. Finger position or movement on surface or in free space. Relative positions of fingers -- spread or angle. Bend of joints: wrists, elbows, knees. Pressure on surface. Requires practice and mastery! Think of music in different ways than simple button-pushes/discrete events.
MIDI: Electrical and digital protocol
Originally used cables, binary on/off 5-volts DC. Each MIDI byte or word consisted of eight data bits, plus two “framing” bits. Speed is 31,250 bits per second, or 3,125 bytes/sec (8 data bits + two buffer bits= 10 bits/byte). Now largely virtual.
Travels in one direction only: from MIDI Out jack to MIDI In jack. If you want bi-directional, you need two cables.
A universal standard: if an instrument has MIDI, it must be able to talk to any other MIDI instrument without restrictions.
Now MIDI can be piggybacked on other cables, like USB, Firewire, and Ethernet. But there are no standards for these, so manufacturers have to make software drivers which are installed on receiving devices (computers) so that they can understand what's coming in.
Advantage: can specify much faster speeds!
An eight-bit number has a decimal range of 0 (00000000) to 255 (11111111) Hex: 00-FF
MIDI has two types of bytes:
Status or Command byte (>127, first bit is 1, hex ≥80) is instruction
Data byte (≤127, first bit is zero, ≤7F) is value.
Command set - some commands are defined as having 2 data bytes, some have
1 data byte.
Receiving device knows what to expect. Incomplete command is usually ignored.
First four bits of command byte is the type of instruction. Second four bits is the channel number. Early MIDI devices only read one channel at a time, ignored data on other channels (some, like drum synths, still do). Means you can use different devices on the same MIDI cable.
Modern synths, called "multitimbral", sort out data by channel, assign to different sounds in the instrument.
Channel number = 0000 (zero) to 1111 (15). Second half of command byte. But we call them 1 to 16.
Note on: Command byte (144-159) followed by two data bytes (0-127: note number, key velocity=how fast the key moves from top to bottom)
Note off: Command byte (128-143) + note number + velocity. Why note-off velocity?
Continuous Controllers: (176-191) + controller number (mod wheel, volume,
pan, sustain) + value
127 possible controllers per channel.
Many controllers defined, some as transmitters (mod wheel=1), some as receivers (volume=7), some as both (sustain pedal=64).
Others that are defined: Stereo pan=10, Foot pedal=4, Data slider=6
Many others loosely or not defined.
Volume vs. velocity
Important to note the difference between velocity byte in note-on command
(which affects onset of note only) and volume controller (#7) (can affect sound continuously). Velocity=how loud the instrument is played. Volume=how high
the fader is.
Program change: (192-207)
+ single data byte=value. Program change numbers are 0-127, often but not
always called 1-128. Calls up a register in the synth's memory. (Reason doesn’t
respond to this)
Pitchbend: (224-239) + two data bytes: Most significant byte (MSB) + Least Significant Byte (LSB). Designers wanted “double precision” so that when [tich wheel was moved you didn’t hear discrete pitches. So possible values are 0 to (128*128)-1=65,383. Turns out it wasn’t necessary: LSB is almost always ignored. But it must be there anyway.
"Zero pitch bend" is actually a value of 64 (MSB). Many sequencing programs describe pitchbend as +/-64, but in reality the values are 0-127.
Channel pressure/aftertouch: (208-223) + single data byte=value. Amount of pressure on keys after the note is played. Used for vibrato, filters, pitch change, etc.
Key pressure/polyphonic aftertouch: (160-175) + note number + value. Individual pressure values for each key. Originally quite rarely used: expensive to implement, complex to program, uses a lot of bandwidth, but now more feasible
1) What is
music? Working definition: Sound that is created deliberately, and has interest
2) The elements of music: melody, rhythm/tempo, harmony, timbre/orchestration.
3) What's a gesture controller? Something that responds to a physical action by one (or more) human beings. Examples: Squeeze, blow, pluck, bow, hit with hand or foot or stick, press with fingers.
An electronic musical instrument uses gestures to control electronic circuits.
Can be simple (direct) like theremin or complex (through microprocessor) like Wriggle Screamer
Computers provide ultimate flexibility: they can produce any sound, and interpret any gesture however we like, once we get the gestural information into the computer.
Links in the chain:
• Electronic sensors to detect gestures: touch, pressure/force, movement, acceleration, distance, displacement
• Device to turn data from sensors into MIDI: Arduinos, MIDItron, Bluetooth and USB devices
• Software to interpret and process the MIDI data: Max
• Synthesis software to turn the processed MIDI into sound: Reason
• Audio system to produce the sound
What we will do in the class:
• Study existing electronic instruments, see them demonstrated live and on video
• Conceptualize physical gestures as they can be used to make music
• Learn MIDI, what the commands mean, how they can be used to control music
• Learn Reason, a software synthesis system, and how to use its parameters
• Translate gestures into electronic form, using sensors, and then translate them into MIDI using Arduinos and MIDItrons
• Look at data from other real-time control devices—Bluetooth and USB—and translate it into MIDI
• Process real-time MIDI data with MAX
• Build new controllers and systems
• at the end, do a public demonstration