The Harpie

Description

The Harpie is an 8 voice Karplus-Strong string model synthesizer based on dsPIC technology. Three dsPICs are used together to form a synthesizer with two voice engines and a MIDI controller. The name comes from the fact that the instrument can sound very much like a gut string harp.

MIDI Controller

The MIDI controller receives MIDI data, assigns voices and manages gates. Since the message types to which the voice engines respond is limited to note on and note off, the MIDI controller is also responsible for filtering out ignored messages. This lightens the computational load on the voice engines allowing them to process only that which is necessary to make sound.

Voice assignment consists of logic using a "gates" memory which is used to determine which voices are available. Part of the algorithm for deciding which voice is selected includes scanning the string models for any that are already set to the pitch of a newly received note on message. This feature provides two things:
1: A more realistic sound in that when the same pitch is played more than once on a real harp, the same string is reused. The Harpie does this whenever possible which results in fewer voices being stolen from another pitch. When a vibrating string is replucked, there is already wave information in the delay line. The pluck pulse modifies some of this data, so the new pluck can sound different just as it does with a real harp (or other struck or plucked string instrument).
2: Voice theft for new notes is limited and occurs when no matching pitch string can be found and when all voices are already in use. Unused voices are always used before sounding voices are stolen. The code is written in assembly language.

Voice Engine

Each voice engine supports 4 string models.
Each string model consists of:
  • A delay line approximately 2000 delay units long.
  • A single pole lowpass IIR filter to model wave reflection energy loss at higher frequencies.
  • A linear attenuation factor (damping) which helps to control the length of sustain.

The voice engines process the string models at 4 times oversampling with a DAC sample rate of 56.8182 kHz. Each voice engine dsPIC uses two pins for analog voltage inputs. These pins are connected to potentiometers that supply control voltages for Karplus-Strong parameters of reflection filter Fc and damping. The two voice engines monitor the same voltages. The pots can be manipulated at any time while the synthesizer is playing to control the timbre. Higher filter Fc voltages increase Fc which results in a more metallic timbre. Lower filter Fc voltages decrease filter Fc resulting in more harp-like sounds (at about 1/2 scale) and still lower voltages yield tuned drum-like sounds. The other volage controls linear signal attenuation. More signal attenuation gives a shorter sustain at all frequencies. Less signal attentuation gives longer sustain. Note that the filter Fc control also affects sustain, so the two are used together to attain the desired timbre.

Musical Examples of the Harpie Instrument