Skip to main content

Stoner guitar

A playable fuzz guitar for the Strudel Editor, since generalised into the instrument kinds, built from a physical model rather than recordings or generated audio.

Why a model and not generated audio​

An instrument has to hold its pitch and its timbre across the whole range, because a pattern plays a melody on it. Audio generated by a model such as Lyria gives clips whose pitch drifts and whose timbre changes from clip to clip, so a riff built from them wobbles and each note sounds like a different guitar. A physical model is the same instrument every time, tunes exactly, and costs no download. Generated audio is left out; the only AI step is an optional assistant that turns words into the five tone settings.

The routes weighed before building, and why each was or was not taken:

RouteWhat it isTaken
Strudel synth rendera pattern of built-in synths rendered per noteno: no fuzz or cabinet character
Physical modela plucked string, a fuzz and a cabinet computed in the browseryes, as the instrument
Found object resamplinga recorded everyday sound looped and mapped across the keysno: needs recording, wrong genre
Generated clips, sliceda music model's clip cut at its onsets and named by detected pitchno: pitch and timbre drift between clips
Generated speecha text to speech model for voices and choirsno: not an instrument
Model as sound designera language model turns words into the model's knob settingsyes, as the optional tone assistant
Model as listener, spectral fita model judges renders, or a clip's partials tune the modelnot yet: needs the first two working first

Why chords are rendered whole​

A fuzz is a nonlinear stage. Fed three strings together, it produces tones at the sums and differences of their frequencies, and that intermodulation is what makes a distorted power chord sound thick and slightly rough. Distorting each note alone and adding the results gives three clean fuzzed notes that do not interact, which sounds thin and wrong. So the strings of a chord are strummed and summed first, and the sum goes through the fuzz. The consequence is that a chord cannot be built in the pattern from single notes, so the chord is its own sampled sound.

The signal chain​

flowchart LR
A[Noise burst, one period long] --> B[Pick position comb]
B --> C[String loop with fractional delay and damping]
C --> D[Strum and sum the strings]
D --> E[Low end boost]
E --> F[Clipping stage one, asymmetric]
F --> G[Clipping stage two]
G --> H[Mids and treble tone stack]
H --> I[Cabinet]
I --> J[Two takes left and right]
J --> K[Fades and peak at minus one decibel]

Each string is an extended Karplus-Strong loop. The loss per pass is set from a decay time, so a low string and a high string ring for the same number of seconds. A palm mute shortens that time sharply and darkens the output. The fuzz is modelled on a Big Muff: a bass boost ahead of two clipping stages, the first asymmetric so it adds even harmonics, both run at twice the sample rate to keep aliasing hiss down. The cabinet is a closed back thump near 110 Hz and a steep roll off near 5 kHz. Two takes with different noise and a few cents of tuning apart go hard left and hard right, the way a rhythm guitar is double tracked.

How the sounds reach the sampler​

The sounds are sampled every three semitones, so the sampler never repitches one by more than a semitone and a half and the fuzz character does not shift with pitch. They are rendered in a worker as WAV files, handed to the sampler as blob addresses, and registered under a tag that the sounds tab uses to group them. A new tone renders new blobs, which also avoids the sampler's cache of old addresses, and the old blobs are released afterwards.

Measurements​

CheckResult
Render of the whole bankabout 2 seconds in Node for 80 seconds of stereo audio
Instruments tab ready after load3.4 seconds including the page load, in headless Chromium
One chord, exportedno lead silence, first sample 0, mids 2 dB under the bass band
Energy above 5 kHzair band about 35 dB under the bass band, as the cabinet intends
Example song, 53 secondstrue peak -1.1 dBFS, lead silence 0 ms, harmony check clean

A fuzz that is already clipping hard at low drive makes the drive slider do very little, so the drive range starts below unity gain. Peak level of a clipped signal after the cabinet filters is no guide to crest factor: filtering the squared off wave makes it ring, so the compression test uses the raw plucked string.

None of this says it sounds good. The tone settings were set from measurements and the defaults need a listening pass.