The Laser Harp - Tufts University
Transcript of The Laser Harp - Tufts University
Douglas Simmons Group: Dana Price and Ed Vitiello
EMID ES 95, Lehrman
The Laser Harp
The Concept: The original idea was to build a harp with lasers replacing the strings. Instead of
plucking a string the player would break a laser beam, how futuristic. We also wanted to
include several other controllers to change other parameters. Some of our original ideas
were ribbon sensors to control pitch bend or modulation, switches to change the octave
range, and switches to control different background sequences.
Software: Note Logic:
The photocell on the harp sends in controller data values to Max based on how
much light is in contact with its surface. With the laser pointers powered on there is a
base value coming in to Max, say 25 for example, and when the beam is broken it jumps
up to about 98.
So the basic idea of triggering notes becomes simple, play a note every time the
incoming value is greater than the base value. However, if any electrical noise causes
that base value to fluctuate then a note would be played. To solve this problem a
specified value was added to the base value, say 6, to act as a filter and ensure that notes
were only being played when the beam was broken.
This is how the original note logic was setup, except there was a major flaw. The
flaw is that when your finger breaks the beam, the incoming value is not constant, it
fluctuates. Therefore a makenote is triggered every time that number changes, regardless
of whether you have removed your finger from the beams path. What the program
should be doing is triggering a makenote the first time the incoming value crosses the
threshold and not sending another one until the value has dropped back below the
threshold.
The code on the right does just that. What it is doing is actually changing the
threshold value that the incoming value is being compared to. So when an incoming
value is higher than 32 a note is triggered, and the number in the > object is changed to
200. No values from the photocell will be above 200 and therefore the >
object will never evaluate true, keeping more notes from being
triggered. Then, when the incoming value drops back below the
original threshold, 32, the number in the > object changes from 200 back to
32, setting up the code to trigger another note.
This code was then used to control a clocker that would time how long
your finger was breaking the laser beam. When the threshold value is
changed to 200 the timer starts, and when it drops back down it stops. That
timer value is then scaled to 0 to 127 and sent to a bendout. However one
key aspect in the scaling is that the output is negative until 800 milliseconds.
That way the pitch bend does not start until after you have held your finger
in the beam for .8 seconds, giving the player time to move there finger if
they do not want to bend a particular note. Also, the switch at the bottom
makes sure the value going to the bendout never exceeds 127.
Calibrate Threshold:
The incoming base value for each sensor was not always same. So a sub
patch was written so the value of the threshold could be calculated automatically
based on the incoming value, instead of having to change each one manually.
LFO and Sustain Button Logic:
When one of the six buttons shown above is hit, it sends out controller data to
Max. Each button sends out a different value and that value is then mapped to a musical
parameter. When a controller value enters it Max it is compared to see if it fits within a
specified range. If that comparison evaluates true then a number, between 0 and 127, is
sent out. The code to accomplish this is shown below.
Scale and Octave Selection:
Three buttons on the front of the harp control which scale is being played by the
harp. The logic in Max first decides which button has been pushed and sends a bang to
one of three lines of code, shown below.
This then triggers those specified numbers to be added to a base note of 60, and this is
what gives the final note values for each scale. Shown below are the final note values for
the chromatic scale.
To change the octave up and down, the foot switch was simply wired to change the base
note up by 12 or down by 12.
Sequencing:
We wanted to have background sequences that would accompany the player and
could be controlled from the harp. Three sequences were put together in Reason that the
player could play over. Buttons on the front edge of the harp control which sequence is
loaded and a foot switch on the floor starts and stops the sequences when the player
wishes.
Ribbon Sensor:
Originally we wanted two ribbon sensors on either side of the photocells for
changing parameters on the fly. The sensors were made of two strips of conductive
plastic. Leads were attached to each end of each strip and the strips were taped together,
conductive sides facing each other.
However we could not get our homemade ribbon sensors to give us reliable data.
All of the output data was extremely noisy, fluctuating between as many as 15 values and
the point on the ribbon did not always produce the same number. Two different
prototypes were constructed and several different circuit setups with the op-amp were
tried only to no avail. We were then forced to scrap the ribbon sensors and replace them
with switches.
My Particular Responsibilities:
- Construct wiring for six buttons on either side of photo cells and program logic for
buttons to control LFO amount and note duration.
- Program logic to output notes when laser beam is broken and bend note when beam is
broken for specified amount of time.
- Construct ribbon sensors and get them to output reliable data. (did not work)
- Program potentiometer knob to control master volume.
- Program foot pedal to control modulation wheel.
- Have pieces of metal for body cut by machine shop.
Summary of What Harp Does:
- When laser beam is broken a single note plays
o if beam is held broken for longer then .8 seconds the note will bend
- Set of six buttons changes LFO amount at six discrete settings
- Set of six buttons changes note duration at six discrete settings
- Three buttons on front face select between three different scales
- Three buttons on front face select between three different sequences
o foot switch on floor starts and stops sequences
- Knob on front face controls master volume
- Foot pedal controls modulation wheel
o wheel set to control filter frequency
- Foot switches change range of harp up one octave and down one octave
Some Pictures of Final Product:
Hardware and Wiring Appendix: Description The Laser Harp is built with 12 photocells, 12 laser pointers, resistors (for divider circuits) and assorted switches, pots and push buttons. Power requirements are 5Vdc at 500 Ma. Controls are shown below: Front Panel Controls
Floor Controls
Harp Controls 12 photocells for generating notes by breaking the beam of light with your finger left side 6-switch row for controlling note duration right side 6-switch row for controlling LFO amount
Power On/Off
Load Song #1 Load Song #2 Load Song #3
Blues Scale Diatonic Scale
not used
5 VDC
Sequence Select
Scale Select
Power On/Off
Load Song #1 Load Song #2 Load Song #3
Diatonic Scale
not used
5 VDC
Sequence Select
Scale Select
volume
Chromatic Scale
Octave U
p
Octave Down
Play Stop
Up
Octave Down
Play Stop
Modulation Wheel
Wiring Information
Control Name
Type Cable Pair wire size
(awg)
Cable Color Doepfer Connect
MAX Control
Analog Control Signals +5 VDC +5Vdc Power blk/white1 22 blk -> red1 5VDC n/a GND Ground blk/red 22 black GND n/a PC-1 photocell/note 1 brown/white 24 brown/white JP1-9 ctlin 8 PC-2 photocell/note 2 white/brown 24 white/brown JP1-12 ctlin 11 PC-3 photocell/note 3 green/white 24 green/white JP1-4 ctlin 3 PC-4 photocell/note 4 white/green 24 white/green JP1-7 ctlin 6 PC-5 photocell/note 5 blue/white 24 blue/white JP1-10 ctlin 9 PC-6 photocell/note 6 white/blue 24 white/blue JP1-5 ctlin 4 PC-7 photocell/note 7 orange/white 24 orange/white JP1-2 ctlin 1 PC-8 photocell/note 8 white/orange 24 white/orange JP1-6 ctlin 5 PC-9 photocell/note 9 yellow/blk 22 yellow JP1-1 ctlin 0 PC-10 photocell/note 10 yellow/blk 22 black JP1-8 ctlin 7 PC-11 photocell/note 11 blue/blk 22 blue JP1-3 ctlin 2 PC-12 photocell/note 12 blue/blk 22 blk JP1-11 ctlin 10 VC-1 volume control 1 blk/orange 22 orange JP1-13 ctlin 12 VC-2 volume pedal brown/black 22 JP1-15 ctlin 14 VC-3 not used (spare) n/a 22 n/a n/a n/a MC-1 left 6-switch row brown/black 22 brown JP1-14 ctlin 13 MC-2 right 6-switch row brown/black 22 black JP1-16 ctlin 15 Digital (Switch Input) Control Signals PB1.C PB-1 Common blk/red 22 red JP6-COM (+5V) n/a SW-1 1 of 3 seq select black/white 22 white JPx-3 note notein 2 SW-2 2 of 3 seq select black/white 22 black JPx-1 note notein 0 SW-3 3 of 3 seq select black/green 22 black JPx-5 note notein 4 SW-4 1 of 3 scale select black/green 22 green JPx-7 note notein 6 SW-5 2 of 3 scale select red/green 22 green JPx-11 note notein 10 SW-6 3 of 3 scale select red/green 22 red JPx-9 note notein 8 SW-7 Play/Stop 22 JPx-13 note notein 12 SW-8 Octave UP 22 JPx-2 note notein 1 SW-9 Octave DOWN 22 JPx-15 note notein 14
Notes: (1) 5VDC doepfer signal is connected only to the volume pedal floor switch.
All other 5V power is from an external supply.
Schematics
Harp Photocells and Front Panel Volume Control
Harp left side 6-button switch row
Harp right side 6-button switch row
Front Panel Switches Floor Switch and Volume Pedal
+5 VDC
GND
1K ohm
Photocell #1 ≈
ctlin 1 1K ohm
Photocell #2 ≈
ctlin 2 1K ohm
Photocell #3 ≈
ctlin 3 1K ohm
Photocell #11 ≈
ctlin 11 1K ohm
Photocell #12 ≈
ctlin 12 VC1 10k pot