diff --git a/Makefile b/Makefile index 9f2a1a5..62c796b 100644 --- a/Makefile +++ b/Makefile @@ -134,10 +134,19 @@ install: install -d $(DESTDIR)$(PREFIX)/share/Cardinal cp -rL bin/Cardinal.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/ - cp -rL bin/Cardinal.vst $(DESTDIR)$(PREFIX)/lib/vst/ cp -rL bin/Cardinal.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/ + cp -rL bin/CardinalFX.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/ + cp -rL bin/CardinalFX.vst $(DESTDIR)$(PREFIX)/lib/vst/ + cp -rL bin/CardinalFX.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/ + + cp -rL bin/CardinalSynth.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/ + cp -rL bin/CardinalSynth.vst $(DESTDIR)$(PREFIX)/lib/vst/ + cp -rL bin/CardinalSynth.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/ + install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ + install -m 755 bin/CardinalFX$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ + install -m 755 bin/CardinalSynth$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/Cardinal/ # -------------------------------------------------------------- diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 88c3c19..1245ec8 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -213,12 +213,12 @@ struct IldaeilModule : Module { enum InputIds { INPUT1, INPUT2, - PITCH_INPUT, - GATE_INPUT, - VEL_INPUT, - AFT_INPUT, - PW_INPUT, - MW_INPUT, + PITCH_INPUT, + GATE_INPUT, + VEL_INPUT, + AFT_INPUT, + PW_INPUT, + MW_INPUT, NUM_INPUTS }; enum OutputIds { @@ -260,12 +260,12 @@ struct IldaeilModule : Module { configInput(i, name); configOutput(i, name); } - configInput(PITCH_INPUT, "Pitch (1V/oct)"); - configInput(GATE_INPUT, "Gate"); - configInput(VEL_INPUT, "Velocity"); - configInput(AFT_INPUT, "Aftertouch"); - configInput(PW_INPUT, "Pitch wheel"); - configInput(MW_INPUT, "Mod wheel"); + configInput(PITCH_INPUT, "Pitch (1V/oct)"); + configInput(GATE_INPUT, "Gate"); + configInput(VEL_INPUT, "Velocity"); + configInput(AFT_INPUT, "Aftertouch"); + configInput(PW_INPUT, "Pitch wheel"); + configInput(MW_INPUT, "Mod wheel"); std::memset(audioDataOut1, 0, sizeof(audioDataOut1)); std::memset(audioDataOut2, 0, sizeof(audioDataOut2)); @@ -429,22 +429,22 @@ struct IldaeilModule : Module { outputs[OUTPUT1].setVoltage(audioDataOut1[i] * 10.0f); outputs[OUTPUT2].setVoltage(audioDataOut2[i] * 10.0f); - midiGenerator.setFrame(i); + midiGenerator.setFrame(i); - for (int c = 0; c < inputs[PITCH_INPUT].getChannels(); c++) { - int vel = (int) std::round(inputs[VEL_INPUT].getNormalPolyVoltage(10.f * 100 / 127, c) / 10.f * 127); - vel = clamp(vel, 0, 127); - midiGenerator.setVelocity(vel, c); + for (int c = 0; c < inputs[PITCH_INPUT].getChannels(); c++) { + int vel = (int) std::round(inputs[VEL_INPUT].getNormalPolyVoltage(10.f * 100 / 127, c) / 10.f * 127); + vel = clamp(vel, 0, 127); + midiGenerator.setVelocity(vel, c); - int note = (int) std::round(inputs[PITCH_INPUT].getVoltage(c) * 12.f + 60.f); - note = clamp(note, 0, 127); - bool gate = inputs[GATE_INPUT].getPolyVoltage(c) >= 1.f; - midiGenerator.setNoteGate(note, gate, c); + int note = (int) std::round(inputs[PITCH_INPUT].getVoltage(c) * 12.f + 60.f); + note = clamp(note, 0, 127); + bool gate = inputs[GATE_INPUT].getPolyVoltage(c) >= 1.f; + midiGenerator.setNoteGate(note, gate, c); - int aft = (int) std::round(inputs[AFT_INPUT].getPolyVoltage(c) / 10.f * 127); - aft = clamp(aft, 0, 127); - midiGenerator.setKeyPressure(aft, c); - } + int aft = (int) std::round(inputs[AFT_INPUT].getPolyVoltage(c) / 10.f * 127); + aft = clamp(aft, 0, 127); + midiGenerator.setKeyPressure(aft, c); + } int pw = (int) std::round((inputs[PW_INPUT].getVoltage() + 5.f) / 10.f * 0x4000); pw = clamp(pw, 0, 0x3fff); @@ -464,10 +464,10 @@ struct IldaeilModule : Module { } } - void onReset() override + void onReset() override { - midiGenerator.reset(); - } + midiGenerator.reset(); + } void onSampleRateChange(const SampleRateChangeEvent& e) override {