16 Voice Karplus-Strong MIDI Synth

Description

This is a MIDI controlled synth that implements 16 Karplus-Strong strings. The code is written in C.

  • This instrument's timbre is controlled by 6 MIDI continuous controllers:
    • Reflection filter Fc value (which determines how quickly harmonics are rolled off).
    • Linear damping factor which causes the waveform to decay linearly across the spectrum.
    • Pluck pulse filter Fc value. This controls filtering of the pluck pulse. The harmonics of this pulse are important for the starting timbre of the instrument at pluck time. The plucks can be hard and sharp or they can be soft and thump-like.
    • Pluck pulse length. This can change the initial harmonic structure from very mellow to twangy.
    • Sharpness control. This mixes the filtered loop data with raw loop data to limit the effect of the filter on both harmonic loss and sustain time.
    • Second harmonic control. This mixes the KS loop output with a waveshaped signal that is essentiall frequency doubled. It adds a sort of 12 string guitar like sound. Brightness is added this way.
  • Pitch bend is supported.
    The synth may be set for any of the usual bender ranges from 1 semitone up and 1 semitone down to 12 semitones up and 12 semitones down. This synthesizer also has the unique feature of accepting bender range settings that are not symmetrical such as up 3 and down 2. The bender logic contains a filter to smooth out jumpy data from a keyboard controller.
  • Velocity is supported and affects the instruments volume for each voice.
  • String restrike.
    This feature is quite desirable in a Karplus-Strong string model. When a natural string is struck and then restruck while still vibrating, the timbre can vary randomly. You've probably heard this effect in guitars, dulcimers and other plucked or struck string instruments. When the MIDI controller receives a new note on message, it first looks to see if a voice is already set up to play that pitch. Regardless of whether it is already vibrating, the string is struck or plucked again which will have the effect described above and makes the synth sound more natural.
  • Voice theft.
    Voice theft is often unavoidable. Voice theft is applied when a new note on message has arrived, but no unused voice is available for assignment. Voice theft in this synthesizer is done based on both a voice's pluck age and it's pitch. The higher the pitch and older the age, the more likely the voice is stolen due to the fact that it's amplitude will be the least or among the least as higher notes tend to die out a bit faster than lower notes. This makes voice theft largely unnoticed in performance.
  • Tuning.
    The Karplus-Strong method has a drawback regarding tuning. If simple integer length delay lines are used, especially higher notes can't be accurately tuned. This synthesizer overcomes that with DSP techniques so that a range of 8 octaves is provided with accurate tuning across the range.
  • Special Effect.
    The synthesizer has a 3 voice chorus effect with sine LFO. Speed and depth are controlled by MIDI continuous controller messages.

Musical Examples of the 16 String Karplus-Strong Instrument