The other day I was listening to Autechre’s Quaristice and thinking about my first perceptions of the album. I remember thinking “This album has a very physical-modeling feel to it”. I had forgotten about this, and recently I was playing around with Karplus-Strong string-modelling synthesis, after reading about the methodology behind it.

The opening of Autechre’s 90101-5l-l has these gorgeous rich resonating tones, which I accidentally seemed to be able to replicate with a Karplus-Strong model. It sounds like they are capturing an incoming audio stream and then thrusting a noise-grain into a Karplus-Strong algorithm. (There’s more going on in there, but this seems to be the basis.)

Autechre – 90101-5l-l (Quaristsice)

Example of Noise-Grain Feedback using Karplus Strong Plucked String Synthesis Methods



In simple terms, Karplus-Strong tones are generated by taking a burst of noise, and creating a feedback loop that repeatedly lowpass-filters the noise and scales the volume back slightly.

The combination of each of these factors plays a part in the resulting tone:

The brighter the burst of noise, the brighter the attack and note.

The loop time determines the pitch (shorter = higher, longer = lower)

The amount of filtering determines the length and life of the note.

Kind of like concatenative synthesis with a recursive function applied to each grain.

So, for fun I was trying to make a synth that would generate tones using this noise-based feedback model using Max.

In order to generate a specific tones, I was basing my pitches on the relationship:

F 0 = F S / Z-L

That is, the fundamental frequency (F 0 ) is determined by the sample rate (F S ) divided by the length of the delay line in samples (Z-L). Put simply, the number of times the delay line is read through per second is its frequency in Hz.

My first versions suffered from a very strange thing where the pitch accuracy was shockingly bad. I was getting weird results where tones were getting more out of tune the higher they went.

The first problem is that I was using a [delay~] delay line with integer sample-length delays. Who would have thought that something that was ‘sample accurate’ could be a bad thing?

I realised later that it was bad because the generated tones were inversely proportional to the sample rate and that the values were being truncated to integer lengths. When the length of the delay was long, the pitch was moderately accurate. However, as the sample length got shorter, the pitch went way out.

The reason why this is bad is quite interesting. Consider that we are working at a sampling rate of 44100 Hz.

What tone will be generated if we use a delay line consisting of 5 samples?

44100 / 5 = 8820Hz

What about a delay line of 4 samples?

44100 / 4 = 11025Hz

This is a big problem. As the frequency that we are trying to generate gets higher, the less range we have in discrete tones.

At first, this appeared to be a sample rate issue. If we increase the sample rate we should be able to get finer tone control. However, doubling it means that we can get only one new pitch between the two we got at 44100.

88200 / 9 = 9800Hz

This is still not that good. My solution was to make an abstraction and try some ridiculous upsampling with [poly~]. With this, understandably came a hit to my CPU. The solution was still not all that good, as only one single new pitch could be attained between the previously possible tones each time the sampling was doubled.

This had been puzzling me for about a week until I decided to drop [delay~] for [tapin~]. Amazingly, [tapin~] allows fractional sample length delays, as it does subsample interpolation when given a signal as its delay time.

The following is an example of the nature of the low-pass roll-off effect. The clip starts with a fairly moderate low-pass filter (centred around 1500Hz) that is slowly opened up until it is barely filtering the delay line. As the filter starts out strongly attenuating, the note is quickly damped, and demonstrates a transition from:

Muted > Damped > Koto > Plucked Bass > Slap Bass > Harpsichord > Non-Realistic Model of a Resonating String.

[Examples of Simple Plucked String Synthesis with a Relatively Bright Pink Noise Excitation.]

A simple version of the patch can be downloaded here: Karplus-Strong example