Oscillator Bank

SourcesoscillatorbankModerate CPU

Divide-down organ — seven drawbar registrations of one note.

What it does

Divide-down organ — seven drawbar registrations of a single note.

Wraps daisysp::OscillatorBank. Rather than running seven oscillators, it derives four band-limited sawtooth gains from the seven drawbars and sums them, so the square registrations come out as differences between adjacent sawtooths — the same trick a divide-down organ plays in hardware. The registration array is written once at boot with a single SetAmplitudes call against a file-scope constant array; there are no per-bar ports because seven handles is not a node anyone can wire. The class also shifts the whole registration down an octave at a time as the fundamental rises, so the top footages fade out instead of aliasing.

Parameters

  • Registration

    amplitudes
    Default 0.8,0,0.5,0,0.3,0,0

    Seven drawbars, one per footage, in the order the DaisySP class fixes them: sawtooth and square at 8 foot, then 4, then 2, then a sawtooth at 1 foot. Eight foot is the pitch you played; each step up is an octave above it. Sawtooth bars sound bright and reedy, square bars hollow and clarinet-like, and mixing the two is what gives a divide-down organ its character. The bars are baked in at build time, not modulated per sample — Gain is the control that moves.

  • Gain

    gain
    Default 0.5Range 0 … 1

    Overall output level, applied by the DSP after the registrations are mixed. This is the level control the class was built with, and it is the one to reach for when a full registration gets loud — pulling the bars down changes the timbre, whereas this does not. A wired Gain input overrides this number at audio rate, which is how you play the tile with an envelope.

A divide-down organ: one note, seven fixed footages, a drawbar each. Freq sets the 8-foot pitch in Hz and is per-sample; so is Gain, so wire an envelope into it to play the tile. The drawbars themselves are baked in at build time. Raising several bars at once gets loud quickly — that is what Gain is for.

Ports

In

  • Freq frequency
  • Gain gain

Out

  • Audio Out output

Audio Control

Inputs

Freq
The 8-foot (lowest) pitch in Hz. Per-sample, so it is modulatable. Defaults to 440.
Gain
Overall output level, applied inside the DSP after the mix. Defaults to the Gain parameter.

Outputs

Audio Out
The mixed registrations.

Rules and gotchas

  • The drawbars are setup-time, not per-sample. They are baked into the generated C++ as a constant array, so the registration cannot change while the patch runs — Gain is the only level that moves.
  • Seven registrations is fixed by the DaisySP class, which holds a hard seven-element array. It is not a parameter and there is no larger version to switch to.
  • The bars are not normalised, unlike Harmonic Osc. The class mixes them as differences rather than a plain sum, so scaling them would not bound the output — use Gain, which is what the class provides for exactly this.
  • All bars at zero is allowed and emits silence, exactly as set. On hardware that is indistinguishable from a dead patch, so the Inspector warns when it happens — raise a bar before you flash rather than debugging the board.
  • Square registrations are derived, not synthesised. Raising a square bar with its neighbouring sawtooth bar down produces a different balance than you might expect from a standalone square oscillator; trust your ear over the label.
  • As Freq rises, the DSP shifts the whole registration down in octave steps so the top footages drop out rather than aliasing. High notes therefore sound progressively less bright, which is also what the real instrument does.