How Laser Harps Use Photodiodes to Trigger MIDI
A laser harp functions as an optical musical interface where projected beams of light replace traditional vibrating strings. When a performer blocks a beam, an integrated photodiode interruption sensor registers the sudden change in light levels, prompting an onboard microcontroller to process the event and output standardized Musical Instrument Digital Interface (MIDI) messages. These digital commands are instantly transmitted to external synthesizers, samplers, or computers, which generate the corresponding audible tones.
The Optical Sensing Circuit
In a closed-frame laser harp system, a series of laser diodes project individual beams toward a corresponding array of photodiode sensors positioned opposite the light sources. A photodiode is a semiconductor device that converts photons into electrical current. Under normal conditions, continuous laser exposure keeps the photodiode in a fully saturated conductive state, generating a constant electrical signal.
When a musician places a hand into the path of a beam, the physical obstruction interrupts the light path. Deprived of the laser beam's photons, the photodiode experiences an immediate voltage or current drop. This sharp transition acts as a binary trigger mechanism, transitioning the circuit from a "beam open" state to a "beam blocked" state.
Signal Conditioning and Logic Conversion
Because ambient light and beam scattering can cause minor fluctuations in sensor readings, the raw electrical output of the photodiode must be conditioned before a processor can read it reliably.
The photodiode output is routed through a signal conditioning circuit, typically utilizing an operational amplifier (op-amp) configured as a comparator. The comparator evaluates the photodiode’s voltage against a predefined threshold voltage. When laser light is present, the comparator outputs a logic low (or high, depending on circuit architecture); when the hand interrupts the beam and drops the voltage below the threshold, the comparator instantly switches states to output a clean, jitter-free digital logic pulse.
Microcontroller Processing
The digital pulses from the sensor array feed directly into the digital input pins or interrupt lines of a microcontroller, such as an Arduino, ARM Cortex, or specialized microprocessor.
The microcontroller runs firmware that continuously scans the sensor inputs or waits for a hardware interrupt. Each photodiode corresponds to an assigned input pin mapped to a specific musical note:
- Interruption Event: When the microcontroller detects the logic change representing a blocked beam, it correlates the triggered pin with a preprogrammed MIDI note number (e.g., C4, D4, E4).
- Velocity Calculation: Simple harps use a static velocity value (volume), while advanced setups measure the duration between the initial partial break and full beam cutoff to approximate striking force, assigning a dynamic velocity between 1 and 127.
- Data Framing: The microcontroller formats this information into a standard three-byte MIDI "Note On" message consisting of the status byte (MIDI channel and command), the pitch byte (note value), and the velocity byte.
Triggering External MIDI Modules
Once assembled, the microcontroller serializes the MIDI data packet and transmits it via a physical 5-pin DIN port (using an optocoupled UART interface running at 31,250 baud) or via a USB-MIDI interface.
The signal arrives at the external sound module, digital audio workstation (DAW), or hardware synthesizer. The receiving module interprets the Note On command and immediately triggers its internal sound engine, synthesizing the assigned instrument sound.
When the performer lifts their hand, the laser path is restored. The photodiode returns to its saturated conductive state, the comparator toggles back, and the microcontroller detects the restoration of the beam. It immediately transmits a matching MIDI "Note Off" message, instructing the external module to stop sustaining the tone or begin its release envelope.