diff --git a/plugin/DistrhoPluginInfo.h b/plugin/DistrhoPluginInfo.h index 7484755..914acc9 100644 --- a/plugin/DistrhoPluginInfo.h +++ b/plugin/DistrhoPluginInfo.h @@ -1,5 +1,5 @@ /* - BarrVerb reverb plugin + Chassis polysynth framework Copyright 2024 Gordon JC Pearce @@ -16,7 +16,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - #ifndef DISTRHO_PLUGIN_INFO_H #define DISTRHO_PLUGIN_INFO_H @@ -30,10 +29,9 @@ #define DISTRHO_PLUGIN_WANT_PROGRAMS 0 - enum Parameters { - paramProg, - kParameterCount + paramProg, + kParameterCount }; #endif diff --git a/plugin/Makefile b/plugin/Makefile index e08c45b..043d661 100644 --- a/plugin/Makefile +++ b/plugin/Makefile @@ -1,6 +1,6 @@ ############################### # -# Makefile for BarrChassis +# Makefile for Chassis # based on the work of falkTX, in the DPF example plugins # # for full licence, see LICENCE in the root of the project diff --git a/plugin/chassis.cpp b/plugin/chassis.cpp index 437b352..eeef3cd 100644 --- a/plugin/chassis.cpp +++ b/plugin/chassis.cpp @@ -1,5 +1,5 @@ /* - Chassis softsynth framework + Chassis polysynth framework Copyright 2024 Gordon JC Pearce @@ -25,8 +25,8 @@ Chassis::Chassis() : Plugin(kParameterCount, 0, 0) { // one parameter, no progr // Initialisation functions -//void Chassis::initParameter(uint32_t index, Parameter ¶meter) { -//} +// void Chassis::initParameter(uint32_t index, Parameter ¶meter) { +// } /* void Chassis::setParameterValue(uint32_t index, float value) { diff --git a/plugin/chassis.hpp b/plugin/chassis.hpp index 68ff29b..c415504 100644 --- a/plugin/chassis.hpp +++ b/plugin/chassis.hpp @@ -1,5 +1,5 @@ /* - Chassis softsynth framework + Chassis polysynth framework Copyright 2024 Gordon JC Pearce @@ -46,10 +46,10 @@ class Chassis : public Plugin { // Initialisation void initAudioPort(bool input, uint32_t index, AudioPort &port) override; - //void initParameter(uint32_t index, Parameter ¶meter) override; + // void initParameter(uint32_t index, Parameter ¶meter) override; - //void setParameterValue(uint32_t index, float value) override; - //float getParameterValue(uint32_t index) const override; + // void setParameterValue(uint32_t index, float value) override; + // float getParameterValue(uint32_t index) const override; // void initProgramName(uint32_t index, String &programName) override; // void loadProgram(uint32_t index) override; diff --git a/plugin/voice.cpp b/plugin/voice.cpp index b288bfa..72e4d8b 100644 --- a/plugin/voice.cpp +++ b/plugin/voice.cpp @@ -1,5 +1,5 @@ /* - Chassis softsynth framework + Chassis polysynth framework Copyright 2024 Gordon JC Pearce @@ -16,15 +16,14 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include "voice.hpp" +#include static float blep(float phase, float theta) { float t; - if (phase < theta) { + if (phase < theta) { t = phase / theta; return (2 * t) - (t * t) - 1; } @@ -36,8 +35,6 @@ static float blep(float phase, float theta) { return 0; } - - bool Voice::isFree() { return keyState == K_OFF; } @@ -58,14 +55,14 @@ void Voice::off() { } void Voice::run(float *buffer, uint32_t samples) { - float y; + float y; env = ((target - env) * 0.01) + env; for (uint32_t i = 0; i < samples; i++) { phase += omega; if (phase > 1) phase -= 1; - y = (2*phase)-1; - y-=blep(phase,omega); + y = (2 * phase) - 1; + y -= blep(phase, omega); - buffer[i] += 0.25*y * env; + buffer[i] += 0.25 * y * env; } } diff --git a/plugin/voice.hpp b/plugin/voice.hpp index 415946b..b4114a2 100644 --- a/plugin/voice.hpp +++ b/plugin/voice.hpp @@ -1,5 +1,5 @@ /* - Chassis softsynth framework + Chassis polysynth framework Copyright 2024 Gordon JC Pearce