SYSTEM.ARCHIVE // LOGS

The Archive

A log of thoughts, esoteric tools, recommended reading, and unorganized debris from the production process.

Subscribe via RSS
← Back to Archive Index
2026-06-16 SYNTHESIS & EXPERIMENTAL DSP & ALGORITHMS MATH & UTILITIES

A Waveset Oscillator With Memory

Most oscillators produce a fixed waveform, and anything interesting about the timbre happens afterwards in filters and effects. I've been working on an oscillator that edits its own output as it goes, based on waveset distortion as Trevor Wishart describes it in Audible Design (1994) and as it's implemented in the Composers Desktop Project.

A waveset is the stretch of signal between two consecutive upward zero crossings (there's a longer explanation in the waveset distortion post). The oscillator watches its own output for those crossings, and each time one completes a waveset it makes a decision about what to do with it:

  • Repeat the waveset one or more times.
  • Reverse it in time.
  • Skip it, replacing it with silence of the same length.
  • Replace it with one from memory: the oscillator keeps a store of wavesets it has already produced, groups similar ones, and can substitute the average (centroid) of a group for the current one.

The replace step borrows from Nathan Ho's Audio Effects with Wavesets and K-Means Clustering, which does the same thing to recorded audio. Here it's applied to the oscillator's own output, so material from earlier in a note can come back later in it.

The aim is for the pitch to keep going while the waveform changes from the inside. That only holds as long as each waveset stays the length of one period. For a simple source waveform it does, but a waveform with extra zero crossings splits into several shorter wavesets per period, and a waveset recalled from memory may have been recorded at a different pitch. Both need resampling to the current period, or the pitch drifts.

It's related to wavetable synthesis, where the table is being rewritten every cycle from the oscillator's own history, and to granular synthesis with grains cut at zero crossings, but it isn't quite either. I don't know yet whether it's a useful instrument or a curiosity; that's what I'm building it to find out.