Skip to content

Editing DSP While It Plays

A dsp block is code you can change while you hear it. Running an edited dsp effect or dsp instrument does not stop the transport or rebuild the track: the new code takes over the running instance. This page explains how, and where that stops.

When you run an edited body, resonon compiles it and crossfades the running instance into it over 10 ms — short enough to feel instant, long enough not to click. Every live instance of that block takes the edit, wherever it sits in the graph. Selecting just the dsp effect { … } block is enough; running the whole scene applies the same edit once.

For an instrument, the notes that are sounding carry over into the new version and are crossfaded with it, so an edit in the middle of a note doesn’t cut it.

The slot is not torn down, so everything attached to it stays:

  • Parameter values. A knob you turned stays where you put it. The default in the source seeds a new instance; it does not reset a live one.
  • Modulation. Signals and automation bound to its parameters keep running.
  • Connections. An effect’s sidechain inputs stay connected.
  • State, by name. A state or voice state in the new code continues from the value it had under the same name in the old code. One that you add starts at its initial value.

Two kinds of edit leave the old values with nowhere to go:

  • changing the parameter set — adding, removing or renaming a param;
  • changing an effect’s inputs and outputs.

What happens then depends on what you ran. Running only the body leaves the running instance alone and warns you. Running the placement line — track.set_effects(…) or track.set_instrument(…) — rebuilds the slot from the source’s defaults, audible as a restart rather than a fade; a replaced instrument fades out over 10 ms instead of clicking.

The placement line owns the slot, the body owns the code

Section titled “The placement line owns the slot, the body owns the code”

That split is deliberate. A bare edit to a body should never throw away the knob positions, modulation and state you have built up in a set, so it only ever changes code. Replacing an instance is a bigger gesture, and it belongs to the line that placed it.

It follows from how placement works in general: a constructor like Crush("crush") or Synth() only describes an effect or instrument, and .set_effects() or .set_instrument() is what builds it (see A constructor is a description). Running the whole block again, placement line included, re-attaches to what is already running, so nothing is compiled or loaded twice.