Compare commits

...

8 Commits

Author SHA1 Message Date
Gordon JC Pearce 2ebf7fac1c fix CLAP features macro 2025-12-31 21:18:21 +00:00
Gordon JC Pearce 9f86360611 more make options for different plugin formats 2025-12-31 20:39:06 +00:00
Gordon JC Pearce 8fb00c1499 nice bass patch to test with 2025-12-30 01:11:57 +00:00
Gordon JC Pearce fd68c59d0c Merge branch 'chorusboard' 2025-12-30 01:04:41 +00:00
Gordon JC Pearce bad4e6b018 tune lfo speeds a bit 2025-12-30 01:02:55 +00:00
Gordon JC Pearce 4317f15f4e updated with gui fixes 2025-12-30 00:42:34 +00:00
Gordon JC Pearce dc89ca6cf7 Merge branch 'gui' 2025-12-30 00:24:19 +00:00
Gordon JC Pearce 4982d27019 chorus buttons 2025-12-29 23:45:20 +00:00
6 changed files with 29 additions and 21 deletions

View File

@ -23,6 +23,15 @@
#define DISTRHO_PLUGIN_NAME "peacock-8" #define DISTRHO_PLUGIN_NAME "peacock-8"
#define DISTRHO_PLUGIN_URI "https://gjcp.net/plugins/peacock" #define DISTRHO_PLUGIN_URI "https://gjcp.net/plugins/peacock"
#define DISTRHO_PLUGIN_CLAP_ID "net.gjcp.peacock"
#define DISTRHO_PLUGIN_CLAP_FEATURES "instrument","synthesizer","stereo"
#define DISTRHO_PLUGIN_BRAND_ID GJCP
#define DISTRHO_PLUGIN_UNIQUE_ID Pfau
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:InstrumentPlugin"
#define DISTRHO_PLUGIN_VST_CATEGORY "Fx|Instrument"
#define DISTRHO_PLUGIN_NUM_INPUTS 0 #define DISTRHO_PLUGIN_NUM_INPUTS 0
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2 #define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_IS_SYNTH 1 #define DISTRHO_PLUGIN_IS_SYNTH 1
@ -69,4 +78,4 @@
}; };
#endif #endif

View File

@ -34,7 +34,7 @@ include ../dpf/Makefile.plugins.mk
SKIP_NATIVE_AUDIO_FALLBACK = true SKIP_NATIVE_AUDIO_FALLBACK = true
TARGETS += jack lv2_sep TARGETS += jack lv2_sep vst3 clap
all: $(TARGETS) all: $(TARGETS)

View File

@ -21,6 +21,7 @@
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <stdio.h>
Chorus::Chorus() { Chorus::Chorus() {
lpfOut1 = new float[bufferSize]; lpfOut1 = new float[bufferSize];
lpfOut2 = new float[bufferSize]; lpfOut2 = new float[bufferSize];
@ -102,6 +103,7 @@ void Chorus::run(float* input, float** outputs, uint32_t frames) {
delayptr++; delayptr++;
delayptr &= 0x3ff; delayptr &= 0x3ff;
} }
//printf("dly1 = %f\n", dly1);
postFilter1l->runSVF(lpfOut1, lpfOut1, frames); postFilter1l->runSVF(lpfOut1, lpfOut1, frames);
postFilter2l->runSVF(lpfOut1, lpfOut1, frames); postFilter2l->runSVF(lpfOut1, lpfOut1, frames);
@ -152,11 +154,11 @@ void Chorus::setChorus(uint8_t mode) {
break; break;
case 0x40: case 0x40:
gain = 1.2; gain = 1.2;
lfoSpeed = 6.283 * 0.5 / sampleRate; lfoSpeed = 6.283 * 0.3 / sampleRate;
break; break;
case 0x00: case 0x00:
gain = 1.2; gain = 1.2;
lfoSpeed = 6.283 * 0.9 / sampleRate; lfoSpeed = 6.283 * 0.5 / sampleRate;
break; break;
} }
} }

View File

@ -96,24 +96,24 @@ class Module {
*/ */
struct { struct {
uint8_t lfoRate = 0x58; uint8_t lfoRate = 0x00;
uint8_t lfoDelay = 0x00; uint8_t lfoDelay = 0x00;
uint8_t vcoLfo = 0x00; uint8_t vcoLfo = 0x00;
uint8_t pwmLfo = 0x00; uint8_t pwmLfo = 0x3c;
uint8_t noise = 0x00; uint8_t noise = 0x00;
uint8_t vcfFreq = 0x00; // 1c; // 0x3f80 uint8_t vcfFreq = 0x25; // 1c; // 0x3f80
uint8_t vcfReso = 0x7f; uint8_t vcfReso = 0x1d;
uint8_t vcfEnv = 0x7f; // 4e; uint8_t vcfEnv = 0x1c; // 4e;
uint8_t vcfLfo = 0x00; uint8_t vcfLfo = 0x00;
uint8_t vcfKey = 0x00; // 47; uint8_t vcfKey = 0x2b; // 47;
uint8_t vca = 0x20; uint8_t vca = 0x5c;
uint8_t env_a = 0x00; uint8_t env_a = 0x00;
uint8_t env_d = 0x5c; uint8_t env_d = 0x2a;
uint8_t env_s = 0x00; // 0x3f80 uint8_t env_s = 0x23; // 0x3f80
uint8_t env_r = 0x3c; uint8_t env_r = 0x00;
uint8_t sub = 0x7f; uint8_t sub = 0x40;
uint8_t switch1 = 0x3a; uint8_t switch1 = 0x19;
uint8_t switch2 = 0x19; uint8_t switch2 = 0x18;
} patchRam; } patchRam;
Chorus* chorus; Chorus* chorus;

View File

@ -60,7 +60,6 @@ void Peacock::initParameter(uint32_t index, Parameter& parameter) {
enumValues[2].label = "4'"; enumValues[2].label = "4'";
parameter.enumValues.values = enumValues; parameter.enumValues.values = enumValues;
} }
break; break;
case pLFODepth: case pLFODepth:
@ -310,7 +309,6 @@ void Peacock::initParameter(uint32_t index, Parameter& parameter) {
enumValues[2].label = "Fast"; enumValues[2].label = "Fast";
parameter.enumValues.values = enumValues; parameter.enumValues.values = enumValues;
} }
/* /*
case pModWheel: case pModWheel:
parameter.hints = kParameterIsAutomatable | kParameterIsHidden; parameter.hints = kParameterIsAutomatable | kParameterIsHidden;
@ -403,7 +401,6 @@ void Peacock::setParameterValue(uint32_t index, float value) {
case pChorusMode: case pChorusMode:
m->patchRam.switch1 &= 0x9f; m->patchRam.switch1 &= 0x9f;
switch ((int)value) { switch ((int)value) {
case 0: case 0:
m->patchRam.switch1 |= 0x60; // both off m->patchRam.switch1 |= 0x60; // both off
@ -529,7 +526,6 @@ float Peacock::getParameterValue(uint32_t index) const {
return m->patchRam.vca; return m->patchRam.vca;
break; break;
case pChorusMode: case pChorusMode:
switch (m->patchRam.switch1 & 0x60) { switch (m->patchRam.switch1 & 0x60) {
case 0x60: case 0x60:
return 0; return 0;

View File

@ -258,6 +258,7 @@ void DistrhoUIPeacock::parameterChanged(uint32_t index, float value) {
sw1 &= 0xf8; // mask sw1 &= 0xf8; // mask
if (value > 2) value = 2; if (value > 2) value = 2;
sw1 |= (1 << (int)value); sw1 |= (1 << (int)value);
xBtn16ft->repaint(); // will repaint all the panel
break; break;
case pSqr: case pSqr:
sw1 &= 0xf7; sw1 &= 0xf7;