String: Description

String: the last of the OP-1's many and varied synthesis engines to be covered in this initial run of blog posts.

I'd like to thank everyone who has offered encouragement and appreciation (and suggestions and corrections!) on the forums; this has been a considerable effort and, while it's generally fun work, it's nice to know that I'm not the only one who's interested in such minutia.

At any rate, with the end in sight -- at least the end of this initial pass through the marvelous, wonderful world that is the OP-1 -- let's press on and take a look at String.




The manual (from whence -- or just whence if you're one of those types -- the above graphic came) claims that String's method of synthesis is "Waveguide string model".

This nomenclature suggests that String is using digital waveguide synthesis; I'm convinced that String is in fact using Karplus-Strong synthesis, which is a subset (and progenitor) of the more general digital waveguide model.

While technically they may be correct -- after all, a square is a rectangle -- I think it's more useful and illuminating to be precise in this case and thus to consider String as a KS synthesis engine. It doesn't seem to be using any of the more complex capabilities provided by the more general digital waveguide model, so nothing is lost by this shift of nomenclature, and instead we gain clarity and simplicity: a worthwhile trade.

So: what is Karplus-Strong?

While I'm far from an expert on the subject, I have managed to glean some basic information from the internet, that most wonderful of all possible fonts of wisdom; here are a few links for your perusal:
http://en.wikipedia.org/wiki/Karplus%E2%80%93Strong_string_synthesis
http://cnx.org/content/m15489/latest/
http://blog.andre-michelle.com/2009/karplus-strong-algorithm/

The basic idea, for those of you who would rather read a poorly paraphrased precis rather than read Wikipedia directly, is that the vibration of a string is modeled as an iterative feedback process.

Imagine a sample in memory, representing a single cycle/period of a wave. If we allow a "playhead" to scan across this wave and play it, we get an infinite sustained sound of constant timbre. However, if between passes of the playhead we filter the wave in-place -- that is to say, destructively modify the wave by running it through a lowpass filter -- then we get a sound which gradually decays over time, becoming smooth and soft.

Surprisingly, this very simple model is a useful approximation of the behaviour of a vibrating string! The filter models the energy loss which calms down the vibrating string: friction/damping between string and air, string and body, and the internal forces at work in the string.

This method of synthesis, basic and minimal though it may seem, can produce some very convincing stringed-instrument sounds. The properties of the initial state of the sample can be varied to model different types of initial excitation of the string (being plucked, strummed, bowed, etc.) while the properties of the filter can be varied to model the thickness, tension, and other material parameters of the string.

In the case of String, this modelling metaphor (excited strings vibrating) is depicted visually: the majority of the display is taken up by a set of vibrating strings, whose movement illustrates the action of the synth.

So, now that we have a basic understanding of KS synthesis: how does this specific implementation of it, String, work?


Blue ("Tension"):
This parameter seems to control the "strength" of the lowpass filter (the cutoff and/or the slope), which affects both the decay time and timbre/spectrum of the resulting sound.

As you turn the encoder CW, the filter becomes more pronounced (again, by lowering the cutoff and/or steepening the slope); as the virtual tension is increased the vibrations in the virtual string are increasingly damped. Low tension values tend to produce longer, louder bright and buzzy sounds while high values result in short, sharp muted sounds.

At maximum tension (Blue fully CW), the sound starts to go a bit flat. This is a common phenomenon I've observed in many digital filters with strong slope and low cutoff (especially with fast downward-sweeping cutoffs); I have no idea whether it's due to some fundamental behaviour inherent to filters, or some side-effect of their particular digital implementation, but anyway: it happens here as well.

This parameter also has an indirect effect on the volume of the output; since it controls the strength of a non-resonant filter, and such a filter will always remove components of a signal, heavier filtering results in a sound which is perceived as not only less bright, but also less loud.

Visually, Blue is the most indirectly displayed of all of String's four parameters: the length of the virtual strings is altered slightly, so that at low values they sag perceptibly and vibrate more violently, while increasing values cause them to straighten and vibrate less -- an apt metaphor for the action of this parameter.


Green ("Impulse Decay"):
This parameter seems to control the length of the initial impulse (typically a burst of noise in KS synthesis) which is used to excite the string. I'm guessing that this control alters the slope of a downward ramp modulating the volume of the impulse -- a decaying envelope which gets slower and longer as you turn the control CW.

At small values (CCW), this results in a more plucked sound while larger CW values produce a more bowed or blown sound; at its maximum setting you can very easily hear the burst of noise.

As with Blue, this parameter indirectly alters the volume of the notes played; the longer the impulse is, the more energy is being added to the string, and the louder the subsequent sound becomes. The effect is still primarily one of changing timbre rather than changing volume though.

The current value of this parameter is displayed directly using a single-barred bar graph: the minimum and maximum values are labelled and adjusting Green causes the bar to change height.


White ("Detune"):
As far as I can tell, this parameter controls a phase offset rather than a detuning as the name suggests: the signal coming from the filter (the virtual string) is sampled twice at slightly different points in time.

If you imagine the output of the filter/string as being a region of tape passing beneath two playheads, this parameter adjusts the space between the playheads, resulting in two waves whose pitch is the same but whose phase is shifted relative to each other. This causes some frequencies to cancel out while others are reinforced, and sounds like a phasing or comb-filtering type of effect.

At the minimum, fully CCW value, both waves are perfectly aligned and heard as one. As you turn White CW, the phase offset between the two waves increases until at the maximum fully CW setting, they are 180 degrees out of phase. This results in the fundamentals being cancelled out, and as a result the perceived pitch jumps up by an octave; please read the section titled "Just a Phase" in this helpful article for a more thorough explanation of this phenomenon.

By adjusting White or animating it (manually or via LFO), you can produce a wide array of subtle timbral changes and movement.

Visually, this parameter is represented as two small white shapes; I think of them as microphones which are tapping the string's signal at different points along the string. As White is turned from minimum to maximum, the microphones move together from opposite ends of the virtual strings to meet in the middle. This is somewhat confusing as it's the exact opposite of what's really happening (i.e two co-located microphones suggests zero phase shift, while here it represents maximum phase shift), but that's a matter better addressed in the next blog post.


Orange ("Impulse Type"):
The final parameter of Phase seems to control the colour of the impulse noise used to excite the string; I would guess that it controls a lowpass filter applied to a white noise source, so that at lower CCW values the impulse is duller (pink noise) while turning Orange CW allows more high frequency content through and makes the impulse brighter (white noise).

Aurally the effect is akin to "pick hardness", i.e lower values produce sounds which resemble the string being struck or plucked by a softer material (perhaps a finger) while higher values sound like a harder material (perhaps the nail at the end of a finger).

Visually, as with Green this parameter is represented directly as a line-graph/bar-chart, where the current height of the coloured region indicates the parameter's current value, and the minimum and maximum possible values are demarcated.


Summary
Something that bears mentioning is that the level of each note generated by String seems to vary randomly, in a way that doesn't seem correlated to any of the parameters. It's possible that such behaviour is inherent in the nature of KS synthesis, because the impulse is random -- noise -- and so the precise level of each particular frequency in the spectrum may vary from note to note, causing small variations in the resulting tone and level. At least, that's my best guess -- it's possible that Teenage Engineering have simply added some small hidden random modulation at some point(s) in the signal path in order to liven things up and make them more organic and natural-sounding.

Hopefully this has been an illuminating description of the String synth engine; as always all statements should be taken as opinion or speculation, as I have absolutely no solid evidence to back up any of these claims -- it's all supposition and assumption.

String is a very useful addition to the OP-1's synthesis arsenal, capable of generating all sorts of string sounds, from plucked to bowed, subtle and light to heavy and aggressive; hopefully this brief overview has provided some amount of insight into it's plucky world.


As always, if you have any feedback at all about this article -- have I made any egregious errors? -- , or would simply like to chat or share information about String, please visit this forum thread: http://ohpeewon.com/discussion/239/op-101-string