Skip to content

rainbow-carrots/subsnake

Repository files navigation

subsnake

subsnake is a polyphonic virtual analog subtractive synthesizer, written in python.

what's it do?

well, i'm glad you asked.

  • it has 16 voices of polyphony
  • it supports midi (input)
  • it can save & load patches
  • it can record, overdub, play, loop, & save audio

what's in a voice?

  • 3 sine, triangle, sawtooth, or pulse oscillators with pitch, detune, level & width controls | 2 algorithms (BLIT, polyBLEP)
  • 1 state-variable filter with resonance, saturation & drive | 2 types (canonical Chamberlin, ZDF-solved Chamberlin)
  • 2 ADSR envelopes - one for amplitude, one for filter frequency (with bipolar depth control) | .004-4s per stage
  • 4 modulators - 2 LFOs, 2 AR envelopes, with dedicated assignable attenuverters for every parameter
    • LFO shapes: sine, triangle, ramp, sawtooth, square, sample & hold
      • 0.01-10Hz w/ controllable phase shift
    • env. modes: attack-release, attack-hold-release, loop (attack-release)
      • .01-1s per stage

there's also a stereo tape delay effect on the master bus (voice output + recorder), and a stereo audio recorder/looper with continuous overdubbing.

what's the midi like?

  • it supports device & channel selection, with note-on velocity (linear curve)
  • cc's can be added & removed, and freely assigned to control any parameter
    • parameter updates are reflected visually, so the sliders & displays remain in sync with cc's
  • gate on/off events use sample-accurate timing (works well with sequencers)

how's the modulation?

  • every parameter has a dedicated bipolar modulation control (the small knobs left of each slider)
  • right clicking a knob changes the assigned modulator (and color)
    • none (disconnected) -> lfo1 -> lfo2 -> menv1 -> menv2 -> back to none
  • left clicking a knob and dragging up/down will increase/decrease the modulation amount
  • double clicking any knob will reset the modulation amount to 0.0 (centered)

is there anything else?

  • to reset a parameter, double click the parameter display (to the right of each slider)
  • the keys A-' are mapped chromatically and can trigger note events (fixed velocity)
    • to shift the pc keyboard octave range up/down, use the +/- keys, respectively
    • you can set the pc keyboard velocity (0-127) from the synth settings panel
  • to switch between oscillator types (BLIT/polyBLEP), right click the oscillator title box
  • to switch between filter types (Chamberlin/ZDF), right click the filter title box
  • the filter & oscillator type selections are saved with the patch (& restored on load)
  • the width parameter will have a different effect, depending on the selected shape:
    • sine: crossfades between silence at both extremes (center is full volume)
    • triangle: morphs the waveform from a sawtooth (w≈0.0), through a triangle (w=0.5), to a ramp (w≈1.0)
    • saw: crossfades between a saw & a second (free-running) saw at twice the fundamental (center is full fundamental)
    • pulse: bog-standard through-zero PWM
  • each oscillator is paired with a stereo panner, allowing for precise placement (or modulation) across the stereo field
  • filter key tracking & oscillator drift can be configured (per patch) via the synth settings menu
  • the stereo delay can be made into a pitch-shifting delay (or pseudo-chorus) by modulating the time parameter with an LFO

how can i play it?

  • v0.4.1 is the latest build
  • click on the version that corresponds to your platform to download the zip, extract, & run! if it doesn't open:
    • on linux: right click the file, go to Properties -> Permissions, and make sure "Allow executing file as program" is checked
    • on macos: you'll need to authorize the app when running it for the first time. go to System Settings -> Privacy & Security, scroll down to the bottom, and choose Open anyway (under Security)
    • on windows: click More info on the smartscreen popup and choose Run anyway
  • note: on first load, it may take 1-2 minutes for the initial numba compilation step to complete.
  • note: this project is in active development. though I test every build prior to release, you may still encounter bugs.

what else is planned?

  • save & auto-restore midi settings (channel, cc's, parameter mappings)
  • recorder settings panel:
    • adjustable loop start/end points
    • input level control (currently fixed)
    • playback speed control
  • synth settings panel:
    • voice stacking & spread
  • oscillators:
    • noise module
    • more algorithms
      • LP-BLIT implementation
      • VOSIM implementation
      • anti-aliased wavetable oscillator
  • modulators:
    • make LFOs anti-aliased (for audio-rate mod.)
    • increase max. LFO rate to audio range
    • additional LFO modes:
      • reset phase on gate
      • key pitch tracking (w/ ratio)
  • effects:
    • stereo delay
      • add ping pong & dampening parameters
    • stereo chorus
    • algorithmic reverb
    • combine effects into single stack
  • isorhythmic pattern generator/sequencer
  • Lissajous display mode for scope
  • more patches :3