Compare commits

..

No commits in common. "d35f88043077ead0dd45f01514267e096af79c03" and "90e818570f9d0b2bba703f4d9c1dbbea6e6466d5" have entirely different histories.

5 changed files with 17 additions and 53 deletions

View File

@ -3,6 +3,9 @@
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
#include "DistrhoPlugin.hpp"
const std::string patchName[] = { const std::string patchName[] = {
"Brass Set 1", "Brass Swell", "Trumpet", "Flutes", "Moving Strings", "Brass & Strings", "Choir", "Piano I", "Brass Set 1", "Brass Swell", "Trumpet", "Flutes", "Moving Strings", "Brass & Strings", "Choir", "Piano I",
"Organ I", "Organ II", "Combo Organ", "Calliope", "Donald Pluck", "Celeste* (1 oct.up)", "Elect. Piano I", "Organ I", "Organ II", "Combo Organ", "Calliope", "Donald Pluck", "Celeste* (1 oct.up)", "Elect. Piano I",

View File

@ -10,7 +10,6 @@
NAME = chassis NAME = chassis
FILES_DSP = \ FILES_DSP = \
parameters.cpp \
chassis.cpp chassis.cpp

View File

@ -1,8 +1,6 @@
#include "chassis.hpp" #include "chassis.hpp"
#include "patches.hpp"
START_NAMESPACE_DISTRHO START_NAMESPACE_DISTRHO
Chassis::Chassis() : Plugin(parameterCount, 128, 0), sampleRate(getSampleRate()) { Chassis::Chassis() : Plugin(parameterCount, 128, 0), sampleRate(getSampleRate()) {
@ -20,13 +18,11 @@ void Chassis::initAudioPort(bool input, uint32_t index, AudioPort &port) {
} }
void Chassis::initProgramName(uint32_t index, String &programName) { void Chassis::initProgramName(uint32_t index, String &programName) {
programName = patchName[index & 0x7f].c_str(); return;
//printf("prog = %s\n", patchName[index]);
} }
void Chassis::loadProgram(uint32_t index) { void Chassis::loadProgram(uint32_t index) {
index &= 0x7f; return;
memmove(&patchRam, (uint8_t *)patchData + (index * 18), 18);
} }
// Processing functions // Processing functions

View File

@ -67,10 +67,10 @@ class Chassis : public Plugin {
// Initialisation // Initialisation
void initAudioPort(bool input, uint32_t index, AudioPort &port) override; void initAudioPort(bool input, uint32_t index, AudioPort &port) override;
void initParameter(uint32_t index, Parameter &parameter) override; // void initParameter(uint32_t index, Parameter &parameter) override;
void setParameterValue(uint32_t index, float value) override; // void setParameterValue(uint32_t index, float value) override;
float getParameterValue(uint32_t index) const override; // float getParameterValue(uint32_t index) const override;
void initProgramName(uint32_t index, String &programName) override; void initProgramName(uint32_t index, String &programName) override;
void loadProgram(uint32_t index) override; void loadProgram(uint32_t index) override;
@ -82,26 +82,6 @@ class Chassis : public Plugin {
private: private:
double sampleRate; double sampleRate;
struct {
uint8_t lfoRate = 0x30; // lookup value defaults to 0x0200
uint8_t lfoDelay = 0x00;
uint8_t vcoLfo = 0x0a;
uint8_t pwmLfo = 0x30;
uint8_t noise = 0x00;
uint8_t vcfFreq = 0x3c; // 0x3f80
uint8_t vcfReso = 0x00;
uint8_t vcfEnv = 0x2e;
uint8_t vcfLfo = 0;
uint8_t vcfKey = 0x47;
uint8_t vca = 0x28;
uint8_t env_a = 0x1b;
uint8_t env_d = 0x39;
uint8_t env_s = 0x39; // 0x3f80
uint8_t env_r = 0x30;
uint8_t sub = 0x00;
uint8_t switch1 = 0x1a;
uint8_t switch2 = 0x18;
} patchRam;
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Chassis); DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Chassis);
}; };

View File

@ -144,7 +144,7 @@ DistrhoUIchassis::~DistrhoUIchassis() {
} }
void DistrhoUIchassis::programLoaded(uint32_t index) { void DistrhoUIchassis::programLoaded(uint32_t index) {
printf("in programLoaded %d\n", index); // printf("in programLoaded %d\n", i
switch (index) { switch (index) {
case Chassis::pLFORate: case Chassis::pLFORate:
xSliderLFORate->setValue(0.5); xSliderLFORate->setValue(0.5);
@ -157,29 +157,15 @@ void DistrhoUIchassis::programLoaded(uint32_t index) {
} }
} }
void DistrhoUIchassis::parameterChanged(uint32_t index, float value) { void DistrhoUIchassis::parameterChanged(uint32_t index, float value) {
printf("in parameterchanged %d %f\n", index, value); // printf("in parameterchanged %d %f\n", index, value);
if (index == Chassis::pLFORate) {
switch(index) { xSliderLFORate->setValue(value);
case Chassis::pLFORate: xSliderLFORate->setValue(value); break; printf("changed lforate\n");
case Chassis::pLFODelay: xSliderLFODelay->setValue(value); break; }
case Chassis::pLFODepth: xSliderLFODepth->setValue(value); break; if (index == Chassis::pLFODelay) {
case Chassis::pPWMDepth: xSliderPWMDepth->setValue(value); break; xSliderLFODelay->setValue(value);
case Chassis::pSubLevel: xSliderSubLevel->setValue(value); break; printf("changed lfoDelay\n");
case Chassis::pNoiseLevel: xSliderNoiseLevel->setValue(value); break;
case Chassis::pHPF: xSliderHPF->setValue(value); break;
case Chassis::pCutoff: xSliderCutoff->setValue(value); break;
case Chassis::pRes: xSliderRes->setValue(value); break;
case Chassis::pEnv: xSliderEnv->setValue(value); break;
case Chassis::pLfo: xSliderLfo->setValue(value); break;
case Chassis::pKyb: xSliderKyb->setValue(value); break;
case Chassis::pAtk: xSliderAtk->setValue(value); break;
case Chassis::pDcy: xSliderDcy->setValue(value); break;
case Chassis::pStn: xSliderStn->setValue(value); break;
case Chassis::pRls: xSliderRls->setValue(value); break;
} }
} }
void DistrhoUIchassis::imageSliderDragStarted(ImageSlider* slider) { void DistrhoUIchassis::imageSliderDragStarted(ImageSlider* slider) {