Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Convolution's Polytron Synth

This is a versatile Polytron Drum Synthesizer VST3 plugin built with Rust, nih-plug, and vizia. It is designed to be a powerful tool for crafting a wide range of kick sounds, from deep and clean 808s to aggressive, textured, and distorted kicks for modern electronic music.

screenshot

Features

The synthesizer is organized into four main sections, each controlling a different part of the sound generation process.

1. The Source (Generators)

This section is the heart of the kick sound, combining a classic pitch-swept sine wave with a flexible texture layer.

Core (Pitch)

The fundamental tone of the kick is shaped here.

  • Tune: Sets the fundamental frequency (the "note") of the kick.
  • Mode: Selects the oscillator waveform type. All modes stay within a low-harmonic, sub-focused character — think processed and filtered sine waves rather than raw harmonics:
    1. Sine: A pure sine wave. Clean, classic, full control.
    2. Octave: Sine blended with an octave-up partial (2×) at 50 %. Adds presence and punch in the 80–200 Hz sweep range. Both partials track the pitch envelope together.
    3. Fifth: Sine blended with a perfect fifth (1.5×) at 35 %. Gives a tuned, musical sub character — like a resonant body instead of extra harmonics.
    4. Warm: Sine passed through a gentle tanh soft-clipper. Adds only odd harmonics (3rd ≈ 8 %, 5th ≈ 1 %), similar to the warmth of a lightly driven tube stage.
    5. Sub: Sine blended with a sub-octave (0.5×) at 40 %. Doubles the perceived low-end mass for deep, rumbling kicks.
  • Sweep: Controls the amount of downward pitch envelope. Higher values create a more pronounced "zap" or "click" at the start.
  • Decay: Determines how long it takes for the pitch to sweep from high to low.
  • Instability: Introduces subtle, analog-style pitch drift for a less sterile sound.

Texture

This module adds a secondary layer of sound to the kick, perfect for creating unique character.

  • Amount: Blends the texture layer with the core sine wave.
  • Type: Selects from six different texture algorithms:
    1. Dust: A soft, filtered noise, like a dusty record.
    2. Crackle: Simulates the sound of vinyl crackle.
    3. Sampled: A short, looped sample of brown noise.
    4. Organic: A complex, evolving wavetable oscillator.
    5. Vinyl: A mix of hiss and random pops.
    6. Zap: A high-frequency, laser-like FM sound.
  • Tone: Modifies the timbre of the selected texture (e.g., making it brighter or darker).
  • Decay: Controls the fade-out time of the texture layer.
  • Variation: Adds randomness to the texture, making each hit sound slightly different.

2. The Body (Amplitude & Control)

This central section shapes the volume contour of the kick and provides master controls.

  • ADSR Envelope: Standard Attack, Decay, Sustain, and Release sliders for the main amplitude envelope.
  • 808 Mode: When enabled, the Tune knob is ignored, and the synth's pitch is determined by incoming MIDI notes, allowing you to play it like a bass synthesizer.
  • NAM Button: Activates or deactivates the Neural Amp Modeler (NAM) processing stage.
  • Trigger Button: Manually triggers a kick sound at full velocity.
  • VU Meters: Provides visual feedback for the left and right output channels.

3. The Mangle (Distortion & Effects)

This section is all about adding grit, character, and stereo width.

Drive

A multi-mode distortion unit.

  • Gain: Controls the amount of saturation.
  • Mode: Selects from five distortion models:
    1. Tape Classic: A warm, vintage tape saturation.
    2. Tape Modern: A more aggressive, bright tape sound.
    3. Tube Triode: Soft, even-order harmonic distortion.
    4. Tube Pentode: Harsher, odd-order harmonic distortion.
    5. Digital: A clean, hard-clipping digital distortion.

Corrosion

An effect inspired by classic "erosion" or "bit-crusher" units, which uses phase-modulated delay lines to create metallic, noisy, or stereo-widening effects.

  • Amount: The master dry/wet control for the effect.
  • Frequency: Sets the modulation speed of the delay lines.
  • Width: Controls the bandwidth of the noise used in the modulation.
  • Sine ~ Noise: Blends the modulation source between a clean sine wave and filtered noise.
  • Stereo: Increases the phase difference between the left and right channel modulation, creating a wide stereo effect.

NAM (Neural Amp Modeler)

A built-in module for processing the sound through pre-trained neural network models of real hardware.

  • Model: Selects the active NAM model.
  • Input Gain: Adjusts the level going into the NAM processor.
  • Output Gain: Trims the level coming out of the NAM processor.

4. The Filter

A pro-grade resonant filter engine with its own full ADSR envelope. It can be inserted at three different points in the signal chain, which dramatically changes how it interacts with the drive and effects stages.

The engine uses two distinct topologies depending on the selected filter type:

  • LP 24 / HP 24 — a true zero-delay-feedback (ZDF) 4-pole Moog ladder. The resonance feedback loop is solved implicitly each sample using Newton-Raphson iteration (warm-started from the exact linear solution), so there is no one-sample feedback delay and no artificial loop-gain margin. The ladder runs at 2× internal oversampling: each native-rate sample is processed twice at the doubled rate using linear-interpolation upsampling and a 2-tap FIR decimator, which pushes near-Nyquist instabilities far out of the audible range and eliminates the need for heuristic resonance damping at high cutoff frequencies.
  • LP 12 / HP 12 / BP 12 / Notch — Andy Simper's topology-preserving transform (TPT) SVF (State Variable Filter). Its implicit structure inherently handles its own feedback, giving accurate resonance behavior at all sample rates.

Both topologies receive per-sample IIR-smoothed coefficients (2 ms time constant for the SVF, 6 ms for the ladder) to prevent zipper noise during fast envelope-driven sweeps.

Controls

  • Filter (ON/OFF): Activates or bypasses the entire filter section.
  • Type: Selects the filter architecture:
    • LP 24: 4-pole ZDF Moog ladder lowpass. Warm and musical; self-oscillates at full resonance.
    • LP 12: 2-pole TPT SVF lowpass. Lighter 12 dB/oct roll-off, more open sound.
    • HP 24: 4-pole ZDF Moog ladder highpass.
    • HP 12: 2-pole TPT SVF highpass.
    • BP 12: 2-pole TPT SVF bandpass — isolates a frequency band.
    • Notch: 2-pole TPT SVF band-reject — carves out a specific frequency.
  • Style: Selects the nonlinear saturation character applied inside the filter:
    • Clean: Fully linear — no saturation anywhere in the signal path. Uses an exact closed-form solve for the ladder.
    • Classic: Warm tanh saturation throughout the feedback path. Smooth and musical.
    • Raw: High-gain asymmetric waveshaper with a 1.4× pre-gain. Aggressive and punchy.
    • Tube: Asymmetric triode transfer curve with even-harmonic coloring. Organic and round.
  • Position: Where in the signal chain the filter is inserted:
    • Pre NAM: Before the NAM model. Shapes what the neural model "hears" — tighter, darker results.
    • Post NAM: After the NAM model, before Corrosion. The most common position for post-distortion tone shaping (default).
    • Post All: After all processing, on the stereo bus. Acts as a master tone control.
  • Cutoff: The base cutoff frequency (20 Hz – 20 kHz, logarithmically scaled). The mapping uses a smooth Nyquist-safety compression that keeps the sweep law continuous all the way to the frequency ceiling — no hard clamp or audible dwell.
  • Resonance: Emphasis at the cutoff frequency. At maximum with LP 24 / HP 24, the filter self-oscillates. A Nyquist-aware loop-gain limiter (k · G⁴ < 3.96) automatically clamps feedback gain only when needed, preserving full resonance character well within the audible band. Output level is compensated by a topology-derived formula (1 / (1 + k/8)) so cranking resonance doesn't cause a large volume jump.
  • Drive: Pre-filter input gain (bypassed entirely for the Clean style to preserve full linearity). Gently saturates the signal before it enters the filter, adding harmonic richness.
  • Key Track: When greater than 0 %, the cutoff tracks the MIDI note pitch, keeping the filter tonally consistent across notes.

Filter Envelope

  • Env Amount: How many octaves the envelope shifts the cutoff (±4 octaves). Positive values open the filter on attack; negative values close it.
  • Attack / Decay / Sustain / Release: Standard ADSR controls for the filter cutoff sweep.
  • Trigger / Gate: In Trigger mode the envelope fires and completes its full A→D→R cycle independently of note length — the classic kick drum / 808 behaviour. In Gate mode the sustain is held until note-off.

Technical Implementation

  • Framework: Built on nih-plug, a modern, Rust-native framework for creating audio plugins.
  • GUI: The user interface is rendered using vizia, a declarative GUI toolkit for Rust that is part of the nih-plug ecosystem.
  • Synthesis: All DSP (Digital Signal Processing) is written in pure Rust, including the oscillators, envelopes, filters, and distortion algorithms.
  • Filter Engine: The filter is a pro-grade ZDF (Zero-Delay Feedback) design:
    • 4-pole Moog Ladder (LP 24 / HP 24): Implicit per-sample solve — the resonance feedback loop has no delay. The Clean style uses an exact closed-form solution; all saturating styles (Classic, Raw, Tube) use 3-step Newton-Raphson iteration warm-started from the linear solution. The ladder runs at 2× internal oversampling (linear-interpolation upsampler → ladder × 2 → 2-tap FIR decimator) to eliminate near-Nyquist instability and bilinear-warp artefacts.
    • TPT SVF (LP 12 / HP 12 / BP 12 / Notch): Andy Simper's topology-preserving transform SVF. Saturation is applied only to the BP integrator state so the pole structure remains unconditionally stable.
    • Coefficient smoothing: Per-sample IIR smoothers on the cutoff coefficients (2 ms for SVF, 6 ms for ladder) prevent zipper noise during fast envelope sweeps.
    • Nyquist-aware resonance limiter: The ladder feedback gain is clamped so the open-loop gain product k · G⁴ < 3.96 at all times, guaranteeing stability without audibly limiting resonance within the audible band.
    • Topology-derived output compensation: Level is normalised by 1 / (1 + k/8), where k is the actual feedback gain parameter, preventing large output jumps when resonance is increased.
  • Signal Flow:
    1. A pitched oscillator (one of five waveform modes) and a texture generator run in parallel.
    2. Their outputs are summed and processed by the amplitude ADSR envelope.
    3. (Optional) If the Filter is in Pre NAM position, it is applied here.
    4. The signal is then sent through the multi-mode Drive unit.
    5. (Optional) The signal is processed by the NAM module.
    6. (Optional) If the Filter is in Post NAM position, it is applied here.
    7. The signal passes through the Corrosion effect and is widened to stereo.
    8. (Optional) If the Filter is in Post All position, it is applied here as a master tone control.
    9. The master output gain is applied before the signal is sent to the stereo outputs.

Installation Guide

You can download the latest version from the Releases Page.

Windows (x64)

  1. Download the .zip file for Windows (e.g., polytron_synth-windows-x64.zip).
  2. Extract the contents of the zip file. You will find a file named polytron_synth.vst3.
  3. Move the polytron_synth.vst3 file into your VST3 plugins folder. The standard location is:
    C:\Program Files\Common Files\VST3\
    
  4. Rescan for plugins in your Digital Audio Workstation (DAW).

macOS (Universal: Apple Silicon & Intel)

  1. Download the .zip file for macOS (e.g., polytron_synth-macos-universal.zip).
  2. Important: Do not double-click to unzip. The standard macOS Archive Utility can sometimes fail to preserve necessary file permissions. Instead, open the Terminal app and use the unzip command:
    unzip /path/to/your/downloaded/polytron_synth-macos-universal.zip
  3. This will create a polytron_synth.vst3 bundle. A VST3 on macOS is actually a folder that looks like a single file.
  4. Move the polytron_synth.vst3 bundle to your VST3 plugins folder. The standard location is:
    /Library/Audio/Plug-Ins/VST3/
    
    You can access this folder by opening Finder, clicking "Go" in the menu bar, selecting "Go to Folder...", and pasting the path.

Bypassing Gatekeeper (Required for macOS)

Because the plugin is not officially signed and notarized by Apple, you must manually approve it before your DAW will load it.

  1. After moving the file to the VST3 folder, open the Terminal app.
  2. Run the following command to remove the "quarantine" attribute that macOS automatically adds to downloaded files. This tells the system you trust the application.
    sudo xattr -rd com.apple.quarantine /Library/Audio/Plug-Ins/VST3/polytron_synth.vst3
  3. Enter your password when prompted.
  4. Rescan for plugins in your DAW. The kick synth should now appear and load correctly.

Build & Release Workflow

For those interested in the development process, the repository uses GitHub Actions to automate builds.

Bundle & Zip Handling

The workflow builds multiple plugin formats and packages them per platform.

  • Windows (x64): Produces polytron_synth.vst3 (VST3) and polytron_synth.clap (CLAP), both as single DLL files, zipped into a standard archive.
  • macOS (Universal): Produces polytron_synth.vst3 (VST3 bundle), polytron_synth.clap (CLAP bundle), and Polytron Synth.component (Audio Unit v2 bundle). The AUv2 is built using clap-wrapper and embeds the CLAP binary inside, making it self-contained. The workflow uses zip -ry to preserve the necessary symbolic links and executable permissions.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages