diff --git a/CHANGELOG.md b/CHANGELOG.md index f717db9..4bd1d40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ - Mixer - When polyphonic and monophonic inputs are combined, copy all mono signals to all mix output poly channels. +### 1.4.1 (in development) +- Improve VCF model accuracy and stability. + ### 1.4.0 (2019-11-08) - Add Pulses. diff --git a/plugin.json b/plugin.json index 6522364..46bf143 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "slug": "Fundamental", - "version": "2.0.0", - "license": "GPL-3.0-or-later", + "version": "1.4.0", + "license": "GPL-3.0-only", "name": "Fundamental", "brand": "VCV", "author": "VCV", @@ -10,13 +10,13 @@ "authorUrl": "https://vcvrack.com/", "manualUrl": "https://vcvrack.com/Fundamental.html#manual", "sourceUrl": "https://github.com/VCVRack/Fundamental", - "changelogUrl": "https://github.com/VCVRack/Fundamental/blob/v2/CHANGELOG.md", + "changelogUrl": "https://github.com/VCVRack/Fundamental/blob/v1/CHANGELOG.md", "modules": [ { "slug": "VCO", "name": "VCO-1", "description": "Voltage-controlled oscillator", - "manualUrl": "https://vcvrack.com/Fundamental.html#VCO", + "manualUrl": "https://vcvrack.com/Fundamental#VCO", "tags": [ "VCO", "Polyphonic" @@ -25,8 +25,8 @@ { "slug": "VCO2", "name": "VCO-2", - "description": "Voltage-controlled oscillator", - "manualUrl": "https://vcvrack.com/Fundamental.html#VCO", + "description": "Voltage-controlled oscillator with output morphing", + "manualUrl": "https://vcvrack.com/Fundamental#VCO", "tags": [ "VCO", "Polyphonic" @@ -36,7 +36,7 @@ "slug": "VCF", "name": "VCF", "description": "Voltage-controlled filter", - "manualUrl": "https://vcvrack.com/Fundamental.html#VCF", + "manualUrl": "https://vcvrack.com/Fundamental#VCF", "tags": [ "VCF", "Polyphonic" @@ -46,7 +46,7 @@ "slug": "VCA-1", "name": "VCA-1", "description": "Voltage-controlled amplifier", - "manualUrl": "https://vcvrack.com/Fundamental.html#VCA", + "manualUrl": "https://vcvrack.com/Fundamental#VCA", "tags": [ "VCA", "Polyphonic" @@ -55,8 +55,8 @@ { "slug": "VCA", "name": "VCA-2", - "description": "Voltage-controlled amplifier", - "manualUrl": "https://vcvrack.com/Fundamental.html#VCA", + "description": "2-channel voltage-controlled amplifier", + "manualUrl": "https://vcvrack.com/Fundamental#VCA", "tags": [ "VCA", "Dual", @@ -67,7 +67,7 @@ "slug": "LFO", "name": "LFO-1", "description": "Low-frequency oscillator", - "manualUrl": "https://vcvrack.com/Fundamental.html#LFO", + "manualUrl": "https://vcvrack.com/Fundamental#LFO", "tags": [ "LFO", "Polyphonic" @@ -77,7 +77,7 @@ "slug": "LFO2", "name": "LFO-2", "description": "Low-frequency oscillator", - "manualUrl": "https://vcvrack.com/Fundamental.html#LFO", + "manualUrl": "https://vcvrack.com/Fundamental#LFO", "tags": [ "LFO", "Polyphonic" @@ -86,8 +86,8 @@ { "slug": "Delay", "name": "Delay", - "description": "Delays a signal with feedback", - "manualUrl": "https://vcvrack.com/Fundamental.html#Delay", + "description": "", + "manualUrl": "https://vcvrack.com/Fundamental#Delay", "tags": [ "Delay" ] @@ -96,7 +96,7 @@ "slug": "ADSR", "name": "ADSR", "description": "Generates an envelope with Attack/Decay/Sustain/Release", - "manualUrl": "https://vcvrack.com/Fundamental.html#ADSR", + "manualUrl": "https://vcvrack.com/Fundamental#ADSR", "tags": [ "Envelope Generator", "Polyphonic" @@ -106,7 +106,7 @@ "slug": "VCMixer", "name": "Mixer", "description": "Mixes 4 signals with built-in VCAs", - "manualUrl": "https://vcvrack.com/Fundamental.html#VCMixer", + "manualUrl": "https://vcvrack.com/Fundamental#VCMixer", "tags": [ "Mixer", "VCA", @@ -117,7 +117,7 @@ "slug": "8vert", "name": "8vert", "description": "Attenuverts 8 signals or creates constant voltages", - "manualUrl": "https://vcvrack.com/Fundamental.html#8vert", + "manualUrl": "https://vcvrack.com/Fundamental#8vert", "tags": [ "Attenuator", "Polyphonic" @@ -127,7 +127,7 @@ "slug": "Unity", "name": "Unity", "description": "Mixes or averages signals with unity gain", - "manualUrl": "https://vcvrack.com/Fundamental.html#Unity", + "manualUrl": "https://vcvrack.com/Fundamental#Unity", "tags": [ "Mixer", "Utility", @@ -138,7 +138,7 @@ "slug": "Mutes", "name": "Mutes", "description": "Toggles up to 10 signals", - "manualUrl": "https://vcvrack.com/Fundamental.html#Mutes", + "manualUrl": "https://vcvrack.com/Fundamental#Mutes", "tags": [ "Switch", "Polyphonic" @@ -148,7 +148,7 @@ "slug": "Pulses", "name": "Pulses", "description": "Generates up to 10 trigger and gate signals", - "manualUrl": "https://vcvrack.com/Fundamental.html#Pulses", + "manualUrl": "https://vcvrack.com/Fundamental#Pulses", "tags": [ "Switch" ] @@ -157,7 +157,7 @@ "slug": "Scope", "name": "Scope", "description": "Inspect waveforms with an oscilloscope", - "manualUrl": "https://vcvrack.com/Fundamental.html#Scope", + "manualUrl": "https://vcvrack.com/Fundamental#Scope", "tags": [ "Visual", "Polyphonic" @@ -167,7 +167,7 @@ "slug": "SEQ3", "name": "SEQ-3", "description": "3-channel 8-step sequencer also with gate outputs", - "manualUrl": "https://vcvrack.com/Fundamental.html#SEQ3", + "manualUrl": "https://vcvrack.com/Fundamental#SEQ-3", "tags": [ "Sequencer" ] @@ -176,9 +176,8 @@ "slug": "SequentialSwitch1", "name": "Sequential Switch 1", "description": "Routes an input to one of to 4 outputs", - "manualUrl": "https://vcvrack.com/Fundamental.html#SequentialSwitch", + "manualUrl": "https://vcvrack.com/Fundamental#SequentialSwitch", "tags": [ - "Switch", "Utility", "Polyphonic" ] @@ -187,9 +186,8 @@ "slug": "SequentialSwitch2", "name": "Sequential Switch 2", "description": "Routes one of to 4 inputs to an output", - "manualUrl": "https://vcvrack.com/Fundamental.html#SequentialSwitch", + "manualUrl": "https://vcvrack.com/Fundamental#SequentialSwitch", "tags": [ - "Switch", "Utility", "Polyphonic" ] @@ -198,7 +196,7 @@ "slug": "Octave", "name": "Octave", "description": "Shifts 1V/oct CV by octaves", - "manualUrl": "https://vcvrack.com/Fundamental.html#Octave", + "manualUrl": "https://vcvrack.com/Fundamental#Octave", "tags": [ "Utility", "Polyphonic" @@ -208,7 +206,7 @@ "slug": "Quantizer", "name": "Quantizer", "description": "12-note quantizer and scale selector", - "manualUrl": "https://vcvrack.com/Fundamental.html#Quantizer", + "manualUrl": "https://vcvrack.com/Fundamental#Quantizer", "tags": [ "Quantizer", "Polyphonic" @@ -218,7 +216,7 @@ "slug": "Split", "name": "Split", "description": "Splits a polyphonic cable into multiple monophonic cables", - "manualUrl": "https://vcvrack.com/Fundamental.html#Split", + "manualUrl": "https://vcvrack.com/Fundamental#Split", "tags": [ "Polyphonic", "Utility" @@ -228,7 +226,7 @@ "slug": "Merge", "name": "Merge", "description": "Combines multiple monophonic cables into a polyphonic cable", - "manualUrl": "https://vcvrack.com/Fundamental.html#Merge", + "manualUrl": "https://vcvrack.com/Fundamental#Split", "tags": [ "Polyphonic", "Utility" @@ -238,7 +236,7 @@ "slug": "Sum", "name": "Sum", "description": "Sums all channels in a polyphonic cable", - "manualUrl": "https://vcvrack.com/Fundamental.html#Sum", + "manualUrl": "https://vcvrack.com/Fundamental#Sum", "tags": [ "Polyphonic", "Utility" @@ -248,7 +246,7 @@ "slug": "Viz", "name": "Viz", "description": "Visualizes all channels of a polyphonic cable", - "manualUrl": "https://vcvrack.com/Fundamental.html#Viz", + "manualUrl": "https://vcvrack.com/Fundamental#Viz", "tags": [ "Polyphonic", "Visual" @@ -258,7 +256,7 @@ "slug": "MidSide", "name": "Mid/Side", "description": "Mid/side stereo encoder/decoder", - "manualUrl": "https://vcvrack.com/Fundamental.html#MidSide", + "manualUrl": "https://vcvrack.com/Fundamental#MidSide", "tags": [ "Utility", "Polyphonic" @@ -268,7 +266,7 @@ "slug": "Noise", "name": "Noise", "description": "Multicolored noise generator", - "manualUrl": "https://vcvrack.com/Fundamental.html#Noise", + "manualUrl": "https://vcvrack.com/Fundamental#Noise", "tags": [ "Noise" ] @@ -277,7 +275,7 @@ "slug": "Random", "name": "Random", "description": "Random CV generator", - "manualUrl": "https://vcvrack.com/Fundamental.html#Random", + "manualUrl": "https://vcvrack.com/Fundamental#Random", "tags": [ "Random", "Sample and hold" diff --git a/src/Noise.cpp b/src/Noise.cpp index 5cab08a..094c1d4 100644 --- a/src/Noise.cpp +++ b/src/Noise.cpp @@ -6,25 +6,25 @@ http://www.firstpr.com.au/dsp/pink-noise/ */ template struct PinkNoiseGenerator { - int frame = -1; - float values[QUALITY] = {}; - - float process() { - int lastFrame = frame; - frame++; - if (frame >= (1 << QUALITY)) - frame = 0; - int diff = lastFrame ^ frame; - - float sum = 0.f; - for (int i = 0; i < QUALITY; i++) { - if (diff & (1 << i)) { - values[i] = random::uniform() - 0.5f; - } - sum += values[i]; - } - return sum; - } + int frame = -1; + float values[QUALITY] = {}; + + float process() { + int lastFrame = frame; + frame++; + if (frame >= (1 << QUALITY)) + frame = 0; + int diff = lastFrame ^ frame; + + float sum = 0.f; + for (int i = 0; i < QUALITY; i++) { + if (diff & (1 << i)) { + values[i] = random::uniform() - 0.5f; + } + sum += values[i]; + } + return sum; + } }; diff --git a/src/VCF.cpp b/src/VCF.cpp index f8a0eb0..07a6a1c 100644 --- a/src/VCF.cpp +++ b/src/VCF.cpp @@ -37,7 +37,8 @@ struct LadderFilter { void process(T input, T dt) { dsp::stepRK4(T(0), dt, state, 4, [&](T t, const T x[], T dxdt[]) { - T inputc = clip(input - resonance * x[3]); + T inputt = crossfade(this->input, input, t / dt); + T inputc = clip(inputt - resonance * x[3]); T yc0 = clip(x[0]); T yc1 = clip(x[1]); T yc2 = clip(x[2]);