VinSynth

A monophonic synthesizer with MIDI input, an interpolated delay effect, a lo-fi style bit crusher with a speed control that affects how fast the bit crushing happens, and a low/high pass filter. Made using JUCE and prototyped in MATLAB.

The names of the individual components and the synth is a wordplay of the characters in Pulp Fiction [Vincent, Mia Wallace, Butch, Tarantino].

<Code>

Description

VinSynth is a monophonic synthesizer with the following components:

  • A single oscillator with multiple waveform options (sine, square, triangle, saw).

  • A delay effect with adjustable parameters for delay length, feedback, and dry/wet mix.

  • A bit crusher effect that can degrade the audio quality with adjustable bit depth and sample rate reduction.

  • A filter that allows users to sculpt the sound by applying low-pass or high-pass filtering with parameters like cutoff frequency, and resonance (Q).

Oscillator:

  • Sine Wave [sin(2 pi f * t)]

  • Square Wave -> 1 if sine is positive, -1 if negative

  • Sawtooth - 2 * phase (or mod) - 1 [phase = freq/sampleRate]

  • Triangle - 2 * saw - 1

  • Tanh distortion.

Delay:

  • Loops through audio channels and samples in the buffer.

  • For each sample, calculates a new read index based on the current delay length and other factors.

  • Performs interpolation to obtain the delayed sample from the delay buffer.

  • Applies the delay effect by mixing the original and delayed samples based on the dryWet and feedback parameters.

  • Updates the delay buffer with the new input and delayed samples.

Bit crusher:

  • QUANTIZE THAT, BUTCH!

  • What does the Speed variable do? It basically determines how “fast” quantization is happening. The phasor variable (in code) keeps track of the current phase position. The phasor is incremented by the speed variable. If the phasor exceeds or equals 1.0, the phasor is reset back to zero and quantizes the input sample.

Filter:

  • Direct Form 2 Biquad, using Robert Bristow Johnson’s equations.

If unavailable, please refresh the page