From 5188b50a4f813a088cdc9635f4c183106cf66b95 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 00:18:43 +0000 Subject: [PATCH 001/132] Update/sync to Rack 2.1 Signed-off-by: falkTX --- plugins/Cardinal/src/HostMIDI-CC.cpp | 79 +++++++++++------ plugins/Cardinal/src/HostMIDI-Gate.cpp | 118 ++++++++++++++++--------- plugins/Cardinal/src/HostMIDI.cpp | 79 ++++++++++------- src/Makefile.cardinal.mk | 2 +- src/Rack | 2 +- src/override/MenuBar.cpp | 2 +- src/override/common.cpp | 2 +- src/override/diffs/Engine.cpp.diff | 4 +- src/override/diffs/MenuBar.cpp.diff | 38 ++++---- src/override/diffs/Model.cpp.diff | 4 +- src/override/diffs/Scene.cpp.diff | 14 ++- src/override/diffs/Window.cpp.diff | 4 +- src/override/diffs/blendish.c.diff | 4 +- src/override/diffs/common.cpp.diff | 6 +- src/override/diffs/context.cpp.diff | 4 +- src/override/diffs/plugin.cpp.diff | 4 +- 16 files changed, 223 insertions(+), 143 deletions(-) diff --git a/plugins/Cardinal/src/HostMIDI-CC.cpp b/plugins/Cardinal/src/HostMIDI-CC.cpp index 505fc7d..9e48a1d 100644 --- a/plugins/Cardinal/src/HostMIDI-CC.cpp +++ b/plugins/Cardinal/src/HostMIDI-CC.cpp @@ -101,12 +101,12 @@ struct HostMIDICC : TerminalModule { lastBlockFrame = -1; channel = 0; - for (int cc = 0; cc < 128; cc++) { + for (uint8_t cc = 0; cc < 128; cc++) { for (int c = 0; c < 16; c++) { ccValues[cc][c] = 0; } } - for (int cc = 0; cc < 32; cc++) { + for (uint8_t cc = 0; cc < 32; cc++) { for (int c = 0; c < 16; c++) { msbValues[cc][c] = 0; } @@ -121,7 +121,7 @@ struct HostMIDICC : TerminalModule { lsbMode = false; } - bool process(const ProcessArgs& args, std::vector& outputs, int learnedCcs[16], + bool process(const ProcessArgs& args, std::vector& outputs, int8_t learnedCcs[16], const bool isBypassed) { // Cardinal specific @@ -181,12 +181,21 @@ struct HostMIDICC : TerminalModule { // adapted from Rack const uint8_t c = mpeMode ? chan : 0; - const uint8_t cc = data[1]; + const int8_t cc = data[1]; const uint8_t value = data[2]; // Learn if (learningId >= 0 && ccValues[cc][c] != value) { + // NOTE: does the same as `setLearnedCc` + if (cc >= 0) + { + for (int id = 0; id < 16; ++id) + { + if (learnedCcs[id] == cc) + learnedCcs[id] = -1; + } + } learnedCcs[learningId] = cc; learningId = -1; } @@ -219,7 +228,10 @@ struct HostMIDICC : TerminalModule { continue; outputs[CC_OUTPUT + i].setChannels(channels); - int cc = learnedCcs[i]; + const int8_t cc = learnedCcs[i]; + + if (cc < 0) + continue; for (int c = 0; c < channels; c++) { @@ -365,7 +377,7 @@ struct HostMIDICC : TerminalModule { } midiOutput; - int learnedCcs[16]; + int8_t learnedCcs[16]; HostMIDICC() : pcontext(static_cast(APP)), @@ -377,14 +389,14 @@ struct HostMIDICC : TerminalModule { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - for (int i = 0; i < 16; i++) - configInput(CC_INPUTS + i, string::f("Cell %d", i + 1)); + for (int id = 0; id < 16; ++id) + configInput(CC_INPUTS + id, string::f("Cell %d", id + 1)); configInput(CC_INPUT_CH_PRESSURE, "Channel pressure"); configInput(CC_INPUT_PITCHBEND, "Pitchbend"); - for (int i = 0; i < 16; i++) - configOutput(CC_OUTPUT + i, string::f("Cell %d", i + 1)); + for (int id = 0; id < 16; ++id) + configOutput(CC_OUTPUT + id, string::f("Cell %d", id + 1)); configOutput(CC_OUTPUT_CH_PRESSURE, "Channel pressure"); configOutput(CC_OUTPUT_PITCHBEND, "Pitchbend"); @@ -394,9 +406,8 @@ struct HostMIDICC : TerminalModule { void onReset() override { - for (int i = 0; i < 16; i++) { - learnedCcs[i] = i + 1; - } + for (int id = 0; id < 16; ++id) + learnedCcs[id] = id + 1; midiInput.reset(); midiOutput.reset(); } @@ -416,8 +427,10 @@ struct HostMIDICC : TerminalModule { for (int i = 0; i < 16; i++) { - int value = (int) std::round(inputs[CC_INPUTS + i].getVoltage() / 10.f * 127); - value = clamp(value, 0, 127); + if (learnedCcs[id] < 0) + continue; + + uint8_t value = (uint8_t) clamp(std::round(inputs[CC_INPUTS + id].getVoltage() / 10.f * 127), 0.f, 127.f); midiOutput.sendCC(learnedCcs[i], value); } @@ -434,6 +447,20 @@ struct HostMIDICC : TerminalModule { } } + void setLearnedCc(const int id, const int8_t cc) + { + // Unset IDs of similar CCs + if (cc >= 0) + { + for (int idx = 0; idx < 16; ++idx) + { + if (learnedCcs[idx] == cc) + learnedCcs[idx] = -1; + } + } + learnedCcs[id] = cc; + } + json_t* dataToJson() override { json_t* const rootJ = json_object(); @@ -442,8 +469,8 @@ struct HostMIDICC : TerminalModule { // input and output if (json_t* const ccsJ = json_array()) { - for (int i = 0; i < 16; i++) - json_array_append_new(ccsJ, json_integer(learnedCcs[i])); + for (int id = 0; id < 16; ++id) + json_array_append_new(ccsJ, json_integer(learnedCcs[id])); json_object_set_new(rootJ, "ccs", ccsJ); } @@ -473,12 +500,12 @@ struct HostMIDICC : TerminalModule { // input and output if (json_t* const ccsJ = json_object_get(rootJ, "ccs")) { - for (int i = 0; i < 16; i++) + for (int id = 0; id < 16; ++id) { - if (json_t* const ccJ = json_array_get(ccsJ, i)) - learnedCcs[i] = json_integer_value(ccJ); + if (json_t* const ccJ = json_array_get(ccsJ, id)) + setLearnedCc(id, json_integer_value(ccJ)); else - learnedCcs[i] = i + 1; + learnedCcs[id] = -1; } } @@ -524,7 +551,7 @@ struct HostMIDICC : TerminalModule { struct CardinalCcChoice : CardinalLedDisplayChoice { HostMIDICC* const module; const int id; - int focusCc = -1; + int8_t focusCc = -1; CardinalCcChoice(HostMIDICC* const m, const int i) : CardinalLedDisplayChoice(), @@ -540,7 +567,7 @@ struct CardinalCcChoice : CardinalLedDisplayChoice { void step() override { - int cc; + int8_t cc; if (module == nullptr) { @@ -583,8 +610,8 @@ struct CardinalCcChoice : CardinalLedDisplayChoice { if (module->midiInput.learningId == id) { - if (0 <= focusCc && focusCc < 128) - module->learnedCcs[id] = focusCc; + if (focusCc >= 0) + module->setLearnedCc(id, focusCc); module->midiInput.learningId = -1; } } @@ -600,7 +627,7 @@ struct CardinalCcChoice : CardinalLedDisplayChoice { focusCc = focusCc * 10 + (c - '0'); } - if (focusCc >= 128) + if (focusCc < 0) focusCc = -1; e.consume(this); diff --git a/plugins/Cardinal/src/HostMIDI-Gate.cpp b/plugins/Cardinal/src/HostMIDI-Gate.cpp index 7232c9a..abd6a74 100644 --- a/plugins/Cardinal/src/HostMIDI-Gate.cpp +++ b/plugins/Cardinal/src/HostMIDI-Gate.cpp @@ -104,7 +104,7 @@ struct HostMIDIGate : TerminalModule { } bool process(const ProcessArgs& args, std::vector& outputs, - const bool velocityMode, uint8_t learnedNotes[18], const bool isBypassed) + const bool velocityMode, int8_t learnedNotes[18], const bool isBypassed) { // Cardinal specific const int64_t blockFrame = pcontext->engine->getBlockFrame(); @@ -153,17 +153,30 @@ struct HostMIDIGate : TerminalModule { if (data[2] > 0) { const int c = mpeMode ? (data[0] & 0x0F) : 0; + const int8_t note = data[1]; // Learn - if (learningId >= 0) { - learnedNotes[learningId] = data[1]; + if (learningId >= 0) + { + // NOTE: does the same as `setLearnedNote` + if (note >= 0) + { + for (int id = 0; id < 18; ++id) + { + if (learnedNotes[id] == note) + learnedNotes[id] = -1; + } + } + learnedNotes[learningId] = note; learningId = -1; } // Find id - for (int i = 0; i < 18; i++) { - if (learnedNotes[i] == data[1]) { - gates[i][c] = true; - gateTimes[i][c] = 1e-3f; - velocities[i][c] = data[2]; + for (int id = 0; id < 18; ++id) + { + if (learnedNotes[id] == note) + { + gates[id][c] = true; + gateTimes[id][c] = 1e-3f; + velocities[id][c] = data[2]; } } break; @@ -172,11 +185,12 @@ struct HostMIDIGate : TerminalModule { // note off case 0x80: const int c = mpeMode ? (data[0] & 0x0F) : 0; + const int8_t note = data[1]; // Find id - for (int i = 0; i < 18; i++) { - if (learnedNotes[i] == data[1]) { - gates[i][c] = false; - } + for (int id = 0; id < 18; ++id) + { + if (learnedNotes[id] == note) + gates[id][c] = false; } break; } @@ -217,7 +231,7 @@ struct HostMIDIGate : TerminalModule { uint8_t channel = 0; // base class vars - int vels[128]; + uint8_t vels[128]; bool lastGates[128]; int64_t frame = 0; @@ -230,7 +244,7 @@ struct HostMIDIGate : TerminalModule { void reset() { // base class vars - for (int note = 0; note < 128; ++note) + for (uint8_t note = 0; note < 128; ++note) { vels[note] = 100; lastGates[note] = false; @@ -245,7 +259,7 @@ struct HostMIDIGate : TerminalModule { // TODO send all notes off CC // Send all note off commands - for (int note = 0; note < 128; note++) + for (uint8_t note = 0; note < 128; note++) { // Note off midi::Message m; @@ -258,12 +272,12 @@ struct HostMIDIGate : TerminalModule { } } - void setVelocity(int vel, int note) + void setVelocity(uint8_t note, uint8_t vel) { vels[note] = vel; } - void setGate(bool gate, int note) + void setGate(uint8_t note, bool gate) { if (gate && !lastGates[note]) { @@ -296,7 +310,8 @@ struct HostMIDIGate : TerminalModule { } midiOutput; bool velocityMode = false; - uint8_t learnedNotes[18] = {}; + int8_t learnedNotes[18] = {}; + dsp::SchmittTrigger cellTriggers[18]; HostMIDIGate() : pcontext(static_cast(APP)), @@ -308,19 +323,19 @@ struct HostMIDIGate : TerminalModule { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - for (int i = 0; i < 18; i++) - configInput(GATE_INPUTS + i, string::f("Gate %d", i + 1)); + for (int id = 0; id < 18; ++id) + configInput(GATE_INPUTS + id, string::f("Gate %d", id + 1)); - for (int i = 0; i < 18; i++) - configOutput(GATE_OUTPUTS + i, string::f("Gate %d", i + 1)); + for (int id = 0; id < 18; ++id) + configOutput(GATE_OUTPUTS + id, string::f("Gate %d", id + 1)); onReset(); } void onReset() override { - for (int i = 0; i < 18; ++i) - learnedNotes[i] = 36 + i; + for (int id = 0; id < 18; ++id) + learnedNotes[id] = 36 + id; velocityMode = false; @@ -341,26 +356,41 @@ struct HostMIDIGate : TerminalModule { if (isBypassed()) return; - for (int i = 0; i < 18; ++i) + for (int id = 0; id < 18; ++id) { - const int note = learnedNotes[i]; + const int8_t note = learnedNotes[id]; + + if (note < 0) + continue; if (velocityMode) { - int vel = (int) std::round(inputs[GATE_INPUTS + i].getVoltage() / 10.f * 127); - vel = clamp(vel, 0, 127); - midiOutput.setVelocity(vel, note); - midiOutput.setGate(vel > 0, note); + uint8_t vel = (uint8_t) clamp(std::round(inputs[GATE_INPUTS + id].getVoltage() / 10.f * 127), 0.f, 127.f); + midiOutput.setVelocity(note, vel); + midiOutput.setGate(note, vel > 0); } else { - const bool gate = inputs[GATE_INPUTS + i].getVoltage() >= 1.f; - midiOutput.setVelocity(100, note); - midiOutput.setGate(gate, note); + const bool gate = inputs[GATE_INPUTS + id].getVoltage() >= 1.f; + midiOutput.setVelocity(note, 100); + midiOutput.setGate(note, gate); } } } + void setLearnedNote(const int id, const int8_t note) { + // Unset IDs of similar note + if (note >= 0) + { + for (int idx = 0; idx < 18; ++idx) + { + if (learnedNotes[idx] == note) + learnedNotes[idx] = -1; + } + } + learnedNotes[id] = note; + } + json_t* dataToJson() override { json_t* const rootJ = json_object(); @@ -369,8 +399,8 @@ struct HostMIDIGate : TerminalModule { // input and output if (json_t* const notesJ = json_array()) { - for (int i = 0; i < 18; i++) - json_array_append_new(notesJ, json_integer(learnedNotes[i])); + for (int id = 0; id < 18; ++id) + json_array_append_new(notesJ, json_integer(learnedNotes[id])); json_object_set_new(rootJ, "notes", notesJ); } json_object_set_new(rootJ, "velocity", json_boolean(velocityMode)); @@ -390,12 +420,12 @@ struct HostMIDIGate : TerminalModule { // input and output if (json_t* const notesJ = json_object_get(rootJ, "notes")) { - for (int i = 0; i < 18; i++) + for (int id = 0; id < 18; ++id) { - if (json_t* const noteJ = json_array_get(notesJ, i)) - learnedNotes[i] = json_integer_value(noteJ); + if (json_t* const noteJ = json_array_get(notesJ, id)) + setLearnedNote(id, json_integer_value(noteJ)); else - learnedNotes[i] = -1; + learnedNotes[id] = -1; } } @@ -430,7 +460,7 @@ struct HostMIDIGate : TerminalModule { struct CardinalNoteChoice : CardinalLedDisplayChoice { HostMIDIGate* const module; const int id; - int focusNote = -1; + int8_t focusNote = -1; CardinalNoteChoice(HostMIDIGate* const m, const int i) : CardinalLedDisplayChoice(), @@ -439,7 +469,7 @@ struct CardinalNoteChoice : CardinalLedDisplayChoice { void step() override { - int note; + int8_t note; if (module == nullptr) { @@ -489,8 +519,8 @@ struct CardinalNoteChoice : CardinalLedDisplayChoice { if (module->midiInput.learningId == id) { - if (0 <= focusNote && focusNote < 128) - module->learnedNotes[id] = focusNote; + if (focusNote >= 0) + module->setLearnedNote(id, focusNote); module->midiInput.learningId = -1; } } @@ -518,7 +548,7 @@ struct CardinalNoteChoice : CardinalLedDisplayChoice { } } - if (focusNote >= 128) + if (focusNote < 0) focusNote = -1; e.consume(this); diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index 3a66ad0..0ab992a 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -86,6 +86,8 @@ struct HostMIDI : TerminalModule { uint8_t channel; // stuff from Rack + /** Number of semitones to bend up/down by pitch wheel */ + float pwRange; bool smooth; int channels; enum PolyMode { @@ -144,6 +146,7 @@ struct HostMIDI : TerminalModule { smooth = true; channels = 1; polyMode = ROTATE_MODE; + pwRange = 2; panic(); } @@ -246,30 +249,20 @@ struct HostMIDI : TerminalModule { ++midiEventFrame; // Rack stuff - outputs[PITCH_OUTPUT].setChannels(channels); - outputs[GATE_OUTPUT].setChannels(channels); - outputs[VELOCITY_OUTPUT].setChannels(channels); - outputs[AFTERTOUCH_OUTPUT].setChannels(channels); - - for (int c = 0; c < channels; c++) { - outputs[PITCH_OUTPUT].setVoltage((notes[c] - 60.f) / 12.f, c); - outputs[GATE_OUTPUT].setVoltage(gates[c] ? 10.f : 0.f, c); - outputs[VELOCITY_OUTPUT].setVoltage(rescale(velocities[c], 0, 127, 0.f, 10.f), c); - outputs[AFTERTOUCH_OUTPUT].setVoltage(rescale(aftertouches[c], 0, 127, 0.f, 10.f), c); - } - // Set pitch and mod wheel const int wheelChannels = (polyMode == MPE_MODE) ? 16 : 1; + float pwValues[16] = {}; outputs[PITCHBEND_OUTPUT].setChannels(wheelChannels); outputs[MODWHEEL_OUTPUT].setChannels(wheelChannels); for (int c = 0; c < wheelChannels; c++) { - float pw = ((int) pws[c] - 8192) / 8191.f; + float pw = (int16_t(pws[c]) - 8192) / 8191.f; pw = clamp(pw, -1.f, 1.f); if (smooth) pw = pwFilters[c].process(args.sampleTime, pw); else pwFilters[c].out = pw; - outputs[PITCHBEND_OUTPUT].setVoltage(pw * 5.f); + pwValues[c] = pw; + outputs[PITCHBEND_OUTPUT].setVoltage(pw * 5.f, c); float mod = mods[c] / 127.f; mod = clamp(mod, 0.f, 1.f); @@ -277,7 +270,22 @@ struct HostMIDI : TerminalModule { mod = modFilters[c].process(args.sampleTime, mod); else modFilters[c].out = mod; - outputs[MODWHEEL_OUTPUT].setVoltage(mod * 10.f); + outputs[MODWHEEL_OUTPUT].setVoltage(mod * 10.f, c); + } + + // Set note outputs + outputs[PITCH_OUTPUT].setChannels(channels); + outputs[GATE_OUTPUT].setChannels(channels); + outputs[VELOCITY_OUTPUT].setChannels(channels); + outputs[AFTERTOUCH_OUTPUT].setChannels(channels); + + for (int c = 0; c < channels; c++) { + float pw = pwValues[(polyMode == MPE_MODE) ? c : 0]; + float pitch = (notes[c] - 60.f + pw * pwRange) / 12.f; + outputs[PITCH_OUTPUT].setVoltage(pitch, c); + outputs[GATE_OUTPUT].setVoltage(gates[c] ? 10.f : 0.f, c); + outputs[VELOCITY_OUTPUT].setVoltage(rescale(velocities[c], 0, 127, 0.f, 10.f), c); + outputs[AFTERTOUCH_OUTPUT].setVoltage(rescale(aftertouches[c], 0, 127, 0.f, 10.f), c); } outputs[START_OUTPUT].setVoltage(startPulse.process(args.sampleTime) ? 10.f : 0.f); @@ -636,6 +644,7 @@ struct HostMIDI : TerminalModule { json_t* const rootJ = json_object(); DISTRHO_SAFE_ASSERT_RETURN(rootJ != nullptr, nullptr); + json_object_set_new(rootJ, "pwRange", json_real(midiInput.pwRange)); json_object_set_new(rootJ, "smooth", json_boolean(midiInput.smooth)); json_object_set_new(rootJ, "channels", json_integer(midiInput.channels)); json_object_set_new(rootJ, "polyMode", json_integer(midiInput.polyMode)); @@ -655,6 +664,12 @@ struct HostMIDI : TerminalModule { void dataFromJson(json_t* const rootJ) override { + if (json_t* const pwRangeJ = json_object_get(rootJ, "pwRange")) + midiInput.pwRange = json_number_value(pwRangeJ); + // For backwards compatibility, set to 0 if undefined in JSON. + else + midiInput.pwRange = 0; + if (json_t* const smoothJ = json_object_get(rootJ, "smooth")) midiInput.smooth = json_boolean_value(smoothJ); @@ -738,6 +753,16 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { menu->addChild(createBoolPtrMenuItem("Smooth pitch/mod wheel", "", &module->midiInput.smooth)); + static const std::vector pwRanges = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48}; + menu->addChild(createSubmenuItem("Pitch bend range", string::f("%g", module->midiInput.pwRange), [=](Menu* menu) { + for (size_t i = 0; i < pwRanges.size(); i++) { + menu->addChild(createCheckMenuItem(string::f("%g", pwRanges[i]), "", + [=]() {return module->midiInput.pwRange == pwRanges[i];}, + [=]() {module->midiInput.pwRange = pwRanges[i];} + )); + } + })); + struct InputChannelItem : MenuItem { HostMIDI* module; Menu* createChildMenu() override { @@ -758,24 +783,14 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { inputChannelItem->module = module; menu->addChild(inputChannelItem); - struct PolyphonyChannelItem : MenuItem { - HostMIDI* module; - Menu* createChildMenu() override { - Menu* menu = new Menu; - for (int c = 1; c <= 16; c++) { - menu->addChild(createCheckMenuItem((c == 1) ? "Monophonic" : string::f("%d", c), "", - [=]() {return module->midiInput.channels == c;}, - [=]() {module->midiInput.setChannels(c);} - )); - } - return menu; + menu->addChild(createSubmenuItem("Polyphony channels", string::f("%d", module->midiInput.channels), [=](Menu* menu) { + for (int c = 1; c <= 16; c++) { + menu->addChild(createCheckMenuItem((c == 1) ? "Monophonic" : string::f("%d", c), "", + [=]() {return module->midiInput.channels == c;}, + [=]() {module->midiInput.setChannels(c);} + )); } - }; - PolyphonyChannelItem* const polyphonyChannelItem = new PolyphonyChannelItem; - polyphonyChannelItem->text = "Polyphony channels"; - polyphonyChannelItem->rightText = string::f("%d", module->midiInput.channels) + " " + RIGHT_ARROW; - polyphonyChannelItem->module = module; - menu->addChild(polyphonyChannelItem); + })); menu->addChild(createIndexPtrSubmenuItem("Polyphony mode", { "Rotate", diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index fe4022f..c5c0c63 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -206,7 +206,7 @@ ifeq ($(MACOS),true) LINK_FLAGS += -framework IOKit else ifeq ($(WINDOWS),true) # needed by VCVRack -EXTRA_LIBS += -ldbghelp -lshlwapi +EXTRA_LIBS += -ldbghelp -lshlwapi -Wl,--stack,0x100000 # needed by JW-Modules EXTRA_LIBS += -lws2_32 -lwinmm endif diff --git a/src/Rack b/src/Rack index 0d003b9..30665d6 160000 --- a/src/Rack +++ b/src/Rack @@ -1 +1 @@ -Subproject commit 0d003b96476af45102117c2bb958aeb59eb523cf +Subproject commit 30665d62801c2ced7260a37a2d0214edfe6528a9 diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index d9e179e..84bf88d 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -534,7 +534,7 @@ struct HelpButton : MenuButton { menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); menu->addChild(createMenuItem("Rack User manual", "F1", [=]() { - system::openBrowser("https://vcvrack.com/manual/"); + system::openBrowser("https://vcvrack.com/manual"); })); menu->addChild(createMenuItem("Cardinal Project page", "", [=]() { diff --git a/src/override/common.cpp b/src/override/common.cpp index 941dc6a..f469d3e 100644 --- a/src/override/common.cpp +++ b/src/override/common.cpp @@ -50,7 +50,7 @@ const std::string APP_NAME = "Cardinal"; const std::string APP_EDITION = getPluginFormatName(); const std::string APP_EDITION_NAME = "Audio Plugin"; const std::string APP_VERSION_MAJOR = "2"; -const std::string APP_VERSION = "2.0"; +const std::string APP_VERSION = "2.1"; #if defined ARCH_WIN const std::string APP_OS = "win"; #elif ARCH_MAC diff --git a/src/override/diffs/Engine.cpp.diff b/src/override/diffs/Engine.cpp.diff index 93ae09b..bd22378 100644 --- a/src/override/diffs/Engine.cpp.diff +++ b/src/override/diffs/Engine.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/engine/Engine.cpp 2022-01-15 11:59:46.188414546 +0000 -+++ Engine.cpp 2022-02-09 02:13:37.829435608 +0000 +--- ../Rack/src/engine/Engine.cpp 2022-02-05 22:30:09.253393116 +0000 ++++ Engine.cpp 2022-02-10 18:51:20.077011285 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index bb57f4e..97e7180 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/MenuBar.cpp 2022-01-15 11:59:46.188414546 +0000 -+++ MenuBar.cpp 2022-02-14 03:38:00.935519007 +0000 +--- ../Rack/src/app/MenuBar.cpp 2022-02-26 23:08:06.697192725 +0000 ++++ MenuBar.cpp 2022-02-26 23:19:38.779828613 +0000 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin @@ -562,7 +562,7 @@ } }; -@@ -802,63 +528,23 @@ +@@ -802,65 +528,23 @@ struct HelpButton : MenuButton { @@ -584,29 +584,35 @@ - - menu->addChild(createMenuItem("User manual", "F1", [=]() { + menu->addChild(createMenuItem("Rack User manual", "F1", [=]() { - system::openBrowser("https://vcvrack.com/manual/"); + system::openBrowser("https://vcvrack.com/manual"); })); +- menu->addChild(createMenuItem("Support", "", [=]() { +- system::openBrowser("https://vcvrack.com/support"); +- })); +- - menu->addChild(createMenuItem("VCVRack.com", "", [=]() { - system::openBrowser("https://vcvrack.com/"); + menu->addChild(createMenuItem("Cardinal Project page", "", [=]() { + system::openBrowser("https://github.com/DISTRHO/Cardinal/"); })); + menu->addChild(new ui::MenuSeparator); + +- menu->addChild(createMenuLabel(APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION)); +- - menu->addChild(createMenuItem("Open user folder", "", [=]() { - system::openDirectory(asset::user("")); - })); - -- if (library::isAppUpdateAvailable()) { -- menu->addChild(new ui::MenuSeparator); +- menu->addChild(createMenuItem("Changelog", "", [=]() { +- system::openBrowser("https://github.com/VCVRack/Rack/blob/v2/CHANGELOG.md"); +- })); - +- if (library::isAppUpdateAvailable()) { - menu->addChild(createMenuItem("Update " + APP_NAME, APP_VERSION + " → " + library::appVersion, [=]() { - system::openBrowser(library::appDownloadUrl); - })); -- -- menu->addChild(createMenuItem("Review changelog", "", [=]() { -- system::openBrowser(library::appChangelogUrl); -- })); - } - else if (!settings::autoCheckUpdates && !settings::devMode) { - menu->addChild(createMenuItem("Check for " + APP_NAME + " update", "", [=]() { @@ -616,10 +622,6 @@ - t.detach(); - }, false, true)); - } -- - menu->addChild(new ui::MenuSeparator); - -- menu->addChild(createMenuLabel(APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION)); - } - - void step() override { @@ -631,7 +633,7 @@ } }; -@@ -908,7 +594,9 @@ +@@ -910,7 +594,9 @@ struct MenuBar : widget::OpaqueWidget { MeterLabel* meterLabel; @@ -642,7 +644,7 @@ const float margin = 5; box.size.y = BND_WIDGET_HEIGHT + 2 * margin; -@@ -917,7 +605,7 @@ +@@ -919,7 +605,7 @@ layout->spacing = math::Vec(0, 0); addChild(layout); @@ -651,7 +653,7 @@ fileButton->text = "File"; layout->addChild(fileButton); -@@ -933,10 +621,6 @@ +@@ -935,10 +621,6 @@ engineButton->text = "Engine"; layout->addChild(engineButton); @@ -662,7 +664,7 @@ HelpButton* helpButton = new HelpButton; helpButton->text = "Help"; layout->addChild(helpButton); -@@ -971,7 +655,11 @@ +@@ -973,7 +655,11 @@ widget::Widget* createMenuBar() { diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index 7bf764b..db373a9 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin/Model.cpp 2021-10-20 03:28:14.516922788 +0100 -+++ Model.cpp 2022-01-24 00:11:36.628498885 +0000 +--- ../Rack/src/plugin/Model.cpp 2021-10-17 13:57:23.257633662 +0100 ++++ Model.cpp 2022-01-23 17:13:22.080013846 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index c0ba241..0cd748a 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/Scene.cpp 2021-12-04 09:46:43.912932319 +0000 -+++ Scene.cpp 2022-02-11 05:30:49.567801073 +0000 +--- ../Rack/src/app/Scene.cpp 2022-02-26 23:08:06.701192797 +0000 ++++ Scene.cpp 2022-02-17 23:13:46.013018500 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -58,7 +58,7 @@ namespace rack { namespace app { -@@ -23,16 +63,55 @@ +@@ -23,21 +63,60 @@ math::Vec size; void draw(const DrawArgs& args) override { @@ -120,6 +120,12 @@ size = APP->window->getSize(); } + void onDragMove(const DragMoveEvent& e) override { +- size = size.plus(e.mouseDelta); ++ size = size.plus(e.mouseDelta.mult(APP->window->pixelRatio)); + APP->window->setSize(size.round()); + } + }; @@ -46,9 +125,32 @@ struct Scene::Internal { ResizeHandle* resizeHandle; @@ -283,7 +289,7 @@ // Key commands that can be overridden by children if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { -- // Alternate key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding. +- // Alternative key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding. - if (e.key == GLFW_KEY_ESCAPE && (e.mods & RACK_MOD_MASK) == 0) { - if (APP->window->isFullScreen()) { - APP->window->setFullScreen(false); diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index 72d9b62..5127b8d 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/window/Window.cpp 2022-01-01 15:50:17.777305924 +0000 -+++ Window.cpp 2022-02-13 02:07:46.554983286 +0000 +--- ../Rack/src/window/Window.cpp 2022-02-09 15:35:19.238863170 +0000 ++++ Window.cpp 2022-02-13 21:19:37.799091196 +0000 @@ -1,33 +1,83 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/blendish.c.diff b/src/override/diffs/blendish.c.diff index dbc4bbe..79696cd 100644 --- a/src/override/diffs/blendish.c.diff +++ b/src/override/diffs/blendish.c.diff @@ -1,5 +1,5 @@ ---- ../Rack/dep/oui-blendish/blendish.c 2021-12-12 16:59:23.714275191 +0000 -+++ blendish.c 2021-12-12 16:51:37.956349106 +0000 +--- ../Rack/dep/oui-blendish/blendish.c 2021-10-17 13:57:24.613620711 +0100 ++++ blendish.c 2021-12-13 09:36:22.182673256 +0000 @@ -61,7 +61,7 @@ } diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index 0dc78a3..b141ed2 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/common.cpp 2021-12-04 09:46:43.912932319 +0000 -+++ common.cpp 2022-01-24 00:11:36.628498885 +0000 +--- ../Rack/src/common.cpp 2021-11-23 19:57:23.719015894 +0000 ++++ common.cpp 2022-02-27 00:17:50.908149000 +0000 @@ -1,6 +1,38 @@ +/* + * DISTRHO Cardinal Plugin @@ -52,7 +52,7 @@ +const std::string APP_EDITION_NAME = "Audio Plugin"; const std::string APP_VERSION_MAJOR = "2"; -const std::string APP_VERSION = TOSTRING(_APP_VERSION); -+const std::string APP_VERSION = "2.0"; ++const std::string APP_VERSION = "2.1"; #if defined ARCH_WIN const std::string APP_OS = "win"; #elif ARCH_MAC diff --git a/src/override/diffs/context.cpp.diff b/src/override/diffs/context.cpp.diff index 1499c04..72729b9 100644 --- a/src/override/diffs/context.cpp.diff +++ b/src/override/diffs/context.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/context.cpp 2022-01-15 11:59:46.188414546 +0000 -+++ context.cpp 2022-01-24 00:11:36.628498885 +0000 +--- ../Rack/src/context.cpp 2022-02-05 22:30:09.253393116 +0000 ++++ context.cpp 2022-01-23 17:13:11.652514338 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/plugin.cpp.diff b/src/override/diffs/plugin.cpp.diff index 7da6c3c..73c7cb7 100644 --- a/src/override/diffs/plugin.cpp.diff +++ b/src/override/diffs/plugin.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin.cpp 2022-01-15 11:59:46.188414546 +0000 -+++ plugin.cpp 2022-01-30 02:49:08.228488442 +0000 +--- ../Rack/src/plugin.cpp 2022-02-05 22:30:09.265393248 +0000 ++++ plugin.cpp 2022-01-30 00:24:49.375329910 +0000 @@ -1,308 +1,40 @@ -#include -#include From 80f90ff45a356e1e9947f299f1a6fdca7e142ac6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 00:23:40 +0000 Subject: [PATCH 002/132] Fix Host MIDI-CC chan.pressure and pitchbend interfering with CCs Signed-off-by: falkTX --- plugins/Cardinal/src/HostMIDI-CC.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/Cardinal/src/HostMIDI-CC.cpp b/plugins/Cardinal/src/HostMIDI-CC.cpp index 9e48a1d..850f7a5 100644 --- a/plugins/Cardinal/src/HostMIDI-CC.cpp +++ b/plugins/Cardinal/src/HostMIDI-CC.cpp @@ -166,15 +166,17 @@ struct HostMIDICC : TerminalModule { const uint8_t status = data[0] & 0xF0; const uint8_t chan = data[0] & 0x0F; - /**/ if (status == 0xD0) + if (status == 0xD0) { chPressure[chan] = data[1]; + continue; } - else if (status == 0xE0) + if (status == 0xE0) { pitchbend[chan] = (data[2] << 7) | data[1]; + continue; } - else if (status != 0xB0) + if (status != 0xB0) { continue; } From 91e5e92296918c82a2ea53c295e636dc46057b77 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 00:59:48 +0000 Subject: [PATCH 003/132] HACK: use downloads.xiph.org for speexdsp vendored tarball Signed-off-by: falkTX --- deps/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index 1d77f37..56ba9a8 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -190,7 +190,10 @@ $(DEP_PATH)/libsamplerate-0.1.9/.stamp-patched: $(DEP_PATH)/lib/libspeexdsp.a: $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched: - $(DEP_MAKE) -C $(DEP_PATH) speexdsp-SpeexDSP-1.2rc3 + $(DEP_MAKE) -C $(DEP_PATH) speexdsp-SpeexDSP-1.2rc3 \ + WGET="wget -c http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz && mv speexdsp-1.2rc3.tar.gz speexdsp-SpeexDSP-1.2rc3.tgz #" \ + SHA256SUM="true" \ + UNTAR="mkdir -p speexdsp-SpeexDSP-1.2rc3 && tar -x --strip-components=1 --directory=$(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 -f" sed -i -e "s/#pragma GCC visibility push/#error we dont want this/" $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/configure touch $@ From f16b18aa642c33bfa334bb95cda4a0a85cd43fcb Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 02:07:15 +0000 Subject: [PATCH 004/132] Fix LTO build --- src/CardinalModuleWidget.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CardinalModuleWidget.cpp b/src/CardinalModuleWidget.cpp index be173ec..145b659 100644 --- a/src/CardinalModuleWidget.cpp +++ b/src/CardinalModuleWidget.cpp @@ -54,7 +54,6 @@ struct ModuleWidget::Internal { math::Vec dragOffset; math::Vec dragRackPos; bool dragEnabled; - math::Vec oldPos; widget::Widget* panel; }; From 4ccd6abc1629046468c9da2481e3897602260b76 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 02:14:56 +0000 Subject: [PATCH 005/132] Sync CardinalModuleWidget::onButton with Rack --- src/CardinalModuleWidget.cpp | 77 +++++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 24 deletions(-) diff --git a/src/CardinalModuleWidget.cpp b/src/CardinalModuleWidget.cpp index 145b659..d287ad8 100644 --- a/src/CardinalModuleWidget.cpp +++ b/src/CardinalModuleWidget.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -37,6 +37,7 @@ #include #include #include +#include #include namespace rack { @@ -299,37 +300,65 @@ static void CardinalModuleWidget__saveSelectionDialog(RackWidget* const w) void CardinalModuleWidget::onButton(const ButtonEvent& e) { - bool selected = APP->scene->rack->isSelected(this); + const bool selected = APP->scene->rack->isSelected(this); if (selected) { - if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) { - ui::Menu* menu = createMenu(); - patchUtils::appendSelectionContextMenu(menu); + if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { + if (e.action == GLFW_PRESS) { + ui::Menu* menu = createMenu(); + patchUtils::appendSelectionContextMenu(menu); + } + e.consume(this); } - e.consume(this); - } + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, false); + e.consume(NULL); + return; + } - OpaqueWidget::onButton(e); + internal->dragOffset = e.pos; + } - if (e.getTarget() == this) { - // Set starting drag position - if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT) { - internal->dragOffset = e.pos; - } - // Toggle selection on Shift-click - if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, !selected); - } - } + e.consume(this); + } - if (!e.isConsumed() && !selected) { - // Open context menu on right-click - if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) { - CardinalModuleWidget__createContextMenu(this, model, module); - e.consume(this); - } + return; } + + // Dispatch event to children + Widget::onButton(e); + e.stopPropagating(); + if (e.isConsumed()) + return; + + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, true); + e.consume(NULL); + return; + } + + // If module positions are locked, don't consume left-click + if (settings::lockModules) { + return; + } + + internal->dragOffset = e.pos; + } + e.consume(this); + } + + // Open context menu on right-click + if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { + CardinalModuleWidget__createContextMenu(this, model, module); + e.consume(this); + } } } From 49842e83e5a0f30726519017c045500d807e8b5e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 04:25:22 +0000 Subject: [PATCH 006/132] Fix a typo --- plugins/Cardinal/src/HostMIDI-CC.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Cardinal/src/HostMIDI-CC.cpp b/plugins/Cardinal/src/HostMIDI-CC.cpp index 850f7a5..45130c3 100644 --- a/plugins/Cardinal/src/HostMIDI-CC.cpp +++ b/plugins/Cardinal/src/HostMIDI-CC.cpp @@ -427,13 +427,13 @@ struct HostMIDICC : TerminalModule { if (isBypassed()) return; - for (int i = 0; i < 16; i++) + for (int id = 0; id < 16; id) { if (learnedCcs[id] < 0) continue; uint8_t value = (uint8_t) clamp(std::round(inputs[CC_INPUTS + id].getVoltage() / 10.f * 127), 0.f, 127.f); - midiOutput.sendCC(learnedCcs[i], value); + midiOutput.sendCC(learnedCcs[id], value); } { From ad36594b354f004adfa4cae59d70a916d2b1b585 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 15:19:09 +0000 Subject: [PATCH 007/132] Cleanup Signed-off-by: falkTX --- plugins/Cardinal/src/HostMIDI-CC.cpp | 60 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/plugins/Cardinal/src/HostMIDI-CC.cpp b/plugins/Cardinal/src/HostMIDI-CC.cpp index 45130c3..d981cd0 100644 --- a/plugins/Cardinal/src/HostMIDI-CC.cpp +++ b/plugins/Cardinal/src/HostMIDI-CC.cpp @@ -68,7 +68,7 @@ struct HostMIDICC : TerminalModule { uint8_t chPressure[16]; uint16_t pitchbend[16]; - // stuff from Rack + // adapted from Rack /** [cc][channel] */ uint8_t ccValues[128][16]; /** When LSB is enabled for CC 0-31, the MSB is stored here until the LSB is received. @@ -85,10 +85,11 @@ struct HostMIDICC : TerminalModule { MidiInput(CardinalPluginContext* const pc) : pcontext(pc) { - for (int i = 0; i < NUM_OUTPUTS; i++) { - for (int c = 0; c < 16; c++) { - valueFilters[i][c].setTau(1 / 30.f); - } + // adapted from Rack + for (int id = 0; id < NUM_OUTPUTS; ++id) + { + for (int c = 0; c < 16; ++c) + valueFilters[id][c].setTau(1 / 30.f); } reset(); } @@ -101,20 +102,14 @@ struct HostMIDICC : TerminalModule { lastBlockFrame = -1; channel = 0; - for (uint8_t cc = 0; cc < 128; cc++) { - for (int c = 0; c < 16; c++) { - ccValues[cc][c] = 0; - } - } - for (uint8_t cc = 0; cc < 32; cc++) { - for (int c = 0; c < 16; c++) { - msbValues[cc][c] = 0; - } - } - for (int c = 0; c < 16; c++) { - chPressure[c] = 0; + // adapted from Rack + std::memset(ccValues, 0, sizeof(ccValues)); + std::memset(msbValues, 0, sizeof(msbValues)); + std::memset(chPressure, 0, sizeof(chPressure)); + + for (int c = 0; c < 16; ++c) pitchbend[c] = 8192; - } + learningId = -1; smooth = true; mpeMode = false; @@ -181,7 +176,7 @@ struct HostMIDICC : TerminalModule { continue; } - // adapted from Rack + // adapted from Rack `processCC` const uint8_t c = mpeMode ? chan : 0; const int8_t cc = data[1]; const uint8_t value = data[2]; @@ -207,7 +202,7 @@ struct HostMIDICC : TerminalModule { // Don't set MSB yet. Wait for LSB to be received. msbValues[cc][c] = value; } - else if (lsbMode && 32 <= cc && cc < 64) + else if (lsbMode && cc >= 32 && cc < 64) { // Apply MSB when LSB is received ccValues[cc - 32][c] = msbValues[cc - 32][c]; @@ -224,18 +219,21 @@ struct HostMIDICC : TerminalModule { // Rack stuff const int channels = mpeMode ? 16 : 1; - for (int i = 0; i < 16; i++) + for (int id = 0; id < 16; ++id) { - if (!outputs[CC_OUTPUT + i].isConnected()) + if (!outputs[CC_OUTPUT + id].isConnected()) continue; - outputs[CC_OUTPUT + i].setChannels(channels); + outputs[CC_OUTPUT + id].setChannels(channels); - const int8_t cc = learnedCcs[i]; + const int8_t cc = learnedCcs[id]; if (cc < 0) + { + outputs[CC_OUTPUT + id].clearVoltages(); continue; + } - for (int c = 0; c < channels; c++) + for (int c = 0; c < channels; ++c) { int16_t cellValue = int16_t(ccValues[cc][c]) * 128; if (lsbMode && cc < 32) @@ -245,18 +243,18 @@ struct HostMIDICC : TerminalModule { const float value = static_cast(cellValue) / (128.0f * 127.0f); // Detect behavior from MIDI buttons. - if (smooth && std::fabs(valueFilters[i][c].out - value) < 1.f) + if (smooth && std::fabs(valueFilters[id][c].out - value) < 1.f) { // Smooth value with filter - valueFilters[i][c].process(args.sampleTime, value); + valueFilters[id][c].process(args.sampleTime, value); } else { // Jump value - valueFilters[i][c].out = value; + valueFilters[id][c].out = value; } - outputs[CC_OUTPUT + i].setVoltage(valueFilters[i][c].out * 10.f, c); + outputs[CC_OUTPUT + id].setVoltage(valueFilters[id][c].out * 10.f, c); } } @@ -264,7 +262,7 @@ struct HostMIDICC : TerminalModule { { outputs[CC_OUTPUT_CH_PRESSURE].setChannels(channels); - for (int c = 0; c < channels; c++) + for (int c = 0; c < channels; ++c) { const float value = static_cast(chPressure[c]) / 128.0f; @@ -288,7 +286,7 @@ struct HostMIDICC : TerminalModule { { outputs[CC_OUTPUT_PITCHBEND].setChannels(channels); - for (int c = 0; c < channels; c++) + for (int c = 0; c < channels; ++c) { const float value = static_cast(pitchbend[c]) / 16384.0f; From 5e8a03d3dddee3ba0398aac19293667ded972b3a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Feb 2022 15:20:14 +0000 Subject: [PATCH 008/132] Fix infinite loop, sorry! Signed-off-by: falkTX --- plugins/Cardinal/src/HostMIDI-CC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Cardinal/src/HostMIDI-CC.cpp b/plugins/Cardinal/src/HostMIDI-CC.cpp index d981cd0..5b75d28 100644 --- a/plugins/Cardinal/src/HostMIDI-CC.cpp +++ b/plugins/Cardinal/src/HostMIDI-CC.cpp @@ -425,7 +425,7 @@ struct HostMIDICC : TerminalModule { if (isBypassed()) return; - for (int id = 0; id < 16; id) + for (int id = 0; id < 16; ++id) { if (learnedCcs[id] < 0) continue; From 38c25e6b7867a7238b4219040dde90407994a213 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Feb 2022 14:23:54 +0000 Subject: [PATCH 009/132] Add voxglitch Signed-off-by: falkTX --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 3 +++ plugins/Makefile | 15 +++++++++++++++ plugins/plugins.cpp | 36 ++++++++++++++++++++++++++++++++++++ plugins/voxglitch | 1 + src/custom/dep.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 97 insertions(+) create mode 160000 plugins/voxglitch diff --git a/.gitmodules b/.gitmodules index 0bb90f0..c2ef577 100644 --- a/.gitmodules +++ b/.gitmodules @@ -184,3 +184,6 @@ [submodule "plugins/nonlinearcircuits"] path = plugins/nonlinearcircuits url = https://github.com/mhetrick/nonlinearcircuits.git +[submodule "plugins/voxglitch"] + path = plugins/voxglitch + url = https://github.com/clone45/voxglitch.git diff --git a/README.md b/README.md index 31b8c3d..0c4e9dc 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ At the moment the following 3rd-party modules are provided: - stocaudio - Substation Opensource - Valley +- Voxglitch - ZetaCarinae - ZZC diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 224480b..ce6dc83 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -66,6 +66,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | | Valley | GPL-3.0-or-later | | +| Voxglitch | GPL-3.0-or-later | [License still to be applied in the repo](https://github.com/clone45/voxglitch/issues/123) | | ZetaCarinae | GPL-3.0-or-later | | | ZZC | GPL-3.0-or-later | | @@ -185,6 +186,8 @@ Below is a list of artwork licenses from plugins | ValleyAudio/din1451alt.ttf | CC-BY-3.0-DE | | | ValleyAudio/DSEG14Classic-*.ttf | OFL-1.1-RFN | | | ValleyAudio/ShareTechMono-*.ttf | OFL-1.1-RFN | | +| voxglitch/* | BSD-3-Clause | No artwork specific license provided | +| voxglitch/ShareTechMono-Regular.ttf | OFL-1.1-RFN | | | ZetaCarinaeModules/* | GPL-3.0-or-later | [Same license as source code](https://github.com/mhampton/ZetaCarinaeModules/issues/8) | | ZZC/* | CC-BY-NC-SA-4.0 | | | ZZC/panels/* | CC-BY-NC-SA-4.0 | NOTE: The ZZC Logo is Copyright (c) 2019 Sergey Ukolov and cannot be used in derivative works; Cardinal's use does not officially constitute derivative work. | diff --git a/plugins/Makefile b/plugins/Makefile index f7085aa..5409da7 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -820,6 +820,14 @@ PLUGIN_BINARIES += ValleyAudio/src/XFADE.bin VALLEYAUDIO_CUSTOM = $(DRWAV) DigitalDisplay VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob +# -------------------------------------------------------------- +# Voxglitch + +PLUGIN_FILES += $(filter-out voxglitch/src/plugin.cpp,$(wildcard voxglitch/src/*.cpp)) + +# modules/types which are present in other plugins +VOXGLITCH_CUSTOM = $(DRWAV) Readout + # -------------------------------------------------------------- # ZetaCarinaeModules @@ -1679,6 +1687,13 @@ $(BUILD_DIR)/ValleyAudio/%.cpp.o: ValleyAudio/%.cpp -Wno-sign-compare \ -Wno-unused-but-set-variable +$(BUILD_DIR)/voxglitch/%.cpp.o: voxglitch/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(VOXGLITCH_CUSTOM),$(call custom_module_names,$(m),Voxglitch)) \ + -DpluginInstance=pluginInstance__Voxglitch + $(BUILD_DIR)/ZetaCarinaeModules/%.cpp.o: ZetaCarinaeModules/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 20488ab..849d784 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -665,6 +665,9 @@ extern Model* modelFilterPlus; // ValleyAudio #include "ValleyAudio/src/Valley.hpp" +// Voxglitch +#include "voxglitch/src/plugin.hpp" + // ZetaCarinaeModules #include "ZetaCarinaeModules/src/plugin.hpp" @@ -748,6 +751,7 @@ Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; Plugin* pluginInstance__substation; Plugin* pluginInstance__ValleyAudio; +Plugin* pluginInstance__Voxglitch; Plugin* pluginInstance__ZetaCarinaeModules; Plugin* pluginInstance__ZZC; #endif // NOPLUGINS @@ -2430,6 +2434,37 @@ static void initStatic__ValleyAudio() } } +static void initStatic__Voxglitch() +{ + Plugin* p = new Plugin; + pluginInstance__Voxglitch = p; + + const StaticPluginLoader spl(p, "voxglitch"); + if (spl.ok()) + { + p->addModel(modelAutobreak); + p->addModel(modelByteBeat); + p->addModel(modelDigitalProgrammer); + p->addModel(modelDigitalSequencer); + p->addModel(modelDigitalSequencerXP); + p->addModel(modelGlitchSequencer); + p->addModel(modelGhosts); + p->addModel(modelGoblins); + p->addModel(modelGrainEngine); + p->addModel(modelGrainEngineMK2); + p->addModel(modelGrainEngineMK2Expander); + p->addModel(modelGrainFx); + p->addModel(modelHazumi); + p->addModel(modelLooper); + p->addModel(modelRepeater); + p->addModel(modelSamplerX8); + p->addModel(modelSatanonaut); + p->addModel(modelWavBank); + p->addModel(modelWavBankMC); + p->addModel(modelXY); + } +} + static void initStatic__ZetaCarinaeModules() { Plugin* p = new Plugin; @@ -2532,6 +2567,7 @@ void initStaticPlugins() initStatic__stocaudio(); initStatic__substation(); initStatic__ValleyAudio(); + initStatic__Voxglitch(); initStatic__ZetaCarinaeModules(); initStatic__ZZC(); #endif // NOPLUGINS diff --git a/plugins/voxglitch b/plugins/voxglitch new file mode 160000 index 0000000..c391e1a --- /dev/null +++ b/plugins/voxglitch @@ -0,0 +1 @@ +Subproject commit c391e1a83b73b38125fb007117c40d0f5ee2091c diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 8154f7e..c0b3c4c 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -283,6 +283,26 @@ static const struct { { "/PathSet/res/AstroVibe.svg", {}, -1 }, { "/PathSet/res/IceTray.svg", {}, -1 }, { "/PathSet/res/ShiftyMod.svg", {}, -1 }, + // BSD-3-Clause + { "/voxglitch/res/autobreak_front_panel.svg", {}, -1 }, + { "/voxglitch/res/bytebeat_front_panel.svg", {}, -1 }, + { "/voxglitch/res/digital_programmer_front_panel.svg", {}, -1 }, + { "/voxglitch/res/digital_sequencer_front_panel.svg", {}, -1 }, + { "/voxglitch/res/digital_sequencer_xp_front_panel.svg", {}, -1 }, + { "/voxglitch/res/ghosts_front_panel.svg", {}, -1 }, + { "/voxglitch/res/glitch_sequencer_front_panel.svg", {}, -1 }, + { "/voxglitch/res/goblins_front_panel.svg", {}, -1 }, + { "/voxglitch/res/grain_engine_mk2_expander_front_panel.svg", {}, -1 }, + { "/voxglitch/res/grain_engine_mk2_front_panel_r3.svg", {}, -1 }, + { "/voxglitch/res/grain_fx_front_panel.svg", {}, -1 }, + { "/voxglitch/res/hazumi_front_panel.svg", {}, -1 }, + { "/voxglitch/res/looper_front_panel.svg", {}, -1 }, + { "/voxglitch/res/repeater_front_panel.svg", {}, -1 }, + { "/voxglitch/res/samplerx8_front_panel.svg", {}, -1 }, + { "/voxglitch/res/satanonaut_front_panel.svg", {}, -1 }, + { "/voxglitch/res/wav_bank_front_panel.svg", {}, -1 }, + { "/voxglitch/res/wav_bank_mc_front_panel_v2.svg", {}, -1 }, + { "/voxglitch/res/xy_front_panel.svg", {}, -1 }, }; static inline bool invertPaint(NSVGshape* const shape, NSVGpaint& paint, const char* const svgFileToInvert = nullptr) @@ -458,6 +478,24 @@ static inline bool invertPaint(NSVGshape* const shape, NSVGpaint& paint, const c } } + // Special case for voxglitch colors + if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/voxglitch/", 11) == 0) + { + switch (paint.color) + { + // wavbank blue + case 0xffc5ae8a: + // various black + case 0xff121212: + case 0xff2a2828: + return false; + // satanonaut + case 0xff595959: + paint.color = 0x7f3219ac; + return true; + } + } + switch (paint.color) { // scopes or other special things (do nothing) From aeb4bc63356f66fde5eade76a0ec0a51ba86a8f4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Feb 2022 16:57:55 +0000 Subject: [PATCH 010/132] Add Arable/Parable Instruments, fix Voxglitch Signed-off-by: falkTX --- .gitmodules | 3 + README.md | 2 + docs/LICENSES.md | 4 ++ plugins/ArableInstruments | 1 + plugins/Makefile | 63 ++++++++++++++++++- plugins/ParableInstruments/parasites | 1 + plugins/ParableInstruments/plugin.json | 25 ++++++++ plugins/ParableInstruments/res/CKSS_rot_0.svg | 1 + plugins/ParableInstruments/res/CKSS_rot_1.svg | 1 + plugins/ParableInstruments/res/Neil.png | 1 + plugins/ParableInstruments/res/Neil.svg | 1 + .../src/ArableInstruments.hpp | 1 + plugins/ParableInstruments/src/Clouds.cpp | 1 + plugins/plugins.cpp | 50 ++++++++++++++- src/custom/dep.cpp | 4 ++ 15 files changed, 156 insertions(+), 3 deletions(-) create mode 160000 plugins/ArableInstruments create mode 120000 plugins/ParableInstruments/parasites create mode 100644 plugins/ParableInstruments/plugin.json create mode 120000 plugins/ParableInstruments/res/CKSS_rot_0.svg create mode 120000 plugins/ParableInstruments/res/CKSS_rot_1.svg create mode 120000 plugins/ParableInstruments/res/Neil.png create mode 120000 plugins/ParableInstruments/res/Neil.svg create mode 120000 plugins/ParableInstruments/src/ArableInstruments.hpp create mode 120000 plugins/ParableInstruments/src/Clouds.cpp diff --git a/.gitmodules b/.gitmodules index c2ef577..b2ccb1e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -187,3 +187,6 @@ [submodule "plugins/voxglitch"] path = plugins/voxglitch url = https://github.com/clone45/voxglitch.git +[submodule "plugins/ArableInstruments"] + path = plugins/ArableInstruments + url = https://github.com/CardinalModules/ArableInstruments.git diff --git a/README.md b/README.md index 0c4e9dc..2bf06d0 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ At the moment the following 3rd-party modules are provided: - AlgoritmArte - Amalgamated Harmonics - Animated Circuits +- Arable Instruments - Aria Salvatrice - Audible Instruments - Autinn @@ -147,6 +148,7 @@ At the moment the following 3rd-party modules are provided: - MSM - Nonlinear Circuits - Orbits +- Parable Instruments - Path Set - Prism - rackwindows diff --git a/docs/LICENSES.md b/docs/LICENSES.md index ce6dc83..9eb1703 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -19,6 +19,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | AlgoritmArte | GPL-3.0-or-later | | | Amalgamated Harmonics | BSD-3-Clause | | | Animated Circuits | GPL-3.0-or-later | | +| Arable Instruments | GPL-3.0-or-later | | | Aria Salvatrice | GPL-3.0-or-later | | | Audible Instruments | GPL-3.0-or-later | | | Autinn | GPL-3.0-or-later | | @@ -58,6 +59,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | MSM | MIT | Repo's [LICENSE-dist.md](https://github.com/netboy3/MSM-vcvrack-plugin/issues/10) includes wrong information | | Nonlinear Circuits | CC0-1.0 | | | Orbits | GPL-3.0-or-later | | +| Parable Instruments | GPL-3.0-or-later | | | Path Set | GPL-3.0-or-later | | | Prism | BSD-3-Clause | | | Rackwindows | MIT | | @@ -96,6 +98,7 @@ Below is a list of artwork licenses from plugins | AmalgamatedHarmonics/DSEG*.ttf | OFL-1.1-RFN | | | AmalgamatedHarmonics/Roboto*.ttf | Apache-2.0 | | | AnimatedCircuits/* | CC-BY-NC-SA-4.0 | | +| ArableInstruments/* | Custom | Copyright © Alex Brandt, [used and distributed with permission](https://github.com/adbrant/ArableInstruments/issues/21) | | AriaModules/* | CC-BY-SA-4.0 | | | AriaModules/Arcane/* | CC-BY-NC-SA-3.0 | Unused in Cardinal | | AriaModules/components/* | WTFPL | | @@ -174,6 +177,7 @@ Below is a list of artwork licenses from plugins | nonlinearcircuits/Audiowide-Regular.ttf | OFL-1.1-RFN | | | Orbits/* | CC-BY-NC-ND-4.0 | | | Orbits/fonts/ShareTechMono-Regular.ttf | OFL-1.1-RFN | | +| ParableInstruments/* | Custom | Copyright © Alex Brandt, [used and distributed with permission](https://github.com/adbrant/ArableInstruments/issues/21) | | PathSet/* | GPL-3.0-or-later | No artwork specific license provided | | Prism/* | CC-BY-SA-4.0 | | | Prism/RobotoCondensed-Regular.ttf | Apache-2.0 | | diff --git a/plugins/ArableInstruments b/plugins/ArableInstruments new file mode 160000 index 0000000..890448f --- /dev/null +++ b/plugins/ArableInstruments @@ -0,0 +1 @@ +Subproject commit 890448f087e3ab47eac391f9bcfe03f7bbd2123e diff --git a/plugins/Makefile b/plugins/Makefile index 5409da7..909a5e8 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -261,6 +261,24 @@ AMALGAMATEDHARMONICS_CUSTOM += bogaudio PLUGIN_FILES += $(wildcard AnimatedCircuits/src/Folding/*.cpp) PLUGIN_FILES += $(wildcard AnimatedCircuits/src/LFold/*.cpp) +# -------------------------------------------------------------- +# ArableInstruments + +PLUGIN_FILES += ArableInstruments/src/Clouds.cpp +PLUGIN_FILES += ArableInstruments/eurorack/clouds/dsp/correlator.cc +PLUGIN_FILES += ArableInstruments/eurorack/clouds/dsp/granular_processor.cc +PLUGIN_FILES += ArableInstruments/eurorack/clouds/dsp/mu_law.cc +PLUGIN_FILES += ArableInstruments/eurorack/clouds/dsp/pvoc/frame_transformation.cc +PLUGIN_FILES += ArableInstruments/eurorack/clouds/dsp/pvoc/phase_vocoder.cc +PLUGIN_FILES += ArableInstruments/eurorack/clouds/dsp/pvoc/stft.cc +PLUGIN_FILES += ArableInstruments/eurorack/clouds/resources.cc +PLUGIN_FILES += ArableInstruments/eurorack/stmlib/utils/random.cc +PLUGIN_FILES += ArableInstruments/eurorack/stmlib/dsp/atan.cc +PLUGIN_FILES += ArableInstruments/eurorack/stmlib/dsp/units.cc + +# modules/types which are present in other plugins +ARABLE_CUSTOM = Clouds clouds stmlib + # -------------------------------------------------------------- # Aria @@ -699,6 +717,24 @@ PLUGIN_FILES += $(filter-out nonlinearcircuits/src/NLC.cpp,$(wildcard nonlinearc PLUGIN_FILES += $(wildcard Orbits/src/*.cpp) +# -------------------------------------------------------------- +# ParableInstruments + +PLUGIN_FILES += ParableInstruments/src/Clouds.cpp +PLUGIN_FILES += ParableInstruments/parasites/clouds/dsp/correlator.cc +PLUGIN_FILES += ParableInstruments/parasites/clouds/dsp/granular_processor.cc +PLUGIN_FILES += ParableInstruments/parasites/clouds/dsp/mu_law.cc +PLUGIN_FILES += ParableInstruments/parasites/clouds/dsp/pvoc/frame_transformation.cc +PLUGIN_FILES += ParableInstruments/parasites/clouds/dsp/pvoc/phase_vocoder.cc +PLUGIN_FILES += ParableInstruments/parasites/clouds/dsp/pvoc/stft.cc +PLUGIN_FILES += ParableInstruments/parasites/clouds/resources.cc +PLUGIN_FILES += ParableInstruments/parasites/stmlib/utils/random.cc +PLUGIN_FILES += ParableInstruments/parasites/stmlib/dsp/atan.cc +PLUGIN_FILES += ParableInstruments/parasites/stmlib/dsp/units.cc + +# modules/types which are present in other plugins +PARABLE_CUSTOM = Clouds CustomPanel CloudsWidget FreezeLight clouds stmlib + # -------------------------------------------------------------- # Path Set @@ -826,7 +862,7 @@ VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob PLUGIN_FILES += $(filter-out voxglitch/src/plugin.cpp,$(wildcard voxglitch/src/*.cpp)) # modules/types which are present in other plugins -VOXGLITCH_CUSTOM = $(DRWAV) Readout +VOXGLITCH_CUSTOM = $(DRWAV) AudioBuffer AudioFile GateSequencer Looper Readout Sequencer SequencerDisplay # -------------------------------------------------------------- # ZetaCarinaeModules @@ -995,6 +1031,7 @@ RESOURCE_FILES = \ $(wildcard */res/*/*/*.ttf)) RESOURCE_FILES += $(wildcard */presets) +RESOURCE_FILES += ArableInstruments/res/Joni.png RESOURCE_FILES += BaconPlugs/res/Keypunch029.json RESOURCE_FILES += BaconPlugs/res/midi/chopin RESOURCE_FILES += BaconPlugs/res/midi/debussy @@ -1007,6 +1044,7 @@ RESOURCE_FILES += MindMeldModular/res/ShapeMaster/CommunityShapes RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldPresets RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldShapes RESOURCE_FILES += nonlinearcircuits/res +RESOURCE_FILES += ParableInstruments/res/Neil.png # MOD builds only have LV2 FX variant for now ifeq ($(MOD_BUILD),true) @@ -1223,6 +1261,17 @@ $(BUILD_DIR)/AnimatedCircuits/%.cpp.o: AnimatedCircuits/%.cpp $(foreach m,$(ANIMATEDCIRCUITS_CUSTOM),$(call custom_module_names,$(m),AnimatedCircuits)) \ -DpluginInstance=pluginInstance__AnimatedCircuits +$(BUILD_DIR)/ArableInstruments/%.o: ArableInstruments/% + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(ARABLE_CUSTOM),$(call custom_module_names,$(m),Arable)) \ + -DpluginInstance=pluginInstance__ArableInstruments \ + -DTEST \ + -IArableInstruments/eurorack \ + -Wno-class-memaccess \ + -Wno-unused-local-typedefs + $(BUILD_DIR)/AriaModules/%.cpp.o: AriaModules/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" @@ -1622,6 +1671,18 @@ $(BUILD_DIR)/Orbits/%.cpp.o: Orbits/%.cpp $(foreach m,$(ORBITS_CUSTOM),$(call custom_module_names,$(m),Orbits)) \ -DpluginInstance=pluginInstance__Orbits +$(BUILD_DIR)/ParableInstruments/%.o: ParableInstruments/% + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(PARABLE_CUSTOM),$(call custom_module_names,$(m),Parable)) \ + -DpluginInstance=pluginInstance__ParableInstruments \ + -DPARASITES \ + -DTEST \ + -IArableInstruments/parasites \ + -Wno-class-memaccess \ + -Wno-unused-local-typedefs + $(BUILD_DIR)/PathSet/%.cpp.o: PathSet/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/ParableInstruments/parasites b/plugins/ParableInstruments/parasites new file mode 120000 index 0000000..8e79925 --- /dev/null +++ b/plugins/ParableInstruments/parasites @@ -0,0 +1 @@ +../ArableInstruments/parasites \ No newline at end of file diff --git a/plugins/ParableInstruments/plugin.json b/plugins/ParableInstruments/plugin.json new file mode 100644 index 0000000..a32ff37 --- /dev/null +++ b/plugins/ParableInstruments/plugin.json @@ -0,0 +1,25 @@ +{ + "slug": "ParableInstruments", + "name": "Parable Instruments", + "version": "2.0.0", + "license": "GPL-3.0-or-later", + "brand": "Parable Instruments", + "author": "adbrant", + "authorEmail": "", + "authorUrl": "https://github.com/adbrant/ArableInstruments/blob/master/README.md", + "pluginUrl": "https://github.com/adbrant/ArableInstruments/blob/master/README.md", + "manualUrl": "https://github.com/adbrant/ArableInstruments/blob/master/README.md", + "sourceUrl": "https://github.com/adbrant/ArableInstruments.git", + "donateUrl": "", + "modules": [ + { + "slug": "Neil", + "name": "Neil", + "description": "", + "tags": [ + "Granular", + "Reverb" + ] + } + ] +} diff --git a/plugins/ParableInstruments/res/CKSS_rot_0.svg b/plugins/ParableInstruments/res/CKSS_rot_0.svg new file mode 120000 index 0000000..585ac1f --- /dev/null +++ b/plugins/ParableInstruments/res/CKSS_rot_0.svg @@ -0,0 +1 @@ +../../ArableInstruments/res/CKSS_rot_0.svg \ No newline at end of file diff --git a/plugins/ParableInstruments/res/CKSS_rot_1.svg b/plugins/ParableInstruments/res/CKSS_rot_1.svg new file mode 120000 index 0000000..58a2ff0 --- /dev/null +++ b/plugins/ParableInstruments/res/CKSS_rot_1.svg @@ -0,0 +1 @@ +../../ArableInstruments/res/CKSS_rot_1.svg \ No newline at end of file diff --git a/plugins/ParableInstruments/res/Neil.png b/plugins/ParableInstruments/res/Neil.png new file mode 120000 index 0000000..26dbedb --- /dev/null +++ b/plugins/ParableInstruments/res/Neil.png @@ -0,0 +1 @@ +../../ArableInstruments/res/Neil.png \ No newline at end of file diff --git a/plugins/ParableInstruments/res/Neil.svg b/plugins/ParableInstruments/res/Neil.svg new file mode 120000 index 0000000..04bfc60 --- /dev/null +++ b/plugins/ParableInstruments/res/Neil.svg @@ -0,0 +1 @@ +../../ArableInstruments/res/Neil.svg \ No newline at end of file diff --git a/plugins/ParableInstruments/src/ArableInstruments.hpp b/plugins/ParableInstruments/src/ArableInstruments.hpp new file mode 120000 index 0000000..d44ebde --- /dev/null +++ b/plugins/ParableInstruments/src/ArableInstruments.hpp @@ -0,0 +1 @@ +../../ArableInstruments/src/ArableInstruments.hpp \ No newline at end of file diff --git a/plugins/ParableInstruments/src/Clouds.cpp b/plugins/ParableInstruments/src/Clouds.cpp new file mode 120000 index 0000000..924a7f2 --- /dev/null +++ b/plugins/ParableInstruments/src/Clouds.cpp @@ -0,0 +1 @@ +../../ArableInstruments/src/Clouds.cpp \ No newline at end of file diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 849d784..91f951c 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -42,6 +42,11 @@ // AnimatedCircuits #include "AnimatedCircuits/src/plugin.hpp" +// ArableInstruments +#define modelClouds modelArableClouds +#include "ArableInstruments/src/ArableInstruments.hpp" +#undef modelClouds + // Aria /* NOTE too much noise in original include, do this a different way // #include "AriaModules/src/plugin.hpp" @@ -616,11 +621,16 @@ extern Model* modelBlankPanel; // Orbits #include "Orbits/src/plugin.hpp" +// ParableInstruments +#define modelClouds modelParableClouds +#include "ParableInstruments/src/ArableInstruments.hpp" +#undef modelClouds + // Path Set -# include "PathSet/src/plugin.hpp" +#include "PathSet/src/plugin.hpp" // Prism -# include "Prism/src/plugin.hpp" +#include "Prism/src/plugin.hpp" // rackwindows #include "rackwindows/src/plugin.hpp" @@ -666,7 +676,9 @@ extern Model* modelFilterPlus; #include "ValleyAudio/src/Valley.hpp" // Voxglitch +#define modelLooper modelVoxglitchLooper #include "voxglitch/src/plugin.hpp" +#undef modelLooper // ZetaCarinaeModules #include "ZetaCarinaeModules/src/plugin.hpp" @@ -700,6 +712,7 @@ Plugin* pluginInstance__8Mode; extern Plugin* pluginInstance__AaronStatic; Plugin* pluginInstance__Algoritmarte; Plugin* pluginInstance__AmalgamatedHarmonics; +Plugin* pluginInstance__ArableInstruments; Plugin* pluginInstance__AnimatedCircuits; Plugin* pluginInstance__Aria; Plugin* pluginInstance__AudibleInstruments; @@ -743,6 +756,7 @@ extern Plugin* pluginInstance__mscHack; Plugin* pluginInstance__MSM; Plugin* pluginInstance__nonlinearcircuits; Plugin* pluginInstance__Orbits; +Plugin* pluginInstance__ParableInstruments; Plugin* pluginInstance__PathSet; Plugin* pluginInstance__Prism; Plugin* pluginInstance__rackwindows; @@ -1000,6 +1014,20 @@ static void initStatic__AnimatedCircuits() } } +static void initStatic__ArableInstruments() +{ + Plugin* const p = new Plugin; + pluginInstance__ArableInstruments = p; + + const StaticPluginLoader spl(p, "ArableInstruments"); + if (spl.ok()) + { +#define modelClouds modelArableClouds + p->addModel(modelClouds); +#undef modelClouds + } +} + static void initStatic__Aria() { Plugin* const p = new Plugin; @@ -2260,6 +2288,20 @@ static void initStatic__Orbits() } } +static void initStatic__ParableInstruments() +{ + Plugin* const p = new Plugin; + pluginInstance__ParableInstruments = p; + + const StaticPluginLoader spl(p, "ParableInstruments"); + if (spl.ok()) + { +#define modelClouds modelParableClouds + p->addModel(modelClouds); +#undef modelClouds + } +} + static void initStatic__PathSet() { Plugin* const p = new Plugin; @@ -2442,6 +2484,7 @@ static void initStatic__Voxglitch() const StaticPluginLoader spl(p, "voxglitch"); if (spl.ok()) { +#define modelLooper modelVoxglitchLooper p->addModel(modelAutobreak); p->addModel(modelByteBeat); p->addModel(modelDigitalProgrammer); @@ -2462,6 +2505,7 @@ static void initStatic__Voxglitch() p->addModel(modelWavBank); p->addModel(modelWavBankMC); p->addModel(modelXY); +#undef modelLooper } } @@ -2517,6 +2561,7 @@ void initStaticPlugins() initStatic__Algoritmarte(); initStatic__AmalgamatedHarmonics(); initStatic__AnimatedCircuits(); + initStatic__ArableInstruments(); initStatic__Aria(); initStatic__AudibleInstruments(); initStatic__Autinn(); @@ -2559,6 +2604,7 @@ void initStaticPlugins() initStatic__MSM(); initStatic__nonlinearcircuits(); initStatic__Orbits(); + initStatic__ParableInstruments(); initStatic__PathSet(); initStatic__Prism(); initStatic__rackwindows(); diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index c0b3c4c..c13442f 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -70,6 +70,8 @@ static const struct { { "/Algoritmarte/res/Planetz.svg", {}, -1 }, { "/Algoritmarte/res/Zefiro.svg", {}, -1 }, // Custom, runtime dark mode used with permission + { "/ArableInstruments/res/Joni.svg", {}, -1 }, + // Custom, runtime dark mode used with permission { "/AudibleInstruments/res/Blinds.svg", {}, -1 }, { "/AudibleInstruments/res/Braids.svg", {}, -1 }, { "/AudibleInstruments/res/Branches.svg", {}, -1 }, @@ -279,6 +281,8 @@ static const struct { { "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 }, { "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 }, { "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 }, + // Custom, runtime dark mode used with permission + { "/ParableInstruments/res/Neil.svg", {}, -1 }, // GPL-3.0-or-later { "/PathSet/res/AstroVibe.svg", {}, -1 }, { "/PathSet/res/IceTray.svg", {}, -1 }, From 149a8686b5805ce2192562d91be2dd7c82dabaf3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Feb 2022 19:28:03 +0000 Subject: [PATCH 011/132] Fix naming conflicts --- plugins/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 909a5e8..28b9d88 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -277,7 +277,7 @@ PLUGIN_FILES += ArableInstruments/eurorack/stmlib/dsp/atan.cc PLUGIN_FILES += ArableInstruments/eurorack/stmlib/dsp/units.cc # modules/types which are present in other plugins -ARABLE_CUSTOM = Clouds clouds stmlib +ARABLE_CUSTOM = Clouds FreezeLight clouds stmlib # -------------------------------------------------------------- # Aria @@ -862,7 +862,8 @@ VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob PLUGIN_FILES += $(filter-out voxglitch/src/plugin.cpp,$(wildcard voxglitch/src/*.cpp)) # modules/types which are present in other plugins -VOXGLITCH_CUSTOM = $(DRWAV) AudioBuffer AudioFile GateSequencer Looper Readout Sequencer SequencerDisplay +VOXGLITCH_CUSTOM = $(DRWAV) AudioFile GateSequencer Looper Readout +VOXGLITCH_CUSTOM_PER_FILE = AudioBuffer Grain Sequencer SequencerDisplay # -------------------------------------------------------------- # ZetaCarinaeModules @@ -1753,6 +1754,7 @@ $(BUILD_DIR)/voxglitch/%.cpp.o: voxglitch/%.cpp @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(VOXGLITCH_CUSTOM),$(call custom_module_names,$(m),Voxglitch)) \ + $(foreach m,$(VOXGLITCH_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),Voxglitch_$(shell basename $*))) \ -DpluginInstance=pluginInstance__Voxglitch $(BUILD_DIR)/ZetaCarinaeModules/%.cpp.o: ZetaCarinaeModules/%.cpp From 56778ad45217ffe41969e026863972ecec48cfca Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Feb 2022 20:07:13 +0000 Subject: [PATCH 012/132] One more name conflict --- plugins/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 28b9d88..5362e96 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -862,8 +862,8 @@ VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob PLUGIN_FILES += $(filter-out voxglitch/src/plugin.cpp,$(wildcard voxglitch/src/*.cpp)) # modules/types which are present in other plugins -VOXGLITCH_CUSTOM = $(DRWAV) AudioFile GateSequencer Looper Readout -VOXGLITCH_CUSTOM_PER_FILE = AudioBuffer Grain Sequencer SequencerDisplay +VOXGLITCH_CUSTOM = $(DRWAV) AudioFile Looper Readout +VOXGLITCH_CUSTOM_PER_FILE = AudioBuffer GateSequencer Grain Sequencer SequencerDisplay VoltageSequencer # -------------------------------------------------------------- # ZetaCarinaeModules From c5954db3072cd7380de1d845723f89b6297966ad Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Feb 2022 21:26:50 +0000 Subject: [PATCH 013/132] Fix windows build --- plugins/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Makefile b/plugins/Makefile index 5362e96..a196c61 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1755,7 +1755,8 @@ $(BUILD_DIR)/voxglitch/%.cpp.o: voxglitch/%.cpp $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(VOXGLITCH_CUSTOM),$(call custom_module_names,$(m),Voxglitch)) \ $(foreach m,$(VOXGLITCH_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),Voxglitch_$(shell basename $*))) \ - -DpluginInstance=pluginInstance__Voxglitch + -DpluginInstance=pluginInstance__Voxglitch \ + -DSKIP_MINGW_FORMAT $(BUILD_DIR)/ZetaCarinaeModules/%.cpp.o: ZetaCarinaeModules/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" From 341642d8e017fd4509b264b0c3d17c39642c22ea Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Feb 2022 21:51:18 +0000 Subject: [PATCH 014/132] Update rate limit does work on macOS after all --- src/CardinalUI.cpp | 2 -- src/override/MenuBar.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 4ba028d..2858ab2 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -382,13 +382,11 @@ public: filebrowserhandle = nullptr; } - #ifndef DISTRHO_OS_MAC if (windowParameters.rateLimit != 0 && ++rateLimitStep % (windowParameters.rateLimit * 2)) return; rateLimitStep = 0; repaint(); - #endif } void WindowParametersChanged(const WindowParameterList param, float value) override diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 84bf88d..b1ad4d5 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -479,7 +479,6 @@ struct ViewButton : MenuButton { menu->addChild(createBoolPtrMenuItem("Lock module positions", "", &settings::lockModules)); -#ifndef DISTRHO_OS_MAC menu->addChild(new ui::MenuSeparator); static const std::vector rateLimitLabels = { @@ -496,7 +495,6 @@ struct ViewButton : MenuButton { )); } })); -#endif } }; From f634c1475dded5d2ecd208342bc7fd3b9fddab37 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 1 Mar 2022 11:33:26 +0000 Subject: [PATCH 015/132] Fix single-precision build Signed-off-by: falkTX --- plugins/voxglitch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/voxglitch b/plugins/voxglitch index c391e1a..0b905ff 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit c391e1a83b73b38125fb007117c40d0f5ee2091c +Subproject commit 0b905ffef8c108a135b46b6f516d9dcf7f77c6cd From ac9209782ea0859f3a86d9ce22819f1d13670870 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 1 Mar 2022 14:59:43 +0000 Subject: [PATCH 016/132] Test MOD builds without single precission Signed-off-by: falkTX --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 67f82ee..77fa80e 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,8 @@ endif # -------------------------------------------------------------- # MOD builds -EXTRA_MOD_FLAGS = -I../include/single-precision -fsingle-precision-constant +EXTRA_MOD_FLAGS = +# -I../include/single-precision -fsingle-precision-constant ifeq ($(MODDUO),true) EXTRA_MOD_FLAGS += -mno-unaligned-access From 5e9b50dbea2f95a8aaed61adef7dcca703bed2a3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 6 Mar 2022 13:37:08 +0000 Subject: [PATCH 017/132] Revert "Test MOD builds without single precission" This reverts commit ac9209782ea0859f3a86d9ce22819f1d13670870. --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 77fa80e..67f82ee 100644 --- a/Makefile +++ b/Makefile @@ -119,8 +119,7 @@ endif # -------------------------------------------------------------- # MOD builds -EXTRA_MOD_FLAGS = -# -I../include/single-precision -fsingle-precision-constant +EXTRA_MOD_FLAGS = -I../include/single-precision -fsingle-precision-constant ifeq ($(MODDUO),true) EXTRA_MOD_FLAGS += -mno-unaligned-access From 6c82749f2a19dac13af79cb4ecff0c6b0a8845d0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 7 Mar 2022 10:42:47 +0000 Subject: [PATCH 018/132] Make host audio meters independent from each other --- plugins/Cardinal/src/HostAudio.cpp | 254 ++++++++++++++++++----------- 1 file changed, 163 insertions(+), 91 deletions(-) diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index 68459ae..8e12603 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -36,11 +36,6 @@ struct HostAudio : TerminalModule { dsp::RCFilter dcFilters[numIO]; bool dcFilterEnabled = (numIO == 2); - // for stereo meter - volatile bool resetMeters = true; - float gainMeterL = 0.0f; - float gainMeterR = 0.0f; - HostAudio() : pcontext(static_cast(APP)), numParams(numIO == 2 ? 1 : 0), @@ -63,13 +58,10 @@ struct HostAudio : TerminalModule { void onReset() override { dcFilterEnabled = (numIO == 2); - resetMeters = true; } void onSampleRateChange(const SampleRateChangeEvent& e) override { - resetMeters = true; - for (int i=0; i { + // for stereo meter + int internalDataFrame = 0; + float internalDataBuffer[2][128]; + volatile bool resetMeters = true; + float gainMeterL = 0.0f; + float gainMeterR = 0.0f; + + HostAudio2() + : HostAudio<2>() + { + std::memset(internalDataBuffer, 0, sizeof(internalDataBuffer)); + } + + void onReset() override + { + HostAudio<2>::onReset(); + resetMeters = true; + } + + void onSampleRateChange(const SampleRateChangeEvent& e) override + { + HostAudio<2>::onSampleRateChange(e); + resetMeters = true; + } + + void processTerminalOutput(const ProcessArgs&) { const int blockFrames = pcontext->engine->getBlockFrames(); @@ -116,11 +152,15 @@ struct HostAudio : TerminalModule { float** const dataOuts = pcontext->dataOuts; - // stereo version gain - const float gain = numParams != 0 ? std::pow(params[0].getValue(), 2.f) : 1.0f; + // gain (stereo variant only) + const float gain = std::pow(params[0].getValue(), 2.f); + + // left/mono check + const bool in2connected = inputs[1].isConnected(); - // read first value, special case for mono mode + // read stereo values float valueL = inputs[0].getVoltageSum() * 0.1f; + float valueR = inputs[1].getVoltageSum() * 0.1f; // Apply DC filter if (dcFilterEnabled) @@ -132,68 +172,111 @@ struct HostAudio : TerminalModule { valueL = clamp(valueL * gain, -1.0f, 1.0f); dataOuts[0][k] += valueL; - // read everything else - for (int i=1; i { + // no meters in this variant + + void processTerminalOutput(const ProcessArgs&) override { - json_t* const rootJ = json_object(); - DISTRHO_SAFE_ASSERT_RETURN(rootJ != nullptr, nullptr); + const int blockFrames = pcontext->engine->getBlockFrames(); - json_object_set_new(rootJ, "dcFilter", json_boolean(dcFilterEnabled)); - return rootJ; + // only incremented on output + const int k = dataFrame++; + DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); + + if (isBypassed()) + return; + + float** const dataOuts = pcontext->dataOuts; + + for (int i=0; i +struct HostAudioWidget : ModuleWidgetWith8HP { + HostAudio* const module; + + HostAudioWidget(HostAudio* const m) + : module(m) { - json_t* const dcFilterJ = json_object_get(rootJ, "dcFilter"); - DISTRHO_SAFE_ASSERT_RETURN(dcFilterJ != nullptr,); + setModule(m); + setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/HostAudio.svg"))); - dcFilterEnabled = json_boolean_value(dcFilterJ); + createAndAddScrews(); + + for (uint i=0; iaddChild(new MenuSeparator); + menu->addChild(createBoolPtrMenuItem("DC blocker", "", &module->dcFilterEnabled)); } }; -template +// -------------------------------------------------------------------------------------------------------------------- + struct HostAudioNanoMeter : NanoMeter { - HostAudio* const module; + HostAudio2* const module; - HostAudioNanoMeter(HostAudio* const m) + HostAudioNanoMeter(HostAudio2* const m) : module(m) { hasGainKnob = true; @@ -211,69 +294,58 @@ struct HostAudioNanoMeter : NanoMeter { } }; -template -struct HostAudioWidget : ModuleWidgetWith8HP { - HostAudio* const module; +// -------------------------------------------------------------------------------------------------------------------- - HostAudioWidget(HostAudio* const m) - : module(m) +struct HostAudioWidget2 : HostAudioWidget<2> { + HostAudioWidget2(HostAudio2* const m) + : HostAudioWidget<2>(m) { - setModule(m); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/HostAudio.svg"))); + // FIXME + const float middleX = box.size.x * 0.5f; + addParam(createParamCentered(Vec(middleX, 310.0f), m, 0)); + + HostAudioNanoMeter* const meter = new HostAudioNanoMeter(m); + meter->box.pos = Vec(middleX - padding + 2.75f, startY + padding * 2); + meter->box.size = Vec(padding * 2.0f - 4.0f, 136.0f); + addChild(meter); + } - createAndAddScrews(); + void draw(const DrawArgs& args) override + { + drawBackground(args.vg); + drawOutputJacksArea(args.vg, 2); + setupTextLines(args.vg); - for (uint i=0; i(Vec(middleX, 310.0f), m, 0)); - - HostAudioNanoMeter* const meter = new HostAudioNanoMeter(m); - meter->box.pos = Vec(middleX - padding + 2.75f, startY + padding * 2); - meter->box.size = Vec(padding * 2.0f - 4.0f, 136.0f); - addChild(meter); - } + ModuleWidgetWith8HP::draw(args); } +}; + +struct HostAudioWidget8 : HostAudioWidget<8> { + HostAudioWidget8(HostAudio8* const m) + : HostAudioWidget<8>(m) {} void draw(const DrawArgs& args) override { drawBackground(args.vg); - drawOutputJacksArea(args.vg, numIO); + drawOutputJacksArea(args.vg, 8); setupTextLines(args.vg); - if (numIO == 2) - { - drawTextLine(args.vg, 0, "Left/M"); - drawTextLine(args.vg, 1, "Right"); - } - else + for (int i=0; i<8; ++i) { - for (int i=0; i('0'+i+1),'\0'}; - drawTextLine(args.vg, i, text); - } + char text[] = {'A','u','d','i','o',' ',static_cast('0'+i+1),'\0'}; + drawTextLine(args.vg, i, text); } ModuleWidgetWith8HP::draw(args); } - - void appendContextMenu(Menu* const menu) override { - menu->addChild(new MenuSeparator); - menu->addChild(createBoolPtrMenuItem("DC blocker", "", &module->dcFilterEnabled)); - } }; // -------------------------------------------------------------------------------------------------------------------- -Model* modelHostAudio2 = createModel, HostAudioWidget<2>>("HostAudio2"); -Model* modelHostAudio8 = createModel, HostAudioWidget<8>>("HostAudio8"); +Model* modelHostAudio2 = createModel("HostAudio2"); +Model* modelHostAudio8 = createModel("HostAudio8"); // -------------------------------------------------------------------------------------------------------------------- From 15903d585ffc708f0e87b919388e621f8aa2786f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 7 Mar 2022 14:24:17 +0000 Subject: [PATCH 019/132] Accept a few other verbose make flags Fixes #132 Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 4b6010b..f1d7b59 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 4b6010bd0adbbed5a0cb89a1253e52e72e648b18 +Subproject commit f1d7b590204073c7aaecbbc402f40623021aa420 diff --git a/dpf b/dpf index af042cb..4cc6973 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit af042cb682d693e9ce5b87a145e6c704be31adf8 +Subproject commit 4cc6973d5defdbb45f89b1bf694277ee49a75c2a From 572e26c7dac8a0bf2ab4c1cf888c25b6290a51e8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 7 Mar 2022 16:23:37 +0000 Subject: [PATCH 020/132] Implement cardinal specific async dialogs in voxglitch Closes #183 Signed-off-by: falkTX --- include/common.hpp | 15 ++++++++++++++- plugins/Dintree | 2 +- plugins/voxglitch | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/common.hpp b/include/common.hpp index 8593494..6dd7470 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -53,6 +53,19 @@ #include #define USING_CARDINAL_NOT_RACK +// OS separator macros +#ifdef ARCH_WIN +# define CARDINAL_OS_SEP '\\' +# define CARDINAL_OS_SEP_STR "\\" +# define CARDINAL_OS_SPLIT ';' +# define CARDINAL_OS_SPLIT_STR ";" +#else +# define CARDINAL_OS_SEP '/' +# define CARDINAL_OS_SEP_STR "/" +# define CARDINAL_OS_SPLIT ':' +# define CARDINAL_OS_SPLIT_STR ":" +#endif + // opens a file browser, startDir and title can be null // action is always triggered on close (path can be null), must be freed if not null void async_dialog_filebrowser(bool saving, const char* startDir, const char* title, diff --git a/plugins/Dintree b/plugins/Dintree index 8d28da2..51a01f2 160000 --- a/plugins/Dintree +++ b/plugins/Dintree @@ -1 +1 @@ -Subproject commit 8d28da2a6083eb6af4b8d559e001fc9afbe2d41f +Subproject commit 51a01f2d14988a41060f25ba203b38e6f6767605 diff --git a/plugins/voxglitch b/plugins/voxglitch index 0b905ff..f430c1d 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit 0b905ffef8c108a135b46b6f516d9dcf7f77c6cd +Subproject commit f430c1dd2a94e0dff00141371467f372613f2116 From 6251756f4baeb54c3d359ea303d8ebcdc47f5460 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 7 Mar 2022 21:22:12 +0000 Subject: [PATCH 021/132] Fix multiple init definitions Signed-off-by: falkTX --- dpf | 2 +- plugins/Makefile | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dpf b/dpf index 4cc6973..aad2a31 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 4cc6973d5defdbb45f89b1bf694277ee49a75c2a +Subproject commit aad2a31f76251d031638d6385a68efef25452715 diff --git a/plugins/Makefile b/plugins/Makefile index a196c61..0143a85 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -231,7 +231,7 @@ PLUGIN_FILES += $(filter-out 21kHz/src/21kHz.cpp,$(wildcard 21kHz/src/*.cpp)) # -------------------------------------------------------------- # 8Mode -PLUGIN_FILES += $(filter-out 8Mode/src/plugin.cpp,$(wildcard 8Mode/src/*.cpp)) +PLUGIN_FILES += $(filter-out 8Mode/src/8mode.cpp,$(wildcard 8Mode/src/*.cpp)) # -------------------------------------------------------------- # AlgoritmArte @@ -463,7 +463,7 @@ PLUGIN_FILES += $(wildcard ChowDSP/lib/r8lib/*.cpp) # -------------------------------------------------------------- # CatroModulo -PLUGIN_FILES += $(wildcard CatroModulo/src/*.cpp) +PLUGIN_FILES += $(filter-out CatroModulo/src/CatroModulo.cpp,$(wildcard CatroModulo/src/*.cpp)) # modules/types which are present in other plugins CATROMODULO_CUSTOM = LowFrequencyOscillator NumDisplayWidget @@ -476,7 +476,7 @@ PLUGIN_FILES += $(filter-out cf/src/plugin.cpp,$(wildcard cf/src/*.cpp)) # -------------------------------------------------------------- # Dintree -PLUGIN_FILES += $(wildcard Dintree/src/*.cpp) +PLUGIN_FILES += $(filter-out Dintree/src/plugin.cpp,$(wildcard Dintree/src/*.cpp)) PLUGIN_FILES += $(wildcard Dintree/src/components/*.cpp) PLUGIN_FILES += $(wildcard Dintree/src/utils/*.cpp) @@ -537,7 +537,7 @@ PLUGIN_FILES += $(filter-out GlueTheGiant/src/plugin.cpp,$(wildcard GlueTheGiant # -------------------------------------------------------------- # GoodSheperd -PLUGIN_FILES += $(wildcard GoodSheperd/src/*.cpp) +PLUGIN_FILES += $(filter-out GoodSheperd/src/plugin.cpp,$(wildcard GoodSheperd/src/*.cpp)) # -------------------------------------------------------------- # GrandeModular @@ -547,7 +547,7 @@ PLUGIN_FILES += $(filter-out GrandeModular/src/plugin.cpp,$(wildcard GrandeModul # -------------------------------------------------------------- # Hampton Harmonics -PLUGIN_FILES += $(wildcard HamptonHarmonics/src/*.cpp) +PLUGIN_FILES += $(filter-out HamptonHarmonics/src/plugin.cpp,$(wildcard HamptonHarmonics/src/*.cpp)) # modules/types which are present in other plugins HAMPTONHARMONICS_CUSTOM = Arp Progress @@ -555,7 +555,7 @@ HAMPTONHARMONICS_CUSTOM = Arp Progress # -------------------------------------------------------------- # HetrickCV -PLUGIN_FILES += $(wildcard HetrickCV/src/*.cpp) +PLUGIN_FILES += $(filter-out HetrickCV/src/HetrickCV.cpp,$(wildcard HetrickCV/src/*.cpp)) PLUGIN_FILES += $(wildcard HetrickCV/src/DSP/*.cpp) PLUGIN_FILES += $(wildcard HetrickCV/Gamma/src/arr.cpp) PLUGIN_FILES += $(wildcard HetrickCV/Gamma/src/Domain.cpp) @@ -610,7 +610,7 @@ JW_CUSTOM = PlayHead Quantizer # -------------------------------------------------------------- # kocmoc -PLUGIN_FILES += $(wildcard kocmoc/src/*.cpp) +PLUGIN_FILES += $(filter-out kocmoc/src/plugin.cpp,$(wildcard kocmoc/src/*.cpp)) # modules/types which are present in other plugins KOCMOC_CUSTOM = Phasor __ct_base __ct_comp @@ -626,7 +626,7 @@ LIFEFORMMODULAR_CUSTOM = IO MS __ct_base __ct_comp # -------------------------------------------------------------- # Lilac Loop -PLUGIN_FILES += $(wildcard LilacLoop/src/*.cpp) +PLUGIN_FILES += $(filter-out LilacLoop/src/plugin.cpp,$(wildcard LilacLoop/src/*.cpp)) # modules/types which are present in other plugins LILACLOOP_CUSTOM = AudioFile Mode @@ -671,7 +671,7 @@ MINDMELD_CUSTOM = printNote # -------------------------------------------------------------- # ML_modules -PLUGIN_FILES += $(filter-out ML_modules/src/plugin.cpp,$(wildcard ML_modules/src/*.cpp)) +PLUGIN_FILES += $(filter-out ML_modules/src/ML_modules.cpp,$(wildcard ML_modules/src/*.cpp)) PLUGIN_FILES += ML_modules/freeverb/revmodel.cpp # modules/types which are present in other plugins @@ -715,7 +715,7 @@ PLUGIN_FILES += $(filter-out nonlinearcircuits/src/NLC.cpp,$(wildcard nonlinearc # -------------------------------------------------------------- # Orbits -PLUGIN_FILES += $(wildcard Orbits/src/*.cpp) +PLUGIN_FILES += $(filter-out Orbits/src/plugin.cpp,$(wildcard Orbits/src/*.cpp)) # -------------------------------------------------------------- # ParableInstruments @@ -738,7 +738,7 @@ PARABLE_CUSTOM = Clouds CustomPanel CloudsWidget FreezeLight clouds stmlib # -------------------------------------------------------------- # Path Set -PLUGIN_FILES += $(wildcard PathSet/src/*.cpp) +PLUGIN_FILES += $(filter-out PathSet/src/plugin.cpp,$(wildcard PathSet/src/*.cpp)) # -------------------------------------------------------------- # Prism @@ -765,12 +765,12 @@ REPELZEN_CUSTOM = Blank Mixer Werner tanh_pade # -------------------------------------------------------------- # sonusmodular -PLUGIN_FILES += $(filter-out sonusmodular/src/sonusmodular,$(wildcard sonusmodular/src/*.cpp)) +PLUGIN_FILES += $(filter-out sonusmodular/src/sonusmodular.cpp,$(wildcard sonusmodular/src/*.cpp)) # -------------------------------------------------------------- # stocaudio -PLUGIN_FILES += $(wildcard stocaudio/src/*.cpp) +PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/*.cpp)) # -------------------------------------------------------------- # Substation (Open source release) @@ -1601,7 +1601,7 @@ $(BUILD_DIR)/LyraeModules/%.cpp.o: LyraeModules/%.cpp $(foreach m,$(LYRAE_CUSTOM),$(call custom_module_names,$(m),Lyrae)) \ -DpluginInstance=pluginInstance__Lyrae -$(BUILD_DIR)/MindMeldModular/MindMeldModular.cpp.o: MindMeldModular/src/MindMeldModular.cpp +$(BUILD_DIR)/MindMeldModular/src/MindMeldModular.cpp.o: MindMeldModular/src/MindMeldModular.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ From 649c88629e0aff9cbbc42861c09591447f9906c1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 7 Mar 2022 22:07:32 +0000 Subject: [PATCH 022/132] Continue work on jucewrapper Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 121 ++++++++++++++++++++++++++++-- jucewrapper/CardinalWrapper.cpp | 129 +++++++++++++++++++++++++++----- src/Makefile.cardinal.mk | 2 + 3 files changed, 226 insertions(+), 26 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 4926dbb..5de734c 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -3,6 +3,82 @@ project(Cardinal VERSION 0.0.0) add_subdirectory(JUCE) +# Config + +set(CMAKE_C_VISIBILITY_PRESET hidden) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) + +# Define static libs + +add_library(dgl STATIC IMPORTED) +set_property(TARGET dgl PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../dpf/build/libdgl-opengl.a") + +add_library(carla_host_plugin STATIC IMPORTED) +set_property(TARGET carla_host_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/plugin/Release/carla-host-plugin.cpp.o") + +add_library(carla_engine_plugin STATIC IMPORTED) +set_property(TARGET carla_engine_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/carla_engine_plugin.a") + +add_library(carla_plugin STATIC IMPORTED) +set_property(TARGET carla_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/carla_plugin.a") + +add_library(native_plugins STATIC IMPORTED) +set_property(TARGET native_plugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/native-plugins.a") + +add_library(audio_decoder STATIC IMPORTED) +set_property(TARGET audio_decoder PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/audio_decoder.a") + +add_library(jackbridge STATIC IMPORTED) +set_property(TARGET jackbridge PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/jackbridge.min.a") + +add_library(lilv STATIC IMPORTED) +set_property(TARGET lilv PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/lilv.a") + +add_library(rtmempool STATIC IMPORTED) +set_property(TARGET rtmempool PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/rtmempool.a") + +add_library(sfzero STATIC IMPORTED) +set_property(TARGET sfzero PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/sfzero.a") + +add_library(water STATIC IMPORTED) +set_property(TARGET water PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/water.a") + +add_library(zita_resampler STATIC IMPORTED) +set_property(TARGET zita_resampler PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/zita-resampler.a") + +add_library(sCardinalFX STATIC IMPORTED) +set_property(TARGET sCardinalFX PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/CardinalFX.a") + +add_library(sPlugins STATIC IMPORTED) +set_property(TARGET sPlugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../plugins/plugins.a") + +add_library(sRack STATIC IMPORTED) +set_property(TARGET sRack PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/rack.a") + +#ifeq ($(WINDOWS),true) +#RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libarchive_static.a +add_library(libarchive STATIC IMPORTED) +set_property(TARGET libarchive PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libarchive.a") + +add_library(libjansson STATIC IMPORTED) +set_property(TARGET libjansson PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libjansson.a") + +add_library(libquickjs STATIC IMPORTED) +set_property(TARGET libquickjs PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libquickjs.a") + +add_library(libsamplerate STATIC IMPORTED) +set_property(TARGET libsamplerate PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libsamplerate.a") + +add_library(libspeexdsp STATIC IMPORTED) +set_property(TARGET libspeexdsp PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libspeexdsp.a") + +add_library(libzstd STATIC IMPORTED) +set_property(TARGET libzstd PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libzstd.a") + +#find_package(Dbus) +find_package(OpenGL) +find_package(X11) + # FX variant juce_add_plugin(CardinalFX @@ -13,7 +89,7 @@ juce_add_plugin(CardinalFX EDITOR_WANTS_KEYBOARD_FOCUS TRUE PLUGIN_MANUFACTURER_CODE Dstr PLUGIN_CODE dCnF - FORMATS VST3 AU + FORMATS Standalone AU PRODUCT_NAME "CardinalFX") target_sources(CardinalFX @@ -27,19 +103,52 @@ target_include_directories(CardinalFX target_compile_definitions(CardinalFX PUBLIC + JUCE_DISPLAY_SPLASH_SCREEN=0 JUCE_USE_CURL=0 JUCE_WEB_BROWSER=0) -target_link_options(CardinalFX - PRIVATE - "-l/Shared/Personal/FOSS/GIT/DISTRHO/DISTRHO_Cardinal/bin/CardinalFX.so" - "-Wl,-rpath,." -) +target_link_directories(CardinalFX + PUBLIC + /opt/kxstudio/lib) target_link_libraries(CardinalFX PRIVATE juce::juce_audio_utils + -Wl,--whole-archive + sCardinalFX + sPlugins + sRack + carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + zita_resampler + dgl + libarchive + libjansson + libquickjs + libsamplerate + libspeexdsp + libzstd + -Wl,--no-whole-archive + GLX + OpenGL + X11 + Xcursor + Xext + Xrandr PUBLIC + -ldbus-1 + -llo + -lmagic + -lsndfile -lFLAC -lvorbisenc -lvorbis -logg + -lrt juce::juce_recommended_config_flags juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 4d3a435..aab8db1 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,15 +17,14 @@ #include -#include "DistrhoPlugin.hpp" -#include "DistrhoUI.hpp" - -DISTRHO_PLUGIN_EXPORT DISTRHO_NAMESPACE::Plugin* createSharedPlugin(); -#define createPlugin ::createSharedPlugin +#define createPlugin createStaticPlugin #include "src/DistrhoPluginInternal.hpp" +#include "src/DistrhoUIInternal.hpp" START_NAMESPACE_DISTRHO +#if 0 + // ----------------------------------------------------------------------------------------------------------- class ParameterForDPF : public juce::AudioProcessorParameter @@ -69,29 +68,43 @@ protected: return 0.0f; } }; +#endif // ----------------------------------------------------------------------------------------------------------- class CardinalWrapperProcessor : public juce::AudioProcessor { + friend class CardinalWrapperEditor; + PluginExporter plugin; - static bool writeMidiCb(void* ptr, const MidiEvent& midiEvent) + static bool writeMidi(void* ptr, const MidiEvent& midiEvent) { return false; } - static bool requestParameterValueChangeCb(void* ptr, uint32_t index, float value) + static bool requestParameterValueChange(void* ptr, uint32_t index, float value) + { + return false; + } + + static bool updateStateValue(void* ptr, const char* key, const char* value) { return false; } public: CardinalWrapperProcessor() - : plugin(this, writeMidiCb, requestParameterValueChangeCb) + : plugin(this, writeMidi, requestParameterValueChange, updateStateValue) { - for (uint i=0; i 0, numSamples,); + + DISTRHO_SAFE_ASSERT_RETURN(buffer.getNumChannels() == 2,); + + const float* audioBufferIn[2]; + float* audioBufferOut[2]; + audioBufferIn[0] = buffer.getReadPointer(0); + audioBufferIn[1] = buffer.getReadPointer(1); + audioBufferOut[0] = buffer.getWritePointer(0); + audioBufferOut[1] = buffer.getWritePointer(1); + + plugin.run(audioBufferIn, audioBufferOut, numSamples, nullptr, 0); } double getTailLengthSeconds() const override { - return true; + return 0.0; } bool acceptsMidi() const override @@ -181,17 +208,80 @@ public: } }; +// ----------------------------------------------------------------------------------------------------------- + class CardinalWrapperEditor : public juce::AudioProcessorEditor { + UIExporter* ui; + void* const dspPtr; + + static void editParamFunc(void* ptr, uint32_t rindex, bool started) {} + static void setParamFunc(void* ptr, uint32_t rindex, float value) {} + static void setStateFunc(void* ptr, const char* key, const char* value) {} + static void sendNoteFunc(void* ptr, uint8_t channel, uint8_t note, uint8_t velo) {} + + static void setSizeFunc(void* ptr, uint width, uint height) + { + static_cast(ptr)->setSize(width, height); + } + + static bool fileRequestFunc(void* ptr, const char* key) { return false; } + public: - CardinalWrapperEditor(CardinalWrapperProcessor& processor) - : juce::AudioProcessorEditor(processor) - {} + CardinalWrapperEditor(CardinalWrapperProcessor& cardinalProcessor) + : juce::AudioProcessorEditor(cardinalProcessor), + ui(nullptr), + dspPtr(cardinalProcessor.plugin.getInstancePointer()) + { + setOpaque(true); + setResizable(true, false); + // setResizeLimits(648, 538, -1, -1); + setSize(1228, 666); + } ~CardinalWrapperEditor() override - {} + { + delete ui; + } + + void paint(juce::Graphics&) + { + if (ui == nullptr) + { + auto peer = getPeer(); + d_stdout("peer is %p", peer); + + auto handle = peer->getNativeHandle(); + d_stdout("handle is %p", handle); + + auto proc = getAudioProcessor(); + d_stdout("proc is %p", proc); + + ui = new UIExporter(this, + (uintptr_t)handle, + proc->getSampleRate(), + editParamFunc, + setParamFunc, + setStateFunc, + sendNoteFunc, + setSizeFunc, + fileRequestFunc, + nullptr, // bundlePath + dspPtr, + 0.0 // scaleFactor + ); + } + + ui->plugin_idle(); + repaint(); + } }; +juce::AudioProcessorEditor* CardinalWrapperProcessor::createEditor() +{ + return new CardinalWrapperEditor(*this); +} + // ----------------------------------------------------------------------------------------------------------- END_NAMESPACE_DISTRHO @@ -200,11 +290,10 @@ END_NAMESPACE_DISTRHO juce::AudioProcessor* createPluginFilter() { + // set valid but dummy values + d_nextBufferSize = 512; + d_nextSampleRate = 48000.0; return new DISTRHO_NAMESPACE::CardinalWrapperProcessor; } // ----------------------------------------------------------------------------------------------------------- - -#define DISTRHO_IS_STANDALONE 0 -#include "src/DistrhoPlugin.cpp" -#include "src/DistrhoUtils.cpp" diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index c5c0c63..748d02d 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -257,6 +257,8 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' ifeq ($(CARDINAL_VARIANT),main) all: jack lv2 vst3 +else ifeq ($(CARDINAL_VARIANT),fx) +all: lv2 vst2 vst3 static else all: lv2 vst2 vst3 endif From 5d66edf57ad662ee33680ce4943b5f3eeae8fc69 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 8 Mar 2022 10:03:23 +0000 Subject: [PATCH 023/132] Update voxglitch Signed-off-by: falkTX --- plugins/voxglitch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/voxglitch b/plugins/voxglitch index f430c1d..df225f3 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit f430c1dd2a94e0dff00141371467f372613f2116 +Subproject commit df225f3e7df531dd71bd36f1a20acbd05a5f4b5c From f9ef4c8c890150c0ad9448b58b507568adc28990 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 8 Mar 2022 10:05:41 +0000 Subject: [PATCH 024/132] voxglitch is now gplv3+ Signed-off-by: falkTX --- docs/LICENSES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 9eb1703..1337a7d 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -68,7 +68,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | | Valley | GPL-3.0-or-later | | -| Voxglitch | GPL-3.0-or-later | [License still to be applied in the repo](https://github.com/clone45/voxglitch/issues/123) | +| Voxglitch | GPL-3.0-or-later | | | ZetaCarinae | GPL-3.0-or-later | | | ZZC | GPL-3.0-or-later | | @@ -190,7 +190,7 @@ Below is a list of artwork licenses from plugins | ValleyAudio/din1451alt.ttf | CC-BY-3.0-DE | | | ValleyAudio/DSEG14Classic-*.ttf | OFL-1.1-RFN | | | ValleyAudio/ShareTechMono-*.ttf | OFL-1.1-RFN | | -| voxglitch/* | BSD-3-Clause | No artwork specific license provided | +| voxglitch/* | GPL-3.0-or-later | No artwork specific license provided | | voxglitch/ShareTechMono-Regular.ttf | OFL-1.1-RFN | | | ZetaCarinaeModules/* | GPL-3.0-or-later | [Same license as source code](https://github.com/mhampton/ZetaCarinaeModules/issues/8) | | ZZC/* | CC-BY-NC-SA-4.0 | | From 407b71a7d845877a29703479e625d046874519cf Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 8 Mar 2022 19:26:10 +0000 Subject: [PATCH 025/132] Update Befaco, adds Noise Plethora Signed-off-by: falkTX --- docs/LICENSES.md | 1 + plugins/Befaco | 2 +- plugins/Makefile | 1 + plugins/plugins.cpp | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 1337a7d..ae1258f 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -116,6 +116,7 @@ Below is a list of artwork licenses from plugins | BaconPlugs/Keypunch029.json | OFL-1.1 | | | Bidoo/* | CC-BY-NC-ND-4.0 | [Special permission granted for runtime dark mode](https://github.com/sebastien-bouffier/Bidoo/issues/191) | | Befaco/components/* | CC-BY-NC-4.0 | | +| Befaco/fonts/Segment7Standard.otf | OFL-1.1-RFN | | | Befaco/panels/* | Custom | Copyright © [Befaco](https://www.befaco.org/), [used and distributed with permission](LICENSE-PERMISSIONS.md#befaco-manu-retamero--befaco) | | BogaudioModules/* | CC-BY-SA-4.0 | | | BogaudioModules/fonts/audiowide.ttf | OFL-1.1-RFN | | diff --git a/plugins/Befaco b/plugins/Befaco index ec406ce..0cff3b0 160000 --- a/plugins/Befaco +++ b/plugins/Befaco @@ -1 +1 @@ -Subproject commit ec406ce181f340bce8e475cb508c4db0db02fdc6 +Subproject commit 0cff3b0281873a97831dd51a03ad5cd92ce83c0e diff --git a/plugins/Makefile b/plugins/Makefile index 0143a85..7b19d25 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -422,6 +422,7 @@ PLUGIN_FILES += $(wildcard BaconPlugs/libs/open303-code/Source/DSPCode/*.cpp) # Befaco PLUGIN_FILES += $(filter-out Befaco/src/plugin.cpp,$(wildcard Befaco/src/*.cpp)) +PLUGIN_FILES += $(wildcard Befaco/src/noise-plethora/*/*.cpp) PLUGIN_BINARIES += Befaco/src/SpringReverbIR.pcm # modules/types which are present in other plugins diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 91f951c..8b13777 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1209,6 +1209,7 @@ static void initStatic__Befaco() p->addModel(modelSTMix); p->addModel(modelMuxlicer); p->addModel(modelMex); + p->addModel(modelNoisePlethora); #undef modelADSR #undef modelMixer } From 591adabe6af33d67372662b5d42381281b50cf31 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 9 Mar 2022 12:44:23 +0000 Subject: [PATCH 026/132] Remove dintree, artwork license issues --- README.md | 1 - docs/LICENSES.md | 2 -- plugins/Dintree | 1 - plugins/Makefile | 15 --------------- plugins/plugins.cpp | 25 ------------------------- 5 files changed, 44 deletions(-) delete mode 160000 plugins/Dintree diff --git a/README.md b/README.md index 2bf06d0..72ac8ad 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,6 @@ At the moment the following 3rd-party modules are provided: - Catro/Modulo - cf - ChowDSP -- Dintree Virtual - DrumKit - E-Series - ExpertSleepers Encoders diff --git a/docs/LICENSES.md b/docs/LICENSES.md index ae1258f..bde0c0c 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -31,7 +31,6 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Catro/Modulo | BSD-3-Clause | | | cf | BSD-3-Clause | | | ChowDSP | GPL-3.0-or-later | | -| Dintree | GPL-3.0-or-later | | | DrumKit | CC0-1.0 | | | E-Series | GPL-3.0-or-later | | | ExpertSleepers Encoders | MIT | | @@ -131,7 +130,6 @@ Below is a list of artwork licenses from plugins | cf/VT323-Regular.ttf | OFL-1.1-no-RFN | | | ChowDSP/* | GPL-3.0-or-later | Same license as source code | | ChowDSP/fonts/RobotoCondensed-*.ttf | Apache-2.0 | | -| Dintree/* | GPL-3.0-or-later | No artwork specific license provided | | DrumKit/* | CC0-1.0 | | | DrumKit/component/NovaMono.ttf | OFL-1.1-RFN | | | E-Series/* | Custom | Copyright © Synthesis Technology, [used and distributed with permission](LICENSE-PERMISSIONS.md#eseries-paul-schreiber--synthtech) | diff --git a/plugins/Dintree b/plugins/Dintree deleted file mode 160000 index 51a01f2..0000000 --- a/plugins/Dintree +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 51a01f2d14988a41060f25ba203b38e6f6767605 diff --git a/plugins/Makefile b/plugins/Makefile index 7b19d25..0e7d629 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -474,13 +474,6 @@ CATROMODULO_CUSTOM = LowFrequencyOscillator NumDisplayWidget PLUGIN_FILES += $(filter-out cf/src/plugin.cpp,$(wildcard cf/src/*.cpp)) -# -------------------------------------------------------------- -# Dintree - -PLUGIN_FILES += $(filter-out Dintree/src/plugin.cpp,$(wildcard Dintree/src/*.cpp)) -PLUGIN_FILES += $(wildcard Dintree/src/components/*.cpp) -PLUGIN_FILES += $(wildcard Dintree/src/utils/*.cpp) - # -------------------------------------------------------------- # DrumKit @@ -1392,14 +1385,6 @@ $(BUILD_DIR)/ChowDSP/%.cpp.o: ChowDSP/%.cpp -IChowDSP/lib/chowdsp_utils/DSP/WDF \ -Wno-deprecated-copy -$(BUILD_DIR)/Dintree/%.cpp.o: Dintree/%.cpp - -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" - @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ - $(foreach m,$(DINTREE_CUSTOM),$(call custom_module_names,$(m),Dintree)) \ - -DpluginInstance=pluginInstance__Dintree \ - -DSKIP_MINGW_FORMAT - $(BUILD_DIR)/DrumKit/%.cpp.o: DrumKit/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 8b13777..1fe6926 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -290,9 +290,6 @@ extern Model* modelTestVCF; #include "ChowDSP/src/plugin.cpp" #undef init -// Dintree -#include "Dintree/src/plugin.hpp" - // DrumKit #include "DrumKit/src/DrumKit.hpp" void setupSamples(); @@ -725,7 +722,6 @@ Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__CatroModulo; Plugin* pluginInstance__cf; Plugin* pluginInstance__ChowDSP; -Plugin* pluginInstance__Dintree; extern Plugin* pluginInstance__DrumKit; Plugin* pluginInstance__ESeries; Plugin* pluginInstance__ExpertSleepersEncoders; @@ -1512,26 +1508,6 @@ static void initStatic__ChowDSP() } } -static void initStatic__Dintree() -{ - Plugin* const p = new Plugin; - pluginInstance__Dintree = p; - - const StaticPluginLoader spl(p, "Dintree"); - if (spl.ok()) - { - p->addModel(modelV100_Scanner); - p->addModel(modelV101_Dual_Envelope); - p->addModel(modelV102_Output_Mixer); - p->addModel(modelV103_Reverb_Delay); - p->addModel(modelV104_Four_Vs); - p->addModel(modelV105_Quad_CV_Proc); - p->addModel(modelV107_Dual_Slew); - p->addModel(modelV201_Tri_Comparator); - p->addModel(modelV218_SH_Clock_Noise); - } -} - static void initStatic__DrumKit() { Plugin* const p = new Plugin; @@ -2574,7 +2550,6 @@ void initStaticPlugins() initStatic__CatroModulo(); initStatic__cf(); initStatic__ChowDSP(); - initStatic__Dintree(); initStatic__DrumKit(); initStatic__ESeries(); initStatic__ExpertSleepersEncoders(); From defa8c07f2a671517a0a91bf50ab701bcd9952c3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 9 Mar 2022 13:49:48 +0000 Subject: [PATCH 027/132] Really remove dintree --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index b2ccb1e..25ad965 100644 --- a/.gitmodules +++ b/.gitmodules @@ -169,9 +169,6 @@ [submodule "plugins/PathSet"] path = plugins/PathSet url = https://github.com/patheros/PathSetModules.git -[submodule "plugins/Dintree"] - path = plugins/Dintree - url = https://github.com/hires/Dintree-Virtual.git [submodule "plugins/Algoritmarte"] path = plugins/Algoritmarte url = https://github.com/algoritmarte/AlgoritmarteVCVPlugin.git From c61e13ad3cd60af2e086d3698fa86a8b6aa46df6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 9 Mar 2022 19:06:10 +0000 Subject: [PATCH 028/132] More jucewrapper work --- jucewrapper/CMakeLists.txt | 68 +++++++++++++++++++++------------ jucewrapper/CardinalWrapper.cpp | 65 ++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 27 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 5de734c..ee38a2f 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -55,10 +55,12 @@ set_property(TARGET sPlugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/. add_library(sRack STATIC IMPORTED) set_property(TARGET sRack PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/rack.a") -#ifeq ($(WINDOWS),true) -#RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libarchive_static.a add_library(libarchive STATIC IMPORTED) +if (WIN32) +set_property(TARGET libarchive PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libarchive_static.a") +else (WIN32) set_property(TARGET libarchive PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libarchive.a") +endif (WIN32) add_library(libjansson STATIC IMPORTED) set_property(TARGET libjansson PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libjansson.a") @@ -75,9 +77,29 @@ set_property(TARGET libspeexdsp PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR add_library(libzstd STATIC IMPORTED) set_property(TARGET libzstd PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libzstd.a") -#find_package(Dbus) -find_package(OpenGL) -find_package(X11) +# dependencies + +find_package(PkgConfig REQUIRED) +pkg_check_modules(LIBLO REQUIRED liblo) +pkg_check_modules(SNDFILE REQUIRED sndfile) + +if (NOT APPLE OR WIN32) +pkg_check_modules(X11 REQUIRED x11) +pkg_check_modules(XCURSOR REQUIRED Xcursor) +pkg_check_modules(XEXT REQUIRED Xext) +pkg_check_modules(XRANDR REQUIRED Xrandr) +pkg_check_modules(DBUS REQUIRED dbus-1) +set(EXTRA_LIBS "-lrt") +endif (NOT APPLE OR WIN32) + +if (APPLE) +set(EXTRA_LIBS "-lz") +set(GL_LIBRARIES "-framework OpenGL") +else (APPLE) +pkg_check_modules(GL REQUIRED gl) +set(STATIC_LIBS_START "-Wl,--whole-archive") +set(STATIC_LIBS_END "-Wl,--no-whole-archive") +endif (APPLE) # FX variant @@ -89,7 +111,7 @@ juce_add_plugin(CardinalFX EDITOR_WANTS_KEYBOARD_FOCUS TRUE PLUGIN_MANUFACTURER_CODE Dstr PLUGIN_CODE dCnF - FORMATS Standalone AU + FORMATS Standalone VST3 AU PRODUCT_NAME "CardinalFX") target_sources(CardinalFX @@ -98,23 +120,20 @@ target_sources(CardinalFX target_include_directories(CardinalFX PRIVATE - . - ../dpf/distrho) + ../dpf/distrho + ../src/CardinalFX) target_compile_definitions(CardinalFX PUBLIC JUCE_DISPLAY_SPLASH_SCREEN=0 JUCE_USE_CURL=0 + JUCE_VST3_CAN_REPLACE_VST2=0 JUCE_WEB_BROWSER=0) -target_link_directories(CardinalFX - PUBLIC - /opt/kxstudio/lib) - target_link_libraries(CardinalFX PRIVATE juce::juce_audio_utils - -Wl,--whole-archive + ${STATIC_LIBS_START} sCardinalFX sPlugins sRack @@ -136,19 +155,18 @@ target_link_libraries(CardinalFX libsamplerate libspeexdsp libzstd - -Wl,--no-whole-archive - GLX - OpenGL - X11 - Xcursor - Xext - Xrandr - PUBLIC - -ldbus-1 - -llo + ${STATIC_LIBS_END} + ${GL_LIBRARIES} + ${DBUS_LIBRARIES} + ${LIBLO_LIBRARIES} + ${SNDFILE_LIBRARIES} + ${X11_LIBRARIES} + ${XCURSOR_LIBRARIES} + ${XEXT_LIBRARIES} + ${XRANDR_LIBRARIES} + ${EXTRA_LIBS} -lmagic - -lsndfile -lFLAC -lvorbisenc -lvorbis -logg - -lrt + PUBLIC juce::juce_recommended_config_flags juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index aab8db1..8f244d4 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -77,6 +77,7 @@ class CardinalWrapperProcessor : public juce::AudioProcessor friend class CardinalWrapperEditor; PluginExporter plugin; + TimePosition timePosition; static bool writeMidi(void* ptr, const MidiEvent& midiEvent) { @@ -137,7 +138,55 @@ public: void processBlock(juce::AudioBuffer& buffer, juce::MidiBuffer& midiMessages) override { midiMessages.clear(); - // AudioPlayHead* getPlayHead() + + juce::AudioPlayHead* const playhead = getPlayHead(); + juce::AudioPlayHead::CurrentPositionInfo posInfo; + + if (playhead != nullptr && playhead->getCurrentPosition(posInfo)) + { + timePosition.playing = posInfo.isPlaying; + timePosition.bbt.valid = true; + + // ticksPerBeat is not possible with JUCE + timePosition.bbt.ticksPerBeat = 1920.0; + + if (posInfo.timeInSamples >= 0) + timePosition.frame = posInfo.timeInSamples; + else + timePosition.frame = 0; + + timePosition.bbt.beatsPerMinute = posInfo.bpm; + + const double ppqPos = std::abs(posInfo.ppqPosition); + const int ppqPerBar = posInfo.timeSigNumerator * 4 / posInfo.timeSigDenominator; + const double barBeats = (std::fmod(ppqPos, ppqPerBar) / ppqPerBar) * posInfo.timeSigNumerator; + const double rest = std::fmod(barBeats, 1.0); + + timePosition.bbt.bar = static_cast(ppqPos) / ppqPerBar + 1; + timePosition.bbt.beat = static_cast(barBeats - rest + 0.5) + 1; + timePosition.bbt.tick = rest * timePosition.bbt.ticksPerBeat; + timePosition.bbt.beatsPerBar = posInfo.timeSigNumerator; + timePosition.bbt.beatType = posInfo.timeSigDenominator; + + if (posInfo.ppqPosition < 0.0) + { + --timePosition.bbt.bar; + timePosition.bbt.beat = posInfo.timeSigNumerator - timePosition.bbt.beat + 1; + timePosition.bbt.tick = timePosition.bbt.ticksPerBeat - timePosition.bbt.tick - 1; + } + + timePosition.bbt.barStartTick = timePosition.bbt.ticksPerBeat* + timePosition.bbt.beatsPerBar* + (timePosition.bbt.bar-1); + } + else + { + timePosition.frame = 0; + timePosition.playing = false; + timePosition.bbt.valid = false; + } + + plugin.setTimePosition(timePosition); const int numSamples = buffer.getNumSamples(); DISTRHO_SAFE_ASSERT_INT_RETURN(numSamples > 0, numSamples,); @@ -222,7 +271,19 @@ class CardinalWrapperEditor : public juce::AudioProcessorEditor static void setSizeFunc(void* ptr, uint width, uint height) { - static_cast(ptr)->setSize(width, height); + CardinalWrapperEditor* const editor = static_cast(ptr); + DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); + + #ifdef DISTRHO_OS_MAC + UIExporter* const ui = editor->ui; + DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); + + const double scaleFactor = ui->getScaleFactor(); + width /= scaleFactor; + height /= scaleFactor; + #endif + + editor->setSize(width, height); } static bool fileRequestFunc(void* ptr, const char* key) { return false; } From be0f0ba5e865320f85e01199bd18032e4d0c28ee Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 17:00:18 +0000 Subject: [PATCH 029/132] Update voxglitch, fixes build with -Werror=format-security Closes #189 Signed-off-by: falkTX --- plugins/voxglitch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/voxglitch b/plugins/voxglitch index df225f3..3281fd3 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit df225f3e7df531dd71bd36f1a20acbd05a5f4b5c +Subproject commit 3281fd38883576ad3afaf96bf6b10639345a4f25 From d3eb29bf57b392b4281a0a743da61979b9efb930 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 18:24:01 +0000 Subject: [PATCH 030/132] Fix jucewrapper for linux Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index ee38a2f..f843b81 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -85,9 +85,9 @@ pkg_check_modules(SNDFILE REQUIRED sndfile) if (NOT APPLE OR WIN32) pkg_check_modules(X11 REQUIRED x11) -pkg_check_modules(XCURSOR REQUIRED Xcursor) -pkg_check_modules(XEXT REQUIRED Xext) -pkg_check_modules(XRANDR REQUIRED Xrandr) +pkg_check_modules(XCURSOR REQUIRED xcursor) +pkg_check_modules(XEXT REQUIRED xext) +pkg_check_modules(XRANDR REQUIRED xrandr) pkg_check_modules(DBUS REQUIRED dbus-1) set(EXTRA_LIBS "-lrt") endif (NOT APPLE OR WIN32) @@ -158,6 +158,7 @@ target_link_libraries(CardinalFX ${STATIC_LIBS_END} ${GL_LIBRARIES} ${DBUS_LIBRARIES} + -L${LIBLO_LIBRARY_DIRS} ${LIBLO_LIBRARIES} ${SNDFILE_LIBRARIES} ${X11_LIBRARIES} From f54c584e587f777efbbc38b108e880465bfed070 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 21:37:45 +0000 Subject: [PATCH 031/132] Update carla and dpf, fixing state save in MOD builds Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index f1d7b59..c06a4e6 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit f1d7b590204073c7aaecbbc402f40623021aa420 +Subproject commit c06a4e626ad897900895560999f05acb39740a85 diff --git a/dpf b/dpf index aad2a31..55916eb 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit aad2a31f76251d031638d6385a68efef25452715 +Subproject commit 55916eb0fba3a829a6e50bd38371b6ad37912292 From ba48ef0b27bf7e4455c7b456ec516ba9da597073 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 21:38:09 +0000 Subject: [PATCH 032/132] Temporarily remove substation Signed-off-by: falkTX --- .gitmodules | 3 -- README.md | 1 - docs/LICENSES.md | 2 -- plugins/Makefile | 17 --------- plugins/plugins.cpp | 44 ------------------------ plugins/substation-opensource | 1 - plugins/substation-settings/Settings.cpp | 35 ------------------- 7 files changed, 103 deletions(-) delete mode 160000 plugins/substation-opensource delete mode 100644 plugins/substation-settings/Settings.cpp diff --git a/.gitmodules b/.gitmodules index 25ad965..373a11d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -130,9 +130,6 @@ [submodule "plugins/Autinn"] path = plugins/Autinn url = https://github.com/NikolaiVChr/Autinn.git -[submodule "plugins/substation-opensource"] - path = plugins/substation-opensource - url = https://gitlab.com/falktx/substation-opensource.git [submodule "plugins/MockbaModular"] path = plugins/MockbaModular url = https://github.com/MockbaTheBorg/MockbaModular.git diff --git a/README.md b/README.md index 72ac8ad..be8c9d0 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,6 @@ At the moment the following 3rd-party modules are provided: - repelzen - Sonus Modular - stocaudio -- Substation Opensource - Valley - Voxglitch - ZetaCarinae diff --git a/docs/LICENSES.md b/docs/LICENSES.md index bde0c0c..31c969a 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -63,7 +63,6 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Prism | BSD-3-Clause | | | Rackwindows | MIT | | | repelzen | GPL-3.0-or-later | | -| Substation Opensource | BSD-3-Clause-Attribution | Need to check full compatibility with GPLv3+ | | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | | Valley | GPL-3.0-or-later | | @@ -182,7 +181,6 @@ Below is a list of artwork licenses from plugins | Prism/RobotoCondensed-Regular.ttf | Apache-2.0 | | | Rackwindows/* | MIT | [Same license as source code](https://github.com/n0jo/rackwindows/issues/15) | | repelzen/* | CC-BY-SA-4.0 | | -| substation-opensource/* | BSD-3-Clause-Attribution | No artwork specific license provided | | sonusmodular/* | GPL-3.0-or-later | [Same license as source code](https://gitlab.com/sonusdept/sonusmodular/-/issues/14) | | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | | ValleyAudio/* | GPL-3.0-or-later | [Same license as source code](https://github.com/ValleyAudio/ValleyRackFree/issues/73) | diff --git a/plugins/Makefile b/plugins/Makefile index 0e7d629..d98f492 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -766,14 +766,6 @@ PLUGIN_FILES += $(filter-out sonusmodular/src/sonusmodular.cpp,$(wildcard sonusm PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/*.cpp)) -# -------------------------------------------------------------- -# Substation (Open source release) - -PLUGIN_FILES += $(wildcard substation-opensource/dep/slime4rack/src/slime/*.cpp) -PLUGIN_FILES += $(wildcard substation-opensource/dep/slime4rack/src/slime/**/*.cpp) -PLUGIN_FILES += $(filter-out substation-opensource/src/_plugin.cpp substation-opensource/src/Settings.cpp,$(wildcard substation-opensource/src/*.cpp)) -PLUGIN_FILES += substation-settings/Settings.cpp - # -------------------------------------------------------------- # ValleyAudio @@ -1715,15 +1707,6 @@ $(BUILD_DIR)/stocaudio/%.cpp.o: stocaudio/%.cpp $(foreach m,$(STOCAUDIO_CUSTOM),$(call custom_module_names,$(m),stocaudio)) \ -DpluginInstance=pluginInstance__stocaudio -$(BUILD_DIR)/substation-%.cpp.o: substation-%.cpp - -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" - @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ - $(foreach m,$(SUBSTATION_CUSTOM),$(call custom_module_names,$(m),substation)) \ - -DpluginInstance=pluginInstance__substation \ - -D'PRIVATE=__attribute__((error("Using internal Rack function or symbol")))' \ - -Isubstation-opensource/dep/slime4rack/include - $(BUILD_DIR)/ValleyAudio/%.cpp.o: ValleyAudio/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 1fe6926..b789e26 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -649,26 +649,6 @@ extern Model* modelBlankPanel; // stocaudio #include "stocaudio/src/plugin.hpp" -// substation -/* NOTE too much noise in original include, do this a different way -// "substation-opensource/src/_plugin.hpp" -*/ -namespace slime { -namespace plugin { -namespace substation { -extern Model* modelClock; -extern Model* modelPolySequencer; -extern Model* modelSubOscillator; -extern Model* modelMixer; -extern Model* modelFilter; -extern Model* modelEnvelopes; -extern Model* modelQuantizer; -extern Model* modelVCA; -extern Model* modelBlank4; -extern Model* modelBlank7; -extern Model* modelFilterPlus; -}}} - // ValleyAudio #include "ValleyAudio/src/Valley.hpp" @@ -759,7 +739,6 @@ Plugin* pluginInstance__rackwindows; Plugin* pluginInstance__repelzen; Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; -Plugin* pluginInstance__substation; Plugin* pluginInstance__ValleyAudio; Plugin* pluginInstance__Voxglitch; Plugin* pluginInstance__ZetaCarinaeModules; @@ -2412,28 +2391,6 @@ static void initStatic__stocaudio() } } -static void initStatic__substation() -{ - Plugin* const p = new Plugin; - pluginInstance__substation = p; - - const StaticPluginLoader spl(p, "substation-opensource"); - if (spl.ok()) - { - p->addModel(slime::plugin::substation::modelClock); - p->addModel(slime::plugin::substation::modelEnvelopes); - p->addModel(slime::plugin::substation::modelFilter); - p->addModel(slime::plugin::substation::modelMixer); - p->addModel(slime::plugin::substation::modelQuantizer); - p->addModel(slime::plugin::substation::modelPolySequencer); - p->addModel(slime::plugin::substation::modelVCA); - p->addModel(slime::plugin::substation::modelSubOscillator); - p->addModel(slime::plugin::substation::modelBlank4); - p->addModel(slime::plugin::substation::modelBlank7); - p->addModel(slime::plugin::substation::modelFilterPlus); - } -} - static void initStatic__ValleyAudio() { Plugin* const p = new Plugin; @@ -2587,7 +2544,6 @@ void initStaticPlugins() initStatic__repelzen(); initStatic__sonusmodular(); initStatic__stocaudio(); - initStatic__substation(); initStatic__ValleyAudio(); initStatic__Voxglitch(); initStatic__ZetaCarinaeModules(); diff --git a/plugins/substation-opensource b/plugins/substation-opensource deleted file mode 160000 index cbc09d4..0000000 --- a/plugins/substation-opensource +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cbc09d4db02d038493689c192d63b746d453d18f diff --git a/plugins/substation-settings/Settings.cpp b/plugins/substation-settings/Settings.cpp deleted file mode 100644 index 0f16ed1..0000000 --- a/plugins/substation-settings/Settings.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 3 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the LICENSE file. - */ - -#include "../substation-opensource/src/Settings.hpp" - -namespace slime { -namespace plugin { -namespace substation { - -PluginSettings::PluginSettings(void) {} -PluginSettings::~PluginSettings(void) {} -void PluginSettings::save() {} -void PluginSettings::load() {} -void PluginSettings::appendContextMenu(rack::ui::Menu* menu) {} -void PluginSettings::updateCableColors(const bool& value) {} - -PluginSettings settings; - -} // namespace substation -} // namespace plugin -} // namespace slime From 70e22614bec31a4e9b7b11739f324f367cf6bd69 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 21:57:39 +0000 Subject: [PATCH 033/132] CI: Rebuild base dependencies Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- deps/PawPaw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdc7372..334bef4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 6 + CACHE_VERSION: 7 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' diff --git a/deps/PawPaw b/deps/PawPaw index b41a693..cc20186 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit b41a693b64cdba1abd8d278c9985fb690b522854 +Subproject commit cc201866d35449bce0d9e02a85f641aa071437b8 From daa29759f3baf1e7e919528e8e04279928d98fd0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 23:04:21 +0000 Subject: [PATCH 034/132] Make headless Window a complete stub, fixes crashes Signed-off-by: falkTX --- src/custom/RemoteWindow.cpp | 155 +++++------------------------------- 1 file changed, 18 insertions(+), 137 deletions(-) diff --git a/src/custom/RemoteWindow.cpp b/src/custom/RemoteWindow.cpp index e73c41b..29a3cff 100644 --- a/src/custom/RemoteWindow.cpp +++ b/src/custom/RemoteWindow.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -51,16 +51,10 @@ static const math::Vec minWindowSize = math::Vec(1228, 666); void Font::loadFile(const std::string& filename, NVGcontext* vg) { - this->vg = vg; - handle = nvgCreateFont(vg, filename.c_str(), filename.c_str()); - if (handle < 0) - throw Exception("Failed to load font %s", filename.c_str()); - INFO("Loaded font %s", filename.c_str()); } Font::~Font() { - // There is no NanoVG deleteFont() function yet, so do nothing } @@ -70,18 +64,10 @@ std::shared_ptr Font::load(const std::string& filename) { void Image::loadFile(const std::string& filename, NVGcontext* vg) { - this->vg = vg; - handle = nvgCreateImage(vg, filename.c_str(), NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); - if (handle <= 0) - throw Exception("Failed to load image %s", filename.c_str()); - INFO("Loaded image %s", filename.c_str()); } Image::~Image() { - // TODO What if handle is invalid? - if (handle >= 0) - nvgDeleteImage(vg, handle); } @@ -90,115 +76,39 @@ std::shared_ptr Image::load(const std::string& filename) { } -struct WindowParams { - float rackBrightness = 1.0f; -}; - -struct Window::Internal -{ - Context* context = nullptr; - Window* self = nullptr; - - math::Vec size = minWindowSize; - std::string lastWindowTitle; - - int mods = 0; - int frame = 0; - int frameSwapInterval = 1; - double monitorRefreshRate = 60.0; // FIXME - double frameTime = 0.0; - double lastFrameDuration = 0.0; - - std::map> fontCache; - std::map> imageCache; - - bool fbDirtyOnSubpixelChange = true; - int fbCount = 0; -}; - Window::Window() { - internal = new Internal; - internal->context = APP; - internal->self = this; + windowRatio = minWindowSize.x / minWindowSize.y; + widget::Widget::ContextCreateEvent e; + APP->scene->onContextCreate(e); } -Window::~Window() { - // internal->stopThread(5000); +Window::~Window() { if (APP->scene) { widget::Widget::ContextDestroyEvent e; APP->scene->onContextDestroy(e); } - - // Fonts and Images in the cache must be deleted before the NanoVG context is deleted - internal->fontCache.clear(); - internal->imageCache.clear(); - - delete internal; } math::Vec Window::getSize() { - return internal->size; + return minWindowSize; } -void Window::setSize(math::Vec size) { - internal->size = size.max(minWindowSize); +void Window::setSize(math::Vec) { } void Window::run() { - internal->frame = 0; } void Window::step() { - double frameTime = system::getTime(); - double lastFrameTime = internal->frameTime; - internal->frameTime = frameTime; - internal->lastFrameDuration = frameTime - lastFrameTime; - internal->fbCount = 0; - // DEBUG("%.2lf Hz", 1.0 / internal->lastFrameDuration); - - // Make event handlers and step() have a clean NanoVG context - nvgReset(vg); - - if (uiFont != nullptr) - bndSetFont(uiFont->handle); - - // Get framebuffer/window ratio - windowRatio = internal->size.x / internal->size.y; - - if (APP->scene) { - // Resize scene - APP->scene->box.size = internal->size; - - // Step scene - APP->scene->step(); - - // Update and render - nvgBeginFrame(vg, internal->size.x, internal->size.y, pixelRatio); - nvgScale(vg, pixelRatio, pixelRatio); - - // Draw scene - widget::Widget::DrawArgs args; - args.vg = vg; - args.clipBox = APP->scene->box.zeroPos(); - APP->scene->draw(args); - - glViewport(0, 0, internal->size.x, internal->size.y); - glClearColor(0.0, 0.0, 0.0, 1.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - nvgEndFrame(vg); - } - - internal->frame++; } void Window::activateContext() { - // glfwMakeContextCurrent(win); } @@ -228,7 +138,7 @@ bool Window::isCursorLocked() { int Window::getMods() { - return internal->mods; + return 0; } @@ -242,73 +152,44 @@ bool Window::isFullScreen() { double Window::getMonitorRefreshRate() { - return internal->monitorRefreshRate; + return 60; } double Window::getFrameTime() { - return internal->frameTime; + return 0; } double Window::getLastFrameDuration() { - return internal->lastFrameDuration; + return 0.0; } double Window::getFrameDurationRemaining() { - double frameDurationDesired = internal->frameSwapInterval / internal->monitorRefreshRate; - return frameDurationDesired - (system::getTime() - internal->frameTime); + return 0.0; } std::shared_ptr Window::loadFont(const std::string& filename) { - const auto& pair = internal->fontCache.find(filename); - if (pair != internal->fontCache.end()) - return pair->second; - - // Load font - std::shared_ptr font; - try { - font = std::make_shared(); - font->loadFile(filename, vg); - } - catch (Exception& e) { - WARN("%s", e.what()); - font = NULL; - } - internal->fontCache[filename] = font; - return font; + return std::make_shared(); } std::shared_ptr Window::loadImage(const std::string& filename) { - const auto& pair = internal->imageCache.find(filename); - if (pair != internal->imageCache.end()) - return pair->second; - - // Load image - std::shared_ptr image; - try { - image = std::make_shared(); - image->loadFile(filename, vg); - } - catch (Exception& e) { - WARN("%s", e.what()); - image = NULL; - } - internal->imageCache[filename] = image; - return image; + return std::make_shared(); } bool& Window::fbDirtyOnSubpixelChange() { - return internal->fbDirtyOnSubpixelChange; + static bool _fbDirtyOnSubpixelChange; + return _fbDirtyOnSubpixelChange; } int& Window::fbCount() { - return internal->fbCount; + static int _fbCount; + return _fbCount; } From 5a31b544a94ea1e17705cd7cc87dbe6fbd7354ea Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 23:20:09 +0000 Subject: [PATCH 035/132] Set version as 22.03 Signed-off-by: falkTX --- Makefile | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 67f82ee..125123d 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ # also set in: # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.02 +VERSION = 22.03 # -------------------------------------------------------------- # Import base definitions diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index e738cee..5945b9f 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -49,7 +49,7 @@ # include #endif -const std::string CARDINAL_VERSION = "22.02"; +const std::string CARDINAL_VERSION = "22.03"; namespace rack { namespace settings { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 653991b..d02ed86 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -564,7 +564,7 @@ protected: uint32_t getVersion() const override { - return d_version(0, 22, 2); + return d_version(0, 22, 3); } int64_t getUniqueId() const override From 240160d365560c629090d45be30953122d152488 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 11 Mar 2022 09:49:50 +0000 Subject: [PATCH 036/132] Tweak jucewrapper to behave correctly in standalone --- dpf | 2 +- jucewrapper/CardinalWrapper.cpp | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/dpf b/dpf index 55916eb..2133002 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 55916eb0fba3a829a6e50bd38371b6ad37912292 +Subproject commit 21330021cea0854dc6f21a0c718e0e3692dc441f diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 8f244d4..94184c3 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -259,7 +259,8 @@ public: // ----------------------------------------------------------------------------------------------------------- -class CardinalWrapperEditor : public juce::AudioProcessorEditor +class CardinalWrapperEditor : public juce::AudioProcessorEditor, + private juce::Timer { UIExporter* ui; void* const dspPtr; @@ -298,14 +299,22 @@ public: setResizable(true, false); // setResizeLimits(648, 538, -1, -1); setSize(1228, 666); + + startTimer(1000.0 / 60.0); } ~CardinalWrapperEditor() override { + stopTimer(); delete ui; } - void paint(juce::Graphics&) + void timerCallback() override + { + repaint(); + } + + void paint(juce::Graphics&) override { if (ui == nullptr) { @@ -331,10 +340,15 @@ public: dspPtr, 0.0 // scaleFactor ); + + if (getAudioProcessor()->wrapperType == juce::AudioProcessor::wrapperType_Standalone) + { + const double scaleFactor = ui->getScaleFactor(); + ui->setWindowOffset(4 * scaleFactor, 30 * scaleFactor); + } } ui->plugin_idle(); - repaint(); } }; From 1ff860d8e5fe753696ead34f381030e04fdd8327 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 11 Mar 2022 22:20:23 +0000 Subject: [PATCH 037/132] Tweak jucewrapper config Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index f843b81..e3a05a7 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 0.0.0) +project(Cardinal VERSION 22.03) add_subdirectory(JUCE) @@ -104,14 +104,19 @@ endif (APPLE) # FX variant juce_add_plugin(CardinalFX - IS_SYNTH FALSE - NEEDS_MIDI_INPUT FALSE - NEEDS_MIDI_OUTPUT FALSE - IS_MIDI_EFFECT FALSE + AU_MAIN_TYPE kAudioUnitType_Effect + COMPANY_COPYRIGHT "GPL-3.0-or-later" + COMPANY_NAME "DISTRHO" + COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" + DESCRIPTION "Virtual modular synthesizer plugin" EDITOR_WANTS_KEYBOARD_FOCUS TRUE + FORMATS Standalone AU + IS_MIDI_EFFECT FALSE + IS_SYNTH FALSE + NEEDS_MIDI_INPUT TRUE + NEEDS_MIDI_OUTPUT TRUE + PLUGIN_CODE DcnF PLUGIN_MANUFACTURER_CODE Dstr - PLUGIN_CODE dCnF - FORMATS Standalone VST3 AU PRODUCT_NAME "CardinalFX") target_sources(CardinalFX @@ -125,9 +130,19 @@ target_include_directories(CardinalFX target_compile_definitions(CardinalFX PUBLIC + JUCE_CHECK_MEMORY_LEAKS=0 + JUCE_DISABLE_NATIVE_FILECHOOSERS=0 JUCE_DISPLAY_SPLASH_SCREEN=0 + JUCE_MODAL_LOOPS_PERMITTED=0 JUCE_USE_CURL=0 + JUCE_USE_FLAC=0 + JUCE_USE_OGGVORBIS=0 + JUCE_USE_XINERAMA=0 JUCE_VST3_CAN_REPLACE_VST2=0 + JUCE_ALSA=1 + JUCE_DIRECTSOUND=0 + JUCE_JACK=1 + JUCE_WASAPI=0 JUCE_WEB_BROWSER=0) target_link_libraries(CardinalFX From d6cc4af637d61bbcaefa268a8e788d8081c946a3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 11 Mar 2022 22:33:18 +0000 Subject: [PATCH 038/132] Cleanup whitespace Signed-off-by: falkTX --- src/CardinalModuleWidget.cpp | 89 ++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/src/CardinalModuleWidget.cpp b/src/CardinalModuleWidget.cpp index d287ad8..57f3ec3 100644 --- a/src/CardinalModuleWidget.cpp +++ b/src/CardinalModuleWidget.cpp @@ -304,61 +304,62 @@ void CardinalModuleWidget::onButton(const ButtonEvent& e) if (selected) { if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { - if (e.action == GLFW_PRESS) { + if (e.action == GLFW_PRESS) { + // Open selection context menu on right-click ui::Menu* menu = createMenu(); patchUtils::appendSelectionContextMenu(menu); } e.consume(this); } - if (e.button == GLFW_MOUSE_BUTTON_LEFT) { - if (e.action == GLFW_PRESS) { - // Toggle selection on Shift-click - if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, false); - e.consume(NULL); - return; - } + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, false); + e.consume(NULL); + return; + } - internal->dragOffset = e.pos; - } + internal->dragOffset = e.pos; + } - e.consume(this); - } + e.consume(this); + } - return; + return; } - // Dispatch event to children - Widget::onButton(e); - e.stopPropagating(); - if (e.isConsumed()) - return; - - if (e.button == GLFW_MOUSE_BUTTON_LEFT) { - if (e.action == GLFW_PRESS) { - // Toggle selection on Shift-click - if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, true); - e.consume(NULL); - return; - } - - // If module positions are locked, don't consume left-click - if (settings::lockModules) { - return; - } - - internal->dragOffset = e.pos; - } - e.consume(this); - } - - // Open context menu on right-click - if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { - CardinalModuleWidget__createContextMenu(this, model, module); - e.consume(this); - } + // Dispatch event to children + Widget::onButton(e); + e.stopPropagating(); + if (e.isConsumed()) + return; + + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, true); + e.consume(NULL); + return; + } + + // If module positions are locked, don't consume left-click + if (settings::lockModules) { + return; + } + + internal->dragOffset = e.pos; + } + e.consume(this); + } + + // Open context menu on right-click + if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { + CardinalModuleWidget__createContextMenu(this, model, module); + e.consume(this); + } } } From ef1d02bbc67feab408b8b2877dfa4f1978d1e454 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 12 Mar 2022 01:52:10 +0000 Subject: [PATCH 039/132] Finish jucewrapper details, attempt at AU packaging Signed-off-by: falkTX --- .github/workflows/build.yml | 12 +- dpf | 2 +- jucewrapper/CMakeLists.txt | 91 ++++++- jucewrapper/CardinalWrapper.cpp | 468 ++++++++++++++++++++++++++------ src/Makefile.cardinal.mk | 4 +- 5 files changed, 486 insertions(+), 91 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 334bef4..97df633 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -336,11 +336,21 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos-universal - - name: Build macOS universal + - name: Build macOS universal (base) run: | pushd deps/PawPaw; source local.env macos-universal; popd make features make NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu) + - name: Build macOS universal (AU using juce) + run: | + pushd deps/PawPaw; source local.env macos-universal; popd + git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE + mkdir jucewrapper/build + pushd jucewrapper/build; cmake .. && make -j $(sysctl -n hw.logicalcpu); popd + mv jucewrapper/build/*_artefacts/AU/*.component bin/ + - name: Build macOS universal (packaging) + run: | + pushd deps/PawPaw; source local.env macos-universal; popd ./dpf/utils/package-osx-bundles.sh - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true diff --git a/dpf b/dpf index 2133002..215fc23 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 21330021cea0854dc6f21a0c718e0e3692dc441f +Subproject commit 215fc2317efe822abf5eb545f422eedbb473693d diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index e3a05a7..c0c2849 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -49,6 +49,9 @@ set_property(TARGET zita_resampler PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_ add_library(sCardinalFX STATIC IMPORTED) set_property(TARGET sCardinalFX PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/CardinalFX.a") +add_library(sCardinalSynth STATIC IMPORTED) +set_property(TARGET sCardinalSynth PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/CardinalSynth.a") + add_library(sPlugins STATIC IMPORTED) set_property(TARGET sPlugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../plugins/plugins.a") @@ -110,7 +113,7 @@ juce_add_plugin(CardinalFX COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" DESCRIPTION "Virtual modular synthesizer plugin" EDITOR_WANTS_KEYBOARD_FOCUS TRUE - FORMATS Standalone AU + FORMATS Standalone VST3 AU IS_MIDI_EFFECT FALSE IS_SYNTH FALSE NEEDS_MIDI_INPUT TRUE @@ -130,6 +133,7 @@ target_include_directories(CardinalFX target_compile_definitions(CardinalFX PUBLIC + JucePlugin_PreferredChannelConfigurations={2,2} JUCE_CHECK_MEMORY_LEAKS=0 JUCE_DISABLE_NATIVE_FILECHOOSERS=0 JUCE_DISPLAY_SPLASH_SCREEN=0 @@ -188,3 +192,88 @@ target_link_libraries(CardinalFX juce::juce_recommended_warning_flags) # Synth variant + +juce_add_plugin(CardinalSynth + AU_MAIN_TYPE kAudioUnitType_Generator + COMPANY_COPYRIGHT "GPL-3.0-or-later" + COMPANY_NAME "DISTRHO" + COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" + DESCRIPTION "Virtual modular synthesizer plugin" + EDITOR_WANTS_KEYBOARD_FOCUS TRUE + FORMATS Standalone VST3 AU + IS_MIDI_EFFECT FALSE + IS_SYNTH TRUE + NEEDS_MIDI_INPUT TRUE + NEEDS_MIDI_OUTPUT TRUE + PLUGIN_CODE DcnS + PLUGIN_MANUFACTURER_CODE Dstr + PRODUCT_NAME "CardinalSynth") + +target_sources(CardinalSynth + PRIVATE + CardinalWrapper.cpp) + +target_include_directories(CardinalSynth + PRIVATE + ../dpf/distrho + ../src/CardinalSynth) + +target_compile_definitions(CardinalSynth + PUBLIC + JucePlugin_PreferredChannelConfigurations={0,2} + JUCE_CHECK_MEMORY_LEAKS=0 + JUCE_DISABLE_NATIVE_FILECHOOSERS=0 + JUCE_DISPLAY_SPLASH_SCREEN=0 + JUCE_MODAL_LOOPS_PERMITTED=0 + JUCE_USE_CURL=0 + JUCE_USE_FLAC=0 + JUCE_USE_OGGVORBIS=0 + JUCE_USE_XINERAMA=0 + JUCE_VST3_CAN_REPLACE_VST2=0 + JUCE_ALSA=1 + JUCE_DIRECTSOUND=0 + JUCE_JACK=1 + JUCE_WASAPI=0 + JUCE_WEB_BROWSER=0) + +target_link_libraries(CardinalSynth + PRIVATE + juce::juce_audio_utils + ${STATIC_LIBS_START} + sCardinalSynth + sPlugins + sRack + carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + zita_resampler + dgl + libarchive + libjansson + libquickjs + libsamplerate + libspeexdsp + libzstd + ${STATIC_LIBS_END} + ${GL_LIBRARIES} + ${DBUS_LIBRARIES} + -L${LIBLO_LIBRARY_DIRS} + ${LIBLO_LIBRARIES} + ${SNDFILE_LIBRARIES} + ${X11_LIBRARIES} + ${XCURSOR_LIBRARIES} + ${XEXT_LIBRARIES} + ${XRANDR_LIBRARIES} + ${EXTRA_LIBS} + -lmagic + PUBLIC + juce::juce_recommended_config_flags + juce::juce_recommended_lto_flags + juce::juce_recommended_warning_flags) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 94184c3..8503c06 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -23,39 +23,55 @@ START_NAMESPACE_DISTRHO -#if 0 +// -------------------------------------------------------------------------------------------------------------------- -// ----------------------------------------------------------------------------------------------------------- - -class ParameterForDPF : public juce::AudioProcessorParameter +class ParameterFromDPF : public juce::AudioProcessorParameter { PluginExporter& plugin; + const ParameterEnumerationValues& enumValues; + const ParameterRanges& ranges; + const uint32_t hints; const uint index; + bool* const updatedPtr; + mutable juce::StringArray dpfValueStrings; public: - ParameterForDPF(PluginExporter& plugin_, const uint index_) + ParameterFromDPF(PluginExporter& plugin_, const uint index_, bool* const updatedPtr_) : plugin(plugin_), - index(index_) {} + enumValues(plugin_.getParameterEnumValues(index_)), + ranges(plugin_.getParameterRanges(index_)), + hints(plugin_.getParameterHints(index_)), + index(index_), + updatedPtr(updatedPtr_) {} + + void setValueNotifyingHostFromDPF(const float newValue) + { + setValueNotifyingHost(ranges.getNormalizedValue(newValue)); + *updatedPtr = false; + } protected: float getValue() const override { - return plugin.getParameterRanges(index).getNormalizedValue(plugin.getParameterValue(index)); + return ranges.getNormalizedValue(plugin.getParameterValue(index)); } void setValue(const float newValue) override { - plugin.setParameterValue(index, plugin.getParameterRanges(index).getUnnormalizedValue(newValue)); + *updatedPtr = true; + plugin.setParameterValue(index, ranges.getUnnormalizedValue(newValue)); } float getDefaultValue() const override { - return plugin.getParameterDefault(index); + return ranges.getNormalizedValue(plugin.getParameterDefault(index)); } - juce::String getName(int) const override + juce::String getName(const int maximumStringLength) const override { - return plugin.getParameterName(index).buffer(); + DISTRHO_SAFE_ASSERT_RETURN(maximumStringLength > 0, {}); + + return juce::String(plugin.getParameterName(index).buffer(), static_cast(maximumStringLength)); } juce::String getLabel() const override @@ -63,55 +79,214 @@ protected: return plugin.getParameterUnit(index).buffer(); } - float getValueForText(const juce::String& text) const override + int getNumSteps() const override { - return 0.0f; - } -}; -#endif + if (hints & kParameterIsBoolean) + return 2; -// ----------------------------------------------------------------------------------------------------------- + if (enumValues.restrictedMode) + return enumValues.count; -class CardinalWrapperProcessor : public juce::AudioProcessor -{ - friend class CardinalWrapperEditor; + if (hints & kParameterIsInteger) + return ranges.max - ranges.min; - PluginExporter plugin; - TimePosition timePosition; + return juce::AudioProcessorParameter::getNumSteps(); + } - static bool writeMidi(void* ptr, const MidiEvent& midiEvent) + bool isDiscrete() const override { + if (hints & (kParameterIsBoolean|kParameterIsInteger)) + return true; + + if (enumValues.restrictedMode) + return true; + return false; } - static bool requestParameterValueChange(void* ptr, uint32_t index, float value) + bool isBoolean() const override { - return false; + return (hints & kParameterIsBoolean) != 0x0; } - static bool updateStateValue(void* ptr, const char* key, const char* value) + juce::String getText(const float normalizedValue, const int maximumStringLength) const override { - return false; + DISTRHO_SAFE_ASSERT_RETURN(maximumStringLength > 0, {}); + + float value = ranges.getUnnormalizedValue(normalizedValue); + + if (hints & kParameterIsBoolean) + { + const float midRange = ranges.min + (ranges.max - ranges.min) * 0.5f; + value = value > midRange ? ranges.max : ranges.min; + } + else if (hints & kParameterIsInteger) + { + value = std::round(value); + } + + if (enumValues.restrictedMode) + { + for (uint32_t i=0; i < enumValues.count; ++i) + { + if (d_isEqual(enumValues.values[i].value, value)) + return juce::String(enumValues.values[i].label, static_cast(maximumStringLength)); + } + } + + juce::String text; + if (hints & kParameterIsInteger) + text = juce::String(static_cast(value)); + else + text = juce::String(value); + + return juce::String(text.toRawUTF8(), static_cast(maximumStringLength)); + } + + float getValueForText(const juce::String& text) const override + { + if (enumValues.restrictedMode) + { + for (uint32_t i=0; i < enumValues.count; ++i) + { + if (text == enumValues.values[i].label.buffer()) + return ranges.getNormalizedValue(enumValues.values[i].value); + } + } + + float value; + if (hints & kParameterIsInteger) + value = std::atoi(text.toRawUTF8()); + else + value = std::atof(text.toRawUTF8()); + + return ranges.getFixedAndNormalizedValue(value); + } + + bool isAutomatable() const override + { + return (hints & kParameterIsAutomatable) != 0x0; + } + + juce::String getCurrentValueAsText() const override + { + const float value = plugin.getParameterValue(index); + + if (enumValues.restrictedMode) + { + for (uint32_t i=0; i < enumValues.count; ++i) + { + if (d_isEqual(enumValues.values[i].value, value)) + return juce::String(enumValues.values[i].label); + } + } + + if (hints & kParameterIsInteger) + return juce::String(static_cast(value)); + + return juce::String(value); + } + + juce::StringArray getAllValueStrings() const override + { + if (dpfValueStrings.size() != 0) + return dpfValueStrings; + + if (enumValues.restrictedMode) + { + for (uint32_t i=0; i < enumValues.count; ++i) + dpfValueStrings.add(enumValues.values[i].label.buffer()); + + return dpfValueStrings; + } + + if (hints & kParameterIsBoolean) + { + if (hints & kParameterIsInteger) + { + dpfValueStrings.add(juce::String(static_cast(ranges.min))); + dpfValueStrings.add(juce::String(static_cast(ranges.max))); + } + else + { + dpfValueStrings.add(juce::String(ranges.min)); + dpfValueStrings.add(juce::String(ranges.max)); + } + } + else if (hints & kParameterIsInteger) + { + const int imin = static_cast(ranges.min); + const int imax = static_cast(ranges.max); + + for (int i=imin; i<=imax; ++i) + dpfValueStrings.add(juce::String(i)); + } + + return dpfValueStrings; } +}; + +// -------------------------------------------------------------------------------------------------------------------- + +// unused in cardinal +static constexpr const requestParameterValueChangeFunc nullRequestParameterValueChangeFunc = nullptr; + +// only needed for headless builds, which this wrapper never builds for +static constexpr const updateStateValueFunc nullUpdateStateValueFunc = nullptr; + +// DSP/processor implementation +class CardinalWrapperProcessor : public juce::AudioProcessor +{ + friend class CardinalWrapperEditor; + + PluginExporter plugin; + MidiEvent midiEvents[kMaxMidiEvents]; + TimePosition timePosition; + const uint32_t parameterCount; + + juce::AudioProcessorParameter* bypassParameter; + juce::MidiBuffer* currentMidiMessages; + bool* updatedParameters; public: CardinalWrapperProcessor() - : plugin(this, writeMidi, requestParameterValueChange, updateStateValue) + : plugin(this, writeMidiFunc, nullRequestParameterValueChangeFunc, nullUpdateStateValueFunc), + parameterCount(plugin.getParameterCount()), + bypassParameter(nullptr), + currentMidiMessages(nullptr), + updatedParameters(nullptr) { if (const double sampleRate = getSampleRate()) plugin.setSampleRate(sampleRate); - if (const int blockSize = getBlockSize()) - plugin.setBufferSize(blockSize); + if (const int samplesPerBlock = getBlockSize()) + if (samplesPerBlock > 0) + plugin.setBufferSize(static_cast(samplesPerBlock)); + + getBypassParameter(); + + if (parameterCount != 0) + { + updatedParameters = new bool[parameterCount]; + std::memset(updatedParameters, 0, sizeof(bool)*parameterCount); + + for (uint i=0; i 0,); + plugin.deactivateIfNeeded(); plugin.setSampleRate(sampleRate); - plugin.setBufferSize(samplesPerBlock); + plugin.setBufferSize(static_cast(samplesPerBlock)); plugin.activate(); } @@ -137,8 +314,33 @@ public: void processBlock(juce::AudioBuffer& buffer, juce::MidiBuffer& midiMessages) override { + const int numSamples = buffer.getNumSamples(); + DISTRHO_SAFE_ASSERT_INT_RETURN(numSamples > 0, numSamples, midiMessages.clear()); + + uint32_t midiEventCount = 0; + + for (const juce::MidiMessageMetadata midiMessage : midiMessages) + { + DISTRHO_SAFE_ASSERT_CONTINUE(midiMessage.numBytes > 0); + DISTRHO_SAFE_ASSERT_CONTINUE(midiMessage.samplePosition >= 0); + + if (midiMessage.numBytes > static_cast(MidiEvent::kDataSize)) + continue; + + MidiEvent& midiEvent(midiEvents[midiEventCount++]); + + midiEvent.frame = static_cast(midiMessage.samplePosition); + midiEvent.size = (static_cast(midiMessage.numBytes)); + std::memcpy(midiEvent.data, midiMessage.data, midiEvent.size); + + if (midiEventCount == kMaxMidiEvents) + break; + } + midiMessages.clear(); + const juce::ScopedValueSetter cvs(currentMidiMessages, &midiMessages, nullptr); + juce::AudioPlayHead* const playhead = getPlayHead(); juce::AudioPlayHead::CurrentPositionInfo posInfo; @@ -151,7 +353,7 @@ public: timePosition.bbt.ticksPerBeat = 1920.0; if (posInfo.timeInSamples >= 0) - timePosition.frame = posInfo.timeInSamples; + timePosition.frame = static_cast(posInfo.timeInSamples); else timePosition.frame = 0; @@ -188,9 +390,6 @@ public: plugin.setTimePosition(timePosition); - const int numSamples = buffer.getNumSamples(); - DISTRHO_SAFE_ASSERT_INT_RETURN(numSamples > 0, numSamples,); - DISTRHO_SAFE_ASSERT_RETURN(buffer.getNumChannels() == 2,); const float* audioBufferIn[2]; @@ -200,9 +399,12 @@ public: audioBufferOut[0] = buffer.getWritePointer(0); audioBufferOut[1] = buffer.getWritePointer(1); - plugin.run(audioBufferIn, audioBufferOut, numSamples, nullptr, 0); + plugin.run(audioBufferIn, audioBufferOut, static_cast(numSamples), midiEvents, midiEventCount); } + // fix compiler warning + void processBlock(juce::AudioBuffer&, juce::MidiBuffer&) override {} + double getTailLengthSeconds() const override { return 0.0; @@ -218,6 +420,11 @@ public: return true; } + juce::AudioProcessorParameter* getBypassParameter() const override + { + return nullptr; + } + juce::AudioProcessorEditor* createEditor() override; bool hasEditor() const override @@ -227,7 +434,7 @@ public: int getNumPrograms() override { - return 0; + return 1; } int getCurrentProgram() override @@ -241,7 +448,7 @@ public: const juce::String getProgramName(int) override { - return {}; + return "Default"; } void changeProgramName(int, const juce::String&) override @@ -250,50 +457,80 @@ public: void getStateInformation(juce::MemoryBlock& destData) override { + juce::XmlElement xmlState("CardinalState"); + + for (uint32_t i=0; i xmlState(getXmlFromBinary(data, sizeInBytes)); + DISTRHO_SAFE_ASSERT_RETURN(xmlState.get() != nullptr,); -// ----------------------------------------------------------------------------------------------------------- + const juce::Array& parameters(getParameters()); -class CardinalWrapperEditor : public juce::AudioProcessorEditor, - private juce::Timer -{ - UIExporter* ui; - void* const dspPtr; + for (uint32_t i=0; igetDoubleAttribute(plugin.getParameterSymbol(i).buffer(), + plugin.getParameterDefault(i)); + const float normalizedValue = plugin.getParameterRanges(i).getFixedAndNormalizedValue(value); + parameters.getUnchecked(static_cast(i))->setValueNotifyingHost(normalizedValue); + } - static void editParamFunc(void* ptr, uint32_t rindex, bool started) {} - static void setParamFunc(void* ptr, uint32_t rindex, float value) {} - static void setStateFunc(void* ptr, const char* key, const char* value) {} - static void sendNoteFunc(void* ptr, uint8_t channel, uint8_t note, uint8_t velo) {} + for (uint32_t i=0, stateCount=plugin.getStateCount(); igetStringAttribute(key.buffer(), + plugin.getStateDefaultValue(i).buffer()); + plugin.setState(key, value.toRawUTF8()); + } + } - static void setSizeFunc(void* ptr, uint width, uint height) +private: + static bool writeMidiFunc(void* const ptr, const MidiEvent& midiEvent) { - CardinalWrapperEditor* const editor = static_cast(ptr); - DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); + CardinalWrapperProcessor* const processor = static_cast(ptr); + DISTRHO_SAFE_ASSERT_RETURN(processor != nullptr, false); - #ifdef DISTRHO_OS_MAC - UIExporter* const ui = editor->ui; - DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); + const uint8_t* const data = midiEvent.size > MidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data; + return processor->currentMidiMessages->addEvent(data, + static_cast(midiEvent.size), + static_cast(midiEvent.frame)); + } +}; - const double scaleFactor = ui->getScaleFactor(); - width /= scaleFactor; - height /= scaleFactor; - #endif +// -------------------------------------------------------------------------------------------------------------------- - editor->setSize(width, height); - } +// unused in cardinal +static constexpr const sendNoteFunc nullSendNoteFunc = nullptr; + +// unwanted, juce file dialogs are ugly +static constexpr const fileRequestFunc nullFileRequestFunc = nullptr; + +// UI/editor implementation +class CardinalWrapperEditor : public juce::AudioProcessorEditor, + private juce::Timer +{ + CardinalWrapperProcessor& cardinalProcessor; - static bool fileRequestFunc(void* ptr, const char* key) { return false; } + UIExporter* ui; + void* const dspPtr; public: - CardinalWrapperEditor(CardinalWrapperProcessor& cardinalProcessor) - : juce::AudioProcessorEditor(cardinalProcessor), + CardinalWrapperEditor(CardinalWrapperProcessor& cardinalProc) + : juce::AudioProcessorEditor(cardinalProc), + cardinalProcessor(cardinalProc), ui(nullptr), - dspPtr(cardinalProcessor.plugin.getInstancePointer()) + dspPtr(cardinalProc.plugin.getInstancePointer()) { setOpaque(true); setResizable(true, false); @@ -309,8 +546,21 @@ public: delete ui; } +protected: void timerCallback() override { + if (ui == nullptr) + return; + + for (uint32_t i=0; iparameterChanged(i, cardinalProcessor.plugin.getParameterValue(i)); + } + } + repaint(); } @@ -318,30 +568,27 @@ public: { if (ui == nullptr) { - auto peer = getPeer(); - d_stdout("peer is %p", peer); + juce::ComponentPeer* const peer = getPeer(); + DISTRHO_SAFE_ASSERT_RETURN(peer != nullptr,); - auto handle = peer->getNativeHandle(); - d_stdout("handle is %p", handle); - - auto proc = getAudioProcessor(); - d_stdout("proc is %p", proc); + void* const nativeHandle = peer->getNativeHandle(); + DISTRHO_SAFE_ASSERT_RETURN(nativeHandle != nullptr,); ui = new UIExporter(this, - (uintptr_t)handle, - proc->getSampleRate(), + (uintptr_t)nativeHandle, + cardinalProcessor.getSampleRate(), editParamFunc, setParamFunc, setStateFunc, - sendNoteFunc, + nullSendNoteFunc, setSizeFunc, - fileRequestFunc, + nullFileRequestFunc, nullptr, // bundlePath dspPtr, 0.0 // scaleFactor ); - if (getAudioProcessor()->wrapperType == juce::AudioProcessor::wrapperType_Standalone) + if (cardinalProcessor.wrapperType == juce::AudioProcessor::wrapperType_Standalone) { const double scaleFactor = ui->getScaleFactor(); ui->setWindowOffset(4 * scaleFactor, 30 * scaleFactor); @@ -350,6 +597,57 @@ public: ui->plugin_idle(); } + +private: + static void editParamFunc(void* const ptr, const uint32_t index, const bool started) + { + CardinalWrapperEditor* const editor = static_cast(ptr); + DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); + + CardinalWrapperProcessor& cardinalProcessor(editor->cardinalProcessor); + + if (started) + cardinalProcessor.getParameters().getUnchecked(static_cast(index))->beginChangeGesture(); + else + cardinalProcessor.getParameters().getUnchecked(static_cast(index))->endChangeGesture(); + } + + static void setParamFunc(void* const ptr, const uint32_t index, const float value) + { + CardinalWrapperEditor* const editor = static_cast(ptr); + DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); + + CardinalWrapperProcessor& cardinalProcessor(editor->cardinalProcessor); + const juce::Array& parameters(cardinalProcessor.getParameters()); + juce::AudioProcessorParameter* const parameter = parameters.getUnchecked(static_cast(index)); + static_cast(parameter)->setValueNotifyingHostFromDPF(value); + } + + static void setStateFunc(void* const ptr, const char* const key, const char* const value) + { + CardinalWrapperEditor* const editor = static_cast(ptr); + DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); + + CardinalWrapperProcessor& cardinalProcessor(editor->cardinalProcessor); + cardinalProcessor.plugin.setState(key, value); + } + + static void setSizeFunc(void* const ptr, uint width, uint height) + { + CardinalWrapperEditor* const editor = static_cast(ptr); + DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); + + #ifdef DISTRHO_OS_MAC + UIExporter* const ui = editor->ui; + DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); + + const double scaleFactor = ui->getScaleFactor(); + width /= scaleFactor; + height /= scaleFactor; + #endif + + editor->setSize(static_cast(width), static_cast(height)); + } }; juce::AudioProcessorEditor* CardinalWrapperProcessor::createEditor() @@ -357,11 +655,11 @@ juce::AudioProcessorEditor* CardinalWrapperProcessor::createEditor() return new CardinalWrapperEditor(*this); } -// ----------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- END_NAMESPACE_DISTRHO -// ----------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- juce::AudioProcessor* createPluginFilter() { @@ -371,4 +669,4 @@ juce::AudioProcessor* createPluginFilter() return new DISTRHO_NAMESPACE::CardinalWrapperProcessor; } -// ----------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 748d02d..62e2bee 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -257,10 +257,8 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' ifeq ($(CARDINAL_VARIANT),main) all: jack lv2 vst3 -else ifeq ($(CARDINAL_VARIANT),fx) -all: lv2 vst2 vst3 static else -all: lv2 vst2 vst3 +all: lv2 vst2 vst3 static endif CORE_RESOURCES = $(subst ../Rack/res/,,$(wildcard ../Rack/res/ComponentLibrary/*.svg ../Rack/res/fonts/*.ttf)) From 582fdb49f278d8063ab6991d9a45d495d71986a2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 12 Mar 2022 02:31:12 +0000 Subject: [PATCH 040/132] Fix jucewrapper macOS build, cmake oddities.. --- jucewrapper/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index c0c2849..4003732 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -133,7 +133,7 @@ target_include_directories(CardinalFX target_compile_definitions(CardinalFX PUBLIC - JucePlugin_PreferredChannelConfigurations={2,2} + JucePlugin_PreferredChannelConfigurations=2,2 JUCE_CHECK_MEMORY_LEAKS=0 JUCE_DISABLE_NATIVE_FILECHOOSERS=0 JUCE_DISPLAY_SPLASH_SCREEN=0 @@ -220,7 +220,7 @@ target_include_directories(CardinalSynth target_compile_definitions(CardinalSynth PUBLIC - JucePlugin_PreferredChannelConfigurations={0,2} + JucePlugin_PreferredChannelConfigurations=0,2 JUCE_CHECK_MEMORY_LEAKS=0 JUCE_DISABLE_NATIVE_FILECHOOSERS=0 JUCE_DISPLAY_SPLASH_SCREEN=0 From dbefe13bfb83d40f87bbc8342dcb81d7e450eab2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 12 Mar 2022 03:13:30 +0000 Subject: [PATCH 041/132] Fix AU categories --- jucewrapper/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 4003732..7f1e727 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -107,7 +107,7 @@ endif (APPLE) # FX variant juce_add_plugin(CardinalFX - AU_MAIN_TYPE kAudioUnitType_Effect + AU_MAIN_TYPE kAudioUnitType_MusicEffect COMPANY_COPYRIGHT "GPL-3.0-or-later" COMPANY_NAME "DISTRHO" COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" @@ -194,7 +194,7 @@ target_link_libraries(CardinalFX # Synth variant juce_add_plugin(CardinalSynth - AU_MAIN_TYPE kAudioUnitType_Generator + AU_MAIN_TYPE kAudioUnitType_MusicDevice COMPANY_COPYRIGHT "GPL-3.0-or-later" COMPANY_NAME "DISTRHO" COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" From a1017be6eaae24c221e1e2a987a397b1ccc66552 Mon Sep 17 00:00:00 2001 From: Filipe Coelho Date: Sat, 12 Mar 2022 22:12:22 +0000 Subject: [PATCH 042/132] Packaging fixes (#192) * Start cleanup for improved packaging Signed-off-by: falkTX * Use the same folder for VST2 plugins Signed-off-by: falkTX * Fix static build Signed-off-by: falkTX * Do not set source-dir in CI builds Signed-off-by: falkTX * Set a custom fallback systemdir per OS Signed-off-by: falkTX * CI tweaks Signed-off-by: falkTX * Build the whole pyqt on windows Signed-off-by: falkTX * Mention AU in readme and differences docs Signed-off-by: falkTX * Add specialized utils for macOS packaging Signed-off-by: falkTX * Fix plugin-validation build Signed-off-by: falkTX * Fix build Signed-off-by: falkTX * Do not create window for lv2lint tests * Start enabling AU builds * Copy over mod.lv2 specs for validation * Skip main cardinal lv2lint, the custom CVPorts are not supported * au build needs carla * More CI tweaks * Build headless version for plugin validation * Fix typo * Only show missing resources error message once Signed-off-by: falkTX * Fallback to system path even if using a plugin bundle Signed-off-by: falkTX * CI fixes, build full carla on Windows Signed-off-by: falkTX * Rename script Signed-off-by: falkTX * Silly typo Signed-off-by: falkTX * More CI tweaks, add windows installer Signed-off-by: falkTX * Setup Carla paths for Windows Signed-off-by: falkTX * Yet more tweaks Signed-off-by: falkTX * Package carla on windows, use xvfb-run Signed-off-by: falkTX * Test win32 build too Signed-off-by: falkTX * Finalize rework Signed-off-by: falkTX --- .github/workflows/build.yml | 129 ++++++++++++++++++------------ .gitignore | 2 + Makefile | 3 + README.md | 5 +- deps/PawPaw | 2 +- docs/DIFFERENCES.md | 2 +- dpf | 2 +- plugins/Cardinal/src/Carla.cpp | 15 +++- plugins/Cardinal/src/Ildaeil.cpp | 10 ++- plugins/Makefile | 18 +---- src/CardinalPlugin.cpp | 18 ++++- src/CardinalUI.cpp | 10 ++- src/Makefile | 13 ++- src/Makefile.cardinal.mk | 12 ++- src/override/Scene.cpp | 4 + src/override/common.cpp | 2 +- utils/create-macos-installer.sh | 67 ++++++++++++++++ utils/create-windows-installer.sh | 53 ++++++++++++ utils/inno/win32.iss | 54 +++++++++++++ utils/inno/win64.iss | 54 +++++++++++++ utils/plugin.pkg/package.xml.in | 31 +++++++ utils/plugin.pkg/welcome.txt.in | 14 ++++ 22 files changed, 430 insertions(+), 90 deletions(-) create mode 100755 utils/create-macos-installer.sh create mode 100755 utils/create-windows-installer.sh create mode 100644 utils/inno/win32.iss create mode 100644 utils/inno/win64.iss create mode 100644 utils/plugin.pkg/package.xml.in create mode 100644 utils/plugin.pkg/welcome.txt.in diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97df633..9d7257b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 7 + CACHE_VERSION: 8 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -45,7 +45,7 @@ jobs: run: | pushd deps/PawPaw; source local.env linux-aarch64; popd make features - make NOOPT=true WITH_LTO=true -j $(nproc) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -111,7 +111,7 @@ jobs: run: | pushd deps/PawPaw; source local.env linux-armhf; popd make features - make NOOPT=true WITH_LTO=true -j $(nproc) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -173,7 +173,7 @@ jobs: run: | pushd deps/PawPaw; source local.env linux-i686; popd make features - make NOOPT=true WITH_LTO=true -j $(nproc) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -227,7 +227,7 @@ jobs: run: | pushd deps/PawPaw; source local.env linux; popd make features - make NOOPT=true WITH_LTO=true -j $(nproc) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -340,18 +340,18 @@ jobs: run: | pushd deps/PawPaw; source local.env macos-universal; popd make features - make NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu) - name: Build macOS universal (AU using juce) run: | pushd deps/PawPaw; source local.env macos-universal; popd git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE mkdir jucewrapper/build - pushd jucewrapper/build; cmake .. && make -j $(sysctl -n hw.logicalcpu); popd - mv jucewrapper/build/*_artefacts/AU/*.component bin/ + pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd + mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - name: Build macOS universal (packaging) run: | pushd deps/PawPaw; source local.env macos-universal; popd - ./dpf/utils/package-osx-bundles.sh + ./utils/create-macos-installer.sh - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -519,15 +519,27 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 + sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 xvfb - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win32 - - name: Build win32 cross-compiled + - name: Build win32 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win32; popd make features - make NOOPT=true WITH_LTO=true -j $(nproc) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) + - name: Build win64 cross-compiled (carla) + run: | + pushd deps/PawPaw; source local.env win32; popd + make distclean -C carla + make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false -j $(nproc) + make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + - name: Build win64 cross-compiled (packaging) + run: | + pushd deps/PawPaw; source local.env win32; popd + xvfb-run ./utils/create-windows-installer.sh 32 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -546,6 +558,7 @@ jobs: with: name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | + *.exe *.zip - uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -555,6 +568,7 @@ jobs: draft: false prerelease: false files: | + *.exe *.zip win64: @@ -576,16 +590,29 @@ jobs: sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal - name: Set up dependencies run: | + sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable + sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable xvfb - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win64 - - name: Build win64 cross-compiled + - name: Build win64 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win64; popd make features - make NOOPT=true WITH_LTO=true -j $(nproc) + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) + - name: Build win64 cross-compiled (carla) + run: | + pushd deps/PawPaw; source local.env win64; popd + make distclean -C carla + make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false all win32r -j $(nproc) + make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + - name: Build win64 cross-compiled (packaging) + run: | + pushd deps/PawPaw; source local.env win64; popd + xvfb-run ./utils/create-windows-installer.sh 64 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -604,6 +631,7 @@ jobs: with: name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | + *.exe *.zip - uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -613,6 +641,7 @@ jobs: draft: false prerelease: false files: | + *.exe *.zip source-tarball: @@ -672,17 +701,17 @@ jobs: sudo dpkg -i kxstudio-repos_10.0.3_all.deb sudo apt-get update -qq # build-deps - sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq liblo-dev # runtime testing sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind - - name: Build plugins + - name: Build Cardinal env: CFLAGS: -g CXXFLAGS: -g -DDPF_ABORT_ON_ERROR LDFLAGS: -static-libgcc -static-libstdc++ run: | - make features - make NOOPT=true SKIP_STRIPPING=true -j $(nproc) + make HEADLESS=true features + make HEADLESS=true NOOPT=true NOPLUGINS=true STATIC_BUILD=true SKIP_STRIPPING=true -j $(nproc) - name: Validate LV2 ttl syntax run: | lv2_validate \ @@ -691,14 +720,14 @@ jobs: /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \ /usr/lib/lv2/kx-programs.lv2/*.ttl \ ./bin/*.lv2/*.ttl - #- name: Validate LV2 metadata and binaries - #run: | - #export LV2_PATH=/tmp/lv2-path - #mkdir ${LV2_PATH} - #cp -r bin/*.lv2 \ - #/usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ - #${LV2_PATH} - #lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) + - name: Validate LV2 metadata and binaries + run: | + export LV2_PATH=/tmp/lv2-path + mkdir ${LV2_PATH} + cp -r bin/CardinalFX.lv2 bin/CardinalSynth.lv2 \ + /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ + ${LV2_PATH} + lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) - name: Test LV2 plugin run: | export LV2_PATH=/tmp/lv2-path @@ -711,27 +740,25 @@ jobs: --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \ done - # - name: Test VST2 plugin - # env: - # CARLA_DO_NOT_USE_JUCE_FOR_VST2: 1 - # run: | - # for p in $(ls bin/*.vst/*.so); do \ - # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ - # valgrind \ - # --error-exitcode=255 \ - # --leak-check=no \ - # --track-origins=yes \ - # --suppressions=./dpf/utils/valgrind-dpf.supp \ - # /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \ - # done - # - name: Test VST3 plugin - # run: | - # for p in $(ls bin/ | grep vst3); do \ - # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ - # valgrind \ - # --error-exitcode=255 \ - # --leak-check=no \ - # --track-origins=yes \ - # --suppressions=./dpf/utils/valgrind-dpf.supp \ - # /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \ - # done + - name: Test VST2 plugin + run: | + for p in $(ls bin/*.vst/*.so); do \ + env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ + valgrind \ + --error-exitcode=255 \ + --leak-check=no \ + --track-origins=yes \ + --suppressions=./dpf/utils/valgrind-dpf.supp \ + /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \ + done + - name: Test VST3 plugin + run: | + for p in $(ls bin/ | grep vst3); do \ + env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ + valgrind \ + --error-exitcode=255 \ + --leak-check=no \ + --track-origins=yes \ + --suppressions=./dpf/utils/valgrind-dpf.supp \ + /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \ + done diff --git a/.gitignore b/.gitignore index 135e906..9e15837 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ bin/ build/ documentation.pdf +utils/inno/resources.iss +utils/inno/version.iss diff --git a/Makefile b/Makefile index 125123d..adb5822 100644 --- a/Makefile +++ b/Makefile @@ -404,6 +404,9 @@ tarball+deps: download rm -f ../cardinal+deps-$(VERSION).tar.xz tar -c --lzma $(TAR_ARGS) -f ../cardinal+deps-$(VERSION).tar.xz . +version: + @echo $(VERSION) + # -------------------------------------------------------------- .PHONY: carla deps plugins diff --git a/README.md b/README.md index be8c9d0..c30bfc7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ *Cardinal, the Rack!* Cardinal is a free and open-source virtual modular synthesizer plugin, -available as JACK standalone and LV2, VST2 and VST3 audio plugin for FreeBSD, Linux, macOS and Windows. +available as JACK standalone and AU, LV2, VST2 and VST3 audio plugin for FreeBSD, Linux, macOS and Windows. It is based on the popular [VCV Rack](https://vcvrack.com/) but with a focus on being a fully self-contained plugin version. More specifically, this is a [DPF-based](https://github.com/DISTRHO/DPF/) @@ -19,7 +19,6 @@ All "Core" modules from Rack have been replaced by Cardinal equivalents, simplif Cardinal does not load external modules and does not connect to the official Rack library/store. All VCV branding has been removed (to the best of our knowledge) in order to avoid any trademark issues. -Because it is using DPF, Cardinal already supports LV2 and VST2 with an extra JACK standalone mode for some systems. The VST3 version is in progress, already part of the build but still experimental. @@ -36,7 +35,7 @@ All variants have MIDI input and output support. This variant provides 8 audio inputs and outputs and 10 CV inputs and outputs. -NOTE: Due to VST2 format not supporting CV ports, this variant is not available for VST2. +NOTE: Due to AU and VST2 formats not supporting CV ports, this variant is not available for those formats. ### Synth diff --git a/deps/PawPaw b/deps/PawPaw index cc20186..4834b2e 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit cc201866d35449bce0d9e02a85f641aa071437b8 +Subproject commit 4834b2e078af3d47dde45cab88bbdfe33ec90738 diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index 60e4047..7f402a9 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -21,6 +21,7 @@ Bellow follows a list of features comparing the official plugin to Cardinal. | Loads external modules | Yes | No | | | Supports closed-source modules | Yes | No | | | Supports physical devices | Yes | No | Audio + MIDI only through the DAW/Host or via JACK in standalone | +| Plugin in AU format | No | Yes | | | Plugin in LV2 format | No | Yes | | | Plugin in VST2 format | Yes | Yes | | | Plugin in VST3 format | No | WIP | | @@ -42,7 +43,6 @@ Bellow follows a list of features comparing the official plugin to Cardinal. Additionally, Cardinal contains the following built-in modules not present in the official plugin or standalone: - * Amalgamated Harmonics * Aria Salvatrice modules (except Arcane related modules, due to their online requirement) * Mog (never updated to v2) * mscHack (never updated to v2) diff --git a/dpf b/dpf index 215fc23..7cd27b1 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 215fc2317efe822abf5eb545f422eedbb473693d +Subproject commit 7cd27b17fbbd196beff8c1fcc209f10e9c24f274 diff --git a/plugins/Cardinal/src/Carla.cpp b/plugins/Cardinal/src/Carla.cpp index cdd3256..f5d726f 100644 --- a/plugins/Cardinal/src/Carla.cpp +++ b/plugins/Cardinal/src/Carla.cpp @@ -99,6 +99,11 @@ struct CarlaModule : Module { CardinalExpanderFromCarlaMIDIToCV* midiOutExpander = nullptr; std::string patchStorage; +#ifdef CARLA_OS_WIN + // must keep string pointer valid + std::string winResourceDir; +#endif + CarlaModule() : pcontext(static_cast(APP)) { @@ -138,10 +143,14 @@ struct CarlaModule : Module { binaryDir = "/Applications/Carla.app/Contents/MacOS"; resourceDir = "/Applications/Carla.app/Contents/MacOS/resources"; } -#elif defined(CARLA_OS_WINDOWS) - // Carla does not support system-wide install on Windows right now - if (false) +#elif defined(CARLA_OS_WIN) + const std::string winBinaryDir = system::join(asset::systemDir, "Carla"); + + if (system::exists(winBinaryDir)) { + winResourceDir = system::join(winBinaryDir, "resources"); + binaryDir = winBinaryDir.c_str(); + resourceDir = winResourceDir.c_str(); } #else if (system::exists("/usr/local/lib/carla")) diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index b7d1039..3417242 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -209,10 +209,14 @@ struct IldaeilModule : Module { carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/Applications/Carla.app/Contents/MacOS"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/Applications/Carla.app/Contents/MacOS/resources"); } -#elif defined(CARLA_OS_WINDOWS) - // Carla does not support system-wide install on Windows right now - if (false) +#elif defined(CARLA_OS_WIN) + const std::string winBinaryDir = system::join(asset::systemDir, "Carla"); + + if (system::exists(winBinaryDir)) { + const std::string winResourceDir = system::join(winBinaryDir, "resources"); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, winBinaryDir.c_str()); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, winResourceDir.c_str()); } #else if (system::exists("/usr/local/lib/carla")) diff --git a/plugins/Makefile b/plugins/Makefile index d98f492..6a6d346 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1051,10 +1051,8 @@ VST2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.vst/Contents/Resources/Pl VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.vst/Contents/Resources/%) VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.vst/Contents/Resources/%) else -VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalFX.vst/resources/PluginManifests/%.json) -VST2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.vst/resources/PluginManifests/%.json) -VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.vst/resources/%) -VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.vst/resources/%) +VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.vst/resources/PluginManifests/%.json) +VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.vst/resources/%) endif VST3_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.vst3/Contents/Resources/PluginManifests/%.json) @@ -1138,19 +1136,11 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ else -../bin/CardinalFX.vst/resources/%: % +../bin/Cardinal.vst/resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/CardinalSynth.vst/resources/%: % - -@mkdir -p "$(shell dirname $@)" - $(SILENT)ln -sf $(abspath $<) $@ - -../bin/CardinalFX.vst/resources/PluginManifests/%.json: %/plugin.json - -@mkdir -p "$(shell dirname $@)" - $(SILENT)ln -sf $(abspath $<) $@ - -../bin/CardinalSynth.vst/resources/PluginManifests/%.json: %/plugin.json +../bin/Cardinal.vst/resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ endif diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index d02ed86..b7fab0f 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -138,7 +138,7 @@ struct Initializer } } - if (asset::systemDir.empty()) + if (asset::systemDir.empty() || ! system::exists(asset::systemDir)) { #ifdef CARDINAL_PLUGIN_SOURCE_DIR // Make system dir point to source code location as fallback @@ -151,11 +151,21 @@ struct Initializer // If source code dir does not exist use install target prefix as system dir else #endif - if (system::exists(CARDINAL_PLUGIN_PREFIX "/share/cardinal")) { - asset::bundlePath = CARDINAL_PLUGIN_PREFIX "/share/cardinal/PluginManifests"; + #if defined(ARCH_MAC) + asset::systemDir = "/Library/Application Support/Cardinal"; + #elif defined(ARCH_WIN) + if (const char* const commonprogfiles = std::getenv("COMMONPROGRAMFILES")) + asset::systemDir = system::join(commonprogfiles, "Cardinal"); + #else asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; - templatePath = system::join(asset::systemDir, "template.vcv"); + #endif + + if (! asset::systemDir.empty()) + { + asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); + templatePath = system::join(asset::systemDir, "template.vcv"); + } } } diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 2858ab2..37f4d6a 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -325,7 +325,15 @@ public: } if (! errorMessage.empty()) - asyncDialog::create(errorMessage.c_str()); + { + static bool shown = false; + + if (! shown) + { + shown = true; + asyncDialog::create(errorMessage.c_str()); + } + } context->window->step(); diff --git a/src/Makefile b/src/Makefile index f5c196e..48b7d05 100644 --- a/src/Makefile +++ b/src/Makefile @@ -171,21 +171,26 @@ endif TARGET = rack.a +ifneq ($(MACOS),true) +CARDINAL_FX_ARGS = VST2_FILENAME=Cardinal.vst/CardinalFX$(LIB_EXT) +CARDINAL_SYNTH_ARGS = VST2_FILENAME=Cardinal.vst/CardinalSynth$(LIB_EXT) +endif + all: $(TARGET) ifeq ($(MOD_BUILD),true) $(MAKE) -C CardinalFX lv2 else $(MAKE) -C Cardinal - $(MAKE) -C CardinalFX - $(MAKE) -C CardinalSynth + $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) endif clean: rm -f $(TARGET) rm -rf $(BUILD_DIR) $(MAKE) clean -C Cardinal - $(MAKE) clean -C CardinalFX - $(MAKE) clean -C CardinalSynth + $(MAKE) clean -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) clean -C CardinalSynth $(CARDINAL_SYNTH_ARGS) # -------------------------------------------------------------- # Build commands diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 62e2bee..8c704ca 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -235,6 +235,7 @@ endif # -------------------------------------------------------------- # fallback path to resource files +ifneq ($(CIBUILD),true) ifneq ($(SYSDEPS),true) ifeq ($(EXE_WRAPPER),wine) @@ -245,6 +246,7 @@ endif BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_SOURCE_DIR='"$(SOURCE_DIR)"' +endif endif # -------------------------------------------------------------- @@ -256,8 +258,12 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' # Enable all possible plugin types and setup resources ifeq ($(CARDINAL_VARIANT),main) +ifneq ($(STATIC_BUILD),true) all: jack lv2 vst3 else +all: lv2 vst3 +endif # STATIC_BUILD +else all: lv2 vst2 vst3 static endif @@ -284,7 +290,7 @@ ifneq ($(CARDINAL_VARIANT),main) ifeq ($(MACOS),true) VST2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst/Contents/Resources/%) else -VST2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst/resources/%) +VST2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.vst/resources/%) endif endif @@ -294,7 +300,7 @@ vst3: $(VST3_RESOURCES) # -------------------------------------------------------------- -$(TARGET_DIR)/$(NAME).%/template.vcv: ../template.vcv +$(TARGET_DIR)/%/template.vcv: ../template.vcv -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -315,7 +321,7 @@ $(TARGET_DIR)/$(NAME).lv2/modgui/documentation.pdf: ../../docs/MODDEVICES.md $(T (cd ../../docs/ && pandoc MODDEVICES.md -f markdown+implicit_figures -o $(abspath $@)) endif -$(TARGET_DIR)/$(NAME).vst/resources/%: ../Rack/res/% +$(TARGET_DIR)/Cardinal.vst/resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index ea6b108..82f09e3 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -46,6 +46,10 @@ # undef DEBUG #endif +#ifdef STATIC_BUILD +# undef HAVE_LIBLO +#endif + #ifdef HAVE_LIBLO # include #endif diff --git a/src/override/common.cpp b/src/override/common.cpp index f469d3e..c1c9e70 100644 --- a/src/override/common.cpp +++ b/src/override/common.cpp @@ -53,7 +53,7 @@ const std::string APP_VERSION_MAJOR = "2"; const std::string APP_VERSION = "2.1"; #if defined ARCH_WIN const std::string APP_OS = "win"; -#elif ARCH_MAC +#elif defined ARCH_MAC const std::string APP_OS = "mac"; #elif defined ARCH_LIN const std::string APP_OS = "lin"; diff --git a/utils/create-macos-installer.sh b/utils/create-macos-installer.sh new file mode 100755 index 0000000..642c40f --- /dev/null +++ b/utils/create-macos-installer.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +set -e + +if [ -d bin ]; then + cd bin +else + echo "Please run this script from the root folder" + exit +fi + +rm -rf res +rm -rf au +rm -rf lv2 +rm -rf vst2 +rm -rf vst3 + +mkdir au lv2 vst2 vst3 +mv *.component au/ +mv *.lv2 lv2/ +mv *.vst vst2/ +mv *.vst3 vst3/ +cp -RL lv2/Cardinal.lv2/resources res +rm -rf lv2/*.lv2/resources +rm -rf vst2/*.vst/Contents/Resources +rm -rf vst3/*.vst3/Contents/Resources + +pkgbuild \ + --identifier "studio.kx.distrho.cardinal.resources" \ + --install-location "/Library/Application Support/Cardinal/" \ + --root "${PWD}/res/" \ + ../dpf-cardinal-resources.pkg + +pkgbuild \ + --identifier "studio.kx.distrho.plugins.cardinal.components" \ + --install-location "/Library/Audio/Plug-Ins/Components/" \ + --root "${PWD}/au/" \ + ../dpf-cardinal-components.pkg + +pkgbuild \ + --identifier "studio.kx.distrho.plugins.cardinal.lv2bundles" \ + --install-location "/Library/Audio/Plug-Ins/LV2/" \ + --root "${PWD}/lv2/" \ + ../dpf-cardinal-lv2bundles.pkg + +pkgbuild \ + --identifier "studio.kx.distrho.plugins.cardinal.vst2bundles" \ + --install-location "/Library/Audio/Plug-Ins/VST/" \ + --root "${PWD}/vst2/" \ + ../dpf-cardinal-vst2bundles.pkg + +pkgbuild \ + --identifier "studio.kx.distrho.plugins.cardinal.vst3bundles" \ + --install-location "/Library/Audio/Plug-Ins/VST3/" \ + --root "${PWD}/vst3/" \ + ../dpf-cardinal-vst3bundles.pkg + +cd .. + +sed -e "s|@builddir@|${PWD}/build|" utils/plugin.pkg/package.xml.in > build/package.xml + +productbuild \ + --distribution build/package.xml \ + --identifier "studio.kx.distrho.cardinal" \ + --package-path "${PWD}" \ + --version 0 \ + Cardinal-macOS.pkg diff --git a/utils/create-windows-installer.sh b/utils/create-windows-installer.sh new file mode 100755 index 0000000..a8b9c58 --- /dev/null +++ b/utils/create-windows-installer.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +set -e + +if [ ! -d bin ]; then + echo "Please run this script from the root folder" + exit +fi + +# args +bit=${1} +bit=${bit:=64} + +# setup innosetup +dlfile="${PWD}/bin/innosetup-6.0.5.exe" +innodir="${PWD}/build/innosetup-6.0.5" +iscc="${innodir}/drive_c/InnoSetup/ISCC.exe" + +# download it +if [ ! -f "${dlfile}" ]; then + # FIXME proper dl version + curl -L https://jrsoftware.org/download.php/is.exe?site=2 -o "${dlfile}" +fi + +# initialize wine +if [ ! -d "${innodir}"/drive_c ]; then + env WINEPREFIX="${innodir}" wineboot -u +fi + +# install innosetup in custom wineprefix +if [ ! -f "${innodir}"/drive_c/InnoSetup/ISCC.exe ]; then + env WINEPREFIX="${innodir}" wine "${dlfile}" /allusers /dir=C:\\InnoSetup /nocancel /norestart /verysilent +fi + +# generate resources +echo -n "" > utils/inno/resources.iss +IFS=' +' +for f in $(find -L bin/Cardinal.lv2/resources/ -type f); do + d=$(dirname $(echo ${f} | sed "s|bin/Cardinal.lv2/resources/||")) + echo "Source: \"..\\..\\$(echo ${f} | tr '/' '\\')\"; DestDir: \"{commoncf${bit}}\\Cardinal\\$(echo ${d} | tr '/' '\\')\"; Components: resources; Flags: ignoreversion;" >> utils/inno/resources.iss +done + +# generate version +echo "#define VERSION \"$(make version)\"" > utils/inno/version.iss + +# create the installer file +pushd "utils/inno" +env WINEPREFIX="${innodir}" wine "${iscc}" "win${bit}.iss" +popd + +# move installer file where CI expects it to be +mv utils/inno/*.exe . diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss new file mode 100644 index 0000000..7255fd9 --- /dev/null +++ b/utils/inno/win32.iss @@ -0,0 +1,54 @@ +#include "version.iss" + +[Setup] +ArchitecturesInstallIn64BitMode=x64 +AppName=Cardinal +AppPublisher=DISTRHO +AppPublisherURL=https://github.com/DISTRHO/Cardinal/ +AppSupportURL=https://github.com/DISTRHO/Cardinal/issues/ +AppUpdatesURL=https://github.com/DISTRHO/Cardinal/releases/ +AppVersion={#VERSION} +DefaultDirName={commonpf32}\Cardinal +DisableDirPage=yes +DisableWelcomePage=no +LicenseFile=..\..\LICENSE +OutputBaseFilename=Cardinal-win32-{#VERSION}-installer +OutputDir=. +UsePreviousAppDir=no + +[Types] +Name: "full"; Description: "Full installation"; +Name: "custom"; Description: "Custom installation"; Flags: iscustom; + +[Components] +Name: resources; Description: "Resources"; Types: full custom; Flags: fixed; +Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; +Name: lv2; Description: "LV2 plugin"; Types: full; +Name: vst2; Description: "VST2 plugin"; Types: full; +Name: vst3; Description: "VST3 plugin"; Types: full; + +[Files] +#include "resources.iss" +; carla +Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; +; lv2 +Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf32}\LV2\Cardinal.lv2"; Components: lv2; Flags: ignoreversion; +Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; +Source: "..\..\bin\CardinalSynth.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalSynth.lv2"; Components: lv2; Flags: ignoreversion; +; vst2 +Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf32}\VST2\Cardinal.vst"; Components: vst2; Flags: ignoreversion; +; vst3 +Source: "..\..\bin\Cardinal.vst3\Contents\x86-win\Cardinal.vst3"; DestDir: "{commoncf64}\VST3\Cardinal.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\CardinalFX.vst3\Contents\x86-win\CardinalFX.vst3"; DestDir: "{commoncf64}\VST3\CardinalFX.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\CardinalSynth.vst3\Contents\x86-win\CardinalSynth.vst3"; DestDir: "{commoncf64}\VST3\CardinalSynth.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss new file mode 100644 index 0000000..38f371d --- /dev/null +++ b/utils/inno/win64.iss @@ -0,0 +1,54 @@ +#include "version.iss" + +[Setup] +ArchitecturesInstallIn64BitMode=x64 +AppName=Cardinal +AppPublisher=DISTRHO +AppPublisherURL=https://github.com/DISTRHO/Cardinal/ +AppSupportURL=https://github.com/DISTRHO/Cardinal/issues/ +AppUpdatesURL=https://github.com/DISTRHO/Cardinal/releases/ +AppVersion={#VERSION} +DefaultDirName={commonpf64}\Cardinal +DisableDirPage=yes +DisableWelcomePage=no +LicenseFile=..\..\LICENSE +OutputBaseFilename=Cardinal-win64-{#VERSION}-installer +OutputDir=. +UsePreviousAppDir=no + +[Types] +Name: "full"; Description: "Full installation"; +Name: "custom"; Description: "Custom installation"; Flags: iscustom; + +[Components] +Name: resources; Description: "Resources"; Types: full custom; Flags: fixed; +Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; +Name: lv2; Description: "LV2 plugin"; Types: full; +Name: vst2; Description: "VST2 plugin"; Types: full; +Name: vst3; Description: "VST3 plugin"; Types: full; + +[Files] +#include "resources.iss" +; carla +Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; +; lv2 +Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf64}\LV2\Cardinal.lv2"; Components: lv2; Flags: ignoreversion; +Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf64}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; +Source: "..\..\bin\CardinalSynth.lv2\*.*"; DestDir: "{commoncf64}\LV2\CardinalSynth.lv2"; Components: lv2; Flags: ignoreversion; +; vst2 +Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf64}\VST2\Cardinal.vst"; Components: vst2; Flags: ignoreversion; +; vst3 +Source: "..\..\bin\Cardinal.vst3\Contents\x86_64-win\Cardinal.vst3"; DestDir: "{commoncf64}\VST3\Cardinal.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\CardinalFX.vst3\Contents\x86_64-win\CardinalFX.vst3"; DestDir: "{commoncf64}\VST3\CardinalFX.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\CardinalSynth.vst3\Contents\x86_64-win\CardinalSynth.vst3"; DestDir: "{commoncf64}\VST3\CardinalSynth.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; diff --git a/utils/plugin.pkg/package.xml.in b/utils/plugin.pkg/package.xml.in new file mode 100644 index 0000000..0304318 --- /dev/null +++ b/utils/plugin.pkg/package.xml.in @@ -0,0 +1,31 @@ + + + Cardinal + + + + + + + dpf-cardinal-resources.pkg + + + dpf-cardinal-components.pkg + + + dpf-cardinal-lv2bundles.pkg + + + dpf-cardinal-vst2bundles.pkg + + + dpf-cardinal-vst3bundles.pkg + + + + + + + + + diff --git a/utils/plugin.pkg/welcome.txt.in b/utils/plugin.pkg/welcome.txt.in new file mode 100644 index 0000000..3fa7d29 --- /dev/null +++ b/utils/plugin.pkg/welcome.txt.in @@ -0,0 +1,14 @@ +Cardinal is a free and open-source virtual modular synthesizer plugin. +It is based on the popular VCV Rack but with a focus on being a fully self-contained plugin version. + +Cardinal provides 3 plugin variants - "main", Synth and FX. +They are all equivalent in performance and behaviour, with only the IO and metadata that changes. + +FX and Synth variants both have 2 audio outputs, while "main" has 8. +All variants have MIDI input and output support. + +This package provides the AU, LV2, VST2 and VST3 audio plugins for macOS. + +Notes: + - Due to AU and VST2 not supporting CV ports, the main variant is not available for these formats. + - The VST3 version is in progress, already part of the build but still experimental. From 44684cbb959631d1e02b58973a6e81b959330f1a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 13 Mar 2022 16:25:43 +0000 Subject: [PATCH 043/132] Packaging tweaks, rebuild CI deps Signed-off-by: falkTX --- .github/workflows/build.yml | 6 +++--- deps/PawPaw | 2 +- utils/create-macos-installer.sh | 2 +- utils/{plugin.pkg => macOS}/package.xml.in | 2 +- utils/{plugin.pkg/welcome.txt.in => macOS/welcome.txt} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename utils/{plugin.pkg => macOS}/package.xml.in (95%) rename utils/{plugin.pkg/welcome.txt.in => macOS/welcome.txt} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d7257b..b2a3611 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 8 + CACHE_VERSION: 9 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -532,7 +532,7 @@ jobs: run: | pushd deps/PawPaw; source local.env win32; popd make distclean -C carla - make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false -j $(nproc) + make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_FLUIDSYNTH=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false -j $(nproc) make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist @@ -605,7 +605,7 @@ jobs: run: | pushd deps/PawPaw; source local.env win64; popd make distclean -C carla - make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false all win32r -j $(nproc) + make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_FLUIDSYNTH=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false all win32r -j $(nproc) make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist diff --git a/deps/PawPaw b/deps/PawPaw index 4834b2e..55bbe06 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 4834b2e078af3d47dde45cab88bbdfe33ec90738 +Subproject commit 55bbe0622b4a25dd30a849b9231bddcef8bcb53e diff --git a/utils/create-macos-installer.sh b/utils/create-macos-installer.sh index 642c40f..4ab84dd 100755 --- a/utils/create-macos-installer.sh +++ b/utils/create-macos-installer.sh @@ -57,7 +57,7 @@ pkgbuild \ cd .. -sed -e "s|@builddir@|${PWD}/build|" utils/plugin.pkg/package.xml.in > build/package.xml +sed -e "s|@builddir@|${PWD}/build|" utils/macOS/package.xml.in > build/package.xml productbuild \ --distribution build/package.xml \ diff --git a/utils/plugin.pkg/package.xml.in b/utils/macOS/package.xml.in similarity index 95% rename from utils/plugin.pkg/package.xml.in rename to utils/macOS/package.xml.in index 0304318..b2c8d9c 100644 --- a/utils/plugin.pkg/package.xml.in +++ b/utils/macOS/package.xml.in @@ -5,7 +5,7 @@ - + dpf-cardinal-resources.pkg diff --git a/utils/plugin.pkg/welcome.txt.in b/utils/macOS/welcome.txt similarity index 100% rename from utils/plugin.pkg/welcome.txt.in rename to utils/macOS/welcome.txt From 07e71d7c7ba320c9b772c356c2b3943f92b2ea3e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 13 Mar 2022 17:36:49 +0000 Subject: [PATCH 044/132] Tweak full Carla build to match our custom one Signed-off-by: falkTX --- .github/workflows/build.yml | 16 +++++++--------- carla | 2 +- deps/PawPaw | 2 +- plugins/Cardinal/src/Ildaeil.cpp | 6 ++++++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2a3611..df3683d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 9 + CACHE_VERSION: 10 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -532,10 +532,9 @@ jobs: run: | pushd deps/PawPaw; source local.env win32; popd make distclean -C carla - make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_FLUIDSYNTH=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false -j $(nproc) - make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist - make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist - make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc) + make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) run: | pushd deps/PawPaw; source local.env win32; popd @@ -605,10 +604,9 @@ jobs: run: | pushd deps/PawPaw; source local.env win64; popd make distclean -C carla - make -C carla EXTERNAL_PLUGINS=true HAVE_DGL=false HAVE_FLUIDSYNTH=false HAVE_HYLIA=false HAVE_JACK=false HAVE_LIBLO=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false USING_JUCE=false USING_JUCE_AUDIO_DEVICES=false USING_JUCE_GUI_EXTRA=false USING_RTAUDIO=false all win32r -j $(nproc) - make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist - make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist - make -C carla TESTING=true _CARLA_LV2_PLUGIN_FILES= _CARLA_VST2_PLUGIN_FILES= dist + make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc) + make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) run: | pushd deps/PawPaw; source local.env win64; popd diff --git a/carla b/carla index c06a4e6..0bd8447 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit c06a4e626ad897900895560999f05acb39740a85 +Subproject commit 0bd8447005778e6957c7f7a25155cc5a8e163d15 diff --git a/deps/PawPaw b/deps/PawPaw index 55bbe06..4923f40 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 55bbe0622b4a25dd30a849b9231bddcef8bcb53e +Subproject commit 4923f40778f8fbf2d8a8cbb3bc8e527210d2cabd diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 3417242..f22a7e1 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -97,12 +97,14 @@ static void projectLoadedFromDSP(void* ui); static Mutex sPluginInfoLoadMutex; +/* #ifndef HEADLESS struct JuceInitializer { JuceInitializer() { carla_juce_init(); } ~JuceInitializer() { carla_juce_cleanup(); } }; #endif +*/ struct IldaeilModule : Module { enum ParamIds { @@ -122,9 +124,11 @@ struct IldaeilModule : Module { NUM_LIGHTS }; + /* #ifndef HEADLESS SharedResourcePointer juceInitializer; #endif + */ const CardinalPluginContext* const pcontext; @@ -977,7 +981,9 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Thread { const CarlaHostHandle handle = module->fCarlaHostHandle; DISTRHO_SAFE_ASSERT_RETURN(handle != nullptr,); + /* carla_juce_idle(); + */ if (fileBrowserHandle != nullptr && fileBrowserIdle(fileBrowserHandle)) { From 530f53507940d13250b456700b633b73ce949eb5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 14 Mar 2022 16:22:24 +0000 Subject: [PATCH 045/132] Try to get python CI dep to build Signed-off-by: falkTX --- deps/PawPaw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/PawPaw b/deps/PawPaw index 4923f40..b22a46c 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 4923f40778f8fbf2d8a8cbb3bc8e527210d2cabd +Subproject commit b22a46cfb0291d5523099daf2d9facb7af9836c3 From 93660fdcf7c5dbcf64ef19c3f0aa1914296953e2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 14 Mar 2022 16:24:52 +0000 Subject: [PATCH 046/132] Fix make install Signed-off-by: falkTX --- Makefile | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index adb5822..63bed51 100644 --- a/Makefile +++ b/Makefile @@ -255,8 +255,7 @@ install: install -d $(DESTDIR)$(PREFIX)/lib/lv2/Cardinal.lv2 install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2 install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2 - install -d $(DESTDIR)$(PREFIX)/lib/vst/CardinalFX.vst - install -d $(DESTDIR)$(PREFIX)/lib/vst/CardinalSynth.vst + install -d $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst ifeq ($(VST3_SUPPORTED),true) install -d $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/Contents install -d $(DESTDIR)$(PREFIX)/lib/vst3/CardinalFX.vst3/Contents @@ -269,8 +268,7 @@ endif install -m 644 bin/CardinalFX.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2/ install -m 644 bin/CardinalSynth.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2/ - install -m 644 bin/CardinalFX.vst/*.* $(DESTDIR)$(PREFIX)/lib/vst/CardinalFX.vst/ - install -m 644 bin/CardinalSynth.vst/*.* $(DESTDIR)$(PREFIX)/lib/vst/CardinalSynth.vst/ + install -m 644 bin/Cardinal.vst/*.* $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst/ ifeq ($(VST3_SUPPORTED),true) cp -rL bin/Cardinal.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/Contents/ @@ -284,19 +282,6 @@ endif install -m 644 README.md $(DESTDIR)$(PREFIX)/share/doc/cardinal/ install -m 644 docs/*.md docs/*.png $(DESTDIR)$(PREFIX)/share/doc/cardinal/docs/ - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/lv2/Cardinal.lv2/resources - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2/resources - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2/resources - - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/vst/CardinalFX.vst/resources - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/vst/CardinalSynth.vst/resources - -ifeq ($(VST3_SUPPORTED),true) - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/Contents/Resources - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/vst3/CardinalFX.vst3/Contents/Resources - ln -sf $(PREFIX)/share/cardinal $(DESTDIR)$(PREFIX)/lib/vst3/CardinalSynth.vst3/Contents/Resources -endif - # -------------------------------------------------------------- # Tarball step, for releases From 6d9633b7fb6355eb69a495c22ff3d36f4ed6ad1c Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 14 Mar 2022 22:34:34 +0000 Subject: [PATCH 047/132] Install otf files, used in befaco Signed-off-by: falkTX --- plugins/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 6a6d346..94e6979 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1013,6 +1013,9 @@ RESOURCE_FILES = \ $(wildcard */res/*.svg) \ $(wildcard */res/*/*.svg) \ $(wildcard */res/*/*/*.svg) \ + $(wildcard */res/*.otf) \ + $(wildcard */res/*/*.otf) \ + $(wildcard */res/*/*/*.otf) \ $(wildcard */res/*.ttf) \ $(wildcard */res/*/*.ttf) \ $(wildcard */res/*/*/*.ttf)) From 2dc12fb1caccf5ff9145a468d01dd9d6bfbf1362 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 14 Mar 2022 23:19:16 +0000 Subject: [PATCH 048/132] Force 32bit alignment for vectorized operations, fixes 32bit build Signed-off-by: falkTX --- deps/PawPaw | 2 +- include/dsp/fir.hpp | 164 +++++++++++++++++ include/engine/Port.hpp | 2 +- include/simd/Vector.hpp | 374 +++++++++++++++++++++++++++++++++++++++ plugins/Makefile | 2 +- src/Makefile | 4 +- src/Makefile.cardinal.mk | 2 +- src/override/minblep.cpp | 111 ++++++++++++ 8 files changed, 656 insertions(+), 5 deletions(-) create mode 100644 include/dsp/fir.hpp create mode 100644 include/simd/Vector.hpp create mode 100644 src/override/minblep.cpp diff --git a/deps/PawPaw b/deps/PawPaw index b22a46c..9fa141a 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit b22a46cfb0291d5523099daf2d9facb7af9836c3 +Subproject commit 9fa141a1050cfd81577f068135218723441b8ac5 diff --git a/include/dsp/fir.hpp b/include/dsp/fir.hpp new file mode 100644 index 0000000..7d1c737 --- /dev/null +++ b/include/dsp/fir.hpp @@ -0,0 +1,164 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +/** + * This file is an edited version of VCVRack's dsp/fir.hpp + * Copyright (C) 2016-2021 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + */ + +#pragma once + +#include + +#include + + +namespace rack { +namespace dsp { + + +/** Performs a direct sum convolution */ +inline float convolveNaive(const float* in, const float* kernel, int len) { + float y = 0.f; + for (int i = 0; i < len; i++) { + y += in[len - 1 - i] * kernel[i]; + } + return y; +} + +/** Computes the impulse response of a boxcar lowpass filter */ +inline void boxcarLowpassIR(float* out, int len, float cutoff = 0.5f) { + for (int i = 0; i < len; i++) { + float t = i - (len - 1) / 2.f; + out[i] = 2 * cutoff * sinc(2 * cutoff * t); + } +} + + +struct RealTimeConvolver { + // `kernelBlocks` number of contiguous FFT blocks of size `blockSize` + // indexed by [i * blockSize*2 + j] + float* kernelFfts = NULL; + float* inputFfts = NULL; + float* outputTail = NULL; + float* tmpBlock = NULL; + size_t blockSize; + size_t kernelBlocks = 0; + size_t inputPos = 0; + PFFFT_Setup* pffft; + + /** `blockSize` is the size of each FFT block. It should be >=32 and a power of 2. */ + RealTimeConvolver(size_t blockSize) { + this->blockSize = blockSize; + pffft = pffft_new_setup(blockSize * 2, PFFFT_REAL); + outputTail = (float*) pffft_aligned_malloc(sizeof(float) * blockSize); + std::memset(outputTail, 0, blockSize * sizeof(float)); + tmpBlock = (float*) pffft_aligned_malloc(sizeof(float) * blockSize * 2); + std::memset(tmpBlock, 0, blockSize * 2 * sizeof(float)); + } + + ~RealTimeConvolver() { + setKernel(NULL, 0); + pffft_aligned_free(outputTail); + pffft_aligned_free(tmpBlock); + pffft_destroy_setup(pffft); + } + + void setKernel(const float* kernel, size_t length) { + // Clear existing kernel + if (kernelFfts) { + pffft_aligned_free(kernelFfts); + kernelFfts = NULL; + } + if (inputFfts) { + pffft_aligned_free(inputFfts); + inputFfts = NULL; + } + kernelBlocks = 0; + inputPos = 0; + + if (kernel && length > 0) { + // Round up to the nearest factor of `blockSize` + kernelBlocks = (length - 1) / blockSize + 1; + + // Allocate blocks + kernelFfts = (float*) pffft_aligned_malloc(sizeof(float) * blockSize * 2 * kernelBlocks); + inputFfts = (float*) pffft_aligned_malloc(sizeof(float) * blockSize * 2 * kernelBlocks); + std::memset(inputFfts, 0, sizeof(float) * blockSize * 2 * kernelBlocks); + + for (size_t i = 0; i < kernelBlocks; i++) { + // Pad each block with zeros + std::memset(tmpBlock, 0, sizeof(float) * blockSize * 2); + size_t len = std::min((int) blockSize, (int)(length - i * blockSize)); + std::memcpy(tmpBlock, &kernel[i * blockSize], sizeof(float)*len); + // Compute fft + pffft_transform(pffft, tmpBlock, &kernelFfts[blockSize * 2 * i], NULL, PFFFT_FORWARD); + } + } + } + + /** Applies reverb to input + input and output must be of size `blockSize` + */ + void processBlock(const float* input, float* output) { + if (kernelBlocks == 0) { + std::memset(output, 0, sizeof(float) * blockSize); + return; + } + + // Step input position + inputPos = (inputPos + 1) % kernelBlocks; + // Pad block with zeros + std::memset(tmpBlock, 0, sizeof(float) * blockSize * 2); + std::memcpy(tmpBlock, input, sizeof(float) * blockSize); + // Compute input fft + pffft_transform(pffft, tmpBlock, &inputFfts[blockSize * 2 * inputPos], NULL, PFFFT_FORWARD); + // Create output fft + std::memset(tmpBlock, 0, sizeof(float) * blockSize * 2); + // convolve input fft by kernel fft + // Note: This is the CPU bottleneck loop + for (size_t i = 0; i < kernelBlocks; i++) { + size_t pos = (inputPos - i + kernelBlocks) % kernelBlocks; + pffft_zconvolve_accumulate(pffft, &kernelFfts[blockSize * 2 * i], &inputFfts[blockSize * 2 * pos], tmpBlock, 1.f); + } + // Compute output + pffft_transform(pffft, tmpBlock, tmpBlock, NULL, PFFFT_BACKWARD); + // Add block tail from last output block + for (size_t i = 0; i < blockSize; i++) { + tmpBlock[i] += outputTail[i]; + } + // Copy output block to output + float scale = 1.f / (blockSize * 2); + for (size_t i = 0; i < blockSize; i++) { + // Scale based on FFT + output[i] = tmpBlock[i] * scale; + } + // Set tail + for (size_t i = 0; i < blockSize; i++) { + outputTail[i] = tmpBlock[i + blockSize]; + } + } +}; + + +} // namespace dsp +} // namespace rack diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index 87c0e2a..b518870 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -48,7 +48,7 @@ struct Port { /** Voltage of the port. */ /** NOTE alignas is required in order to allow SSE usage. Consecutive data (like in a vector) would otherwise pack Ports in a way that breaks SSE. */ - union alignas(PORT_MAX_CHANNELS) { + union alignas(32) { /** Unstable API. Use getVoltage() and setVoltage() instead. */ float voltages[PORT_MAX_CHANNELS] = {}; /** DEPRECATED. Unstable API. Use getVoltage() and setVoltage() instead. */ diff --git a/include/simd/Vector.hpp b/include/simd/Vector.hpp new file mode 100644 index 0000000..b1640cd --- /dev/null +++ b/include/simd/Vector.hpp @@ -0,0 +1,374 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +/** + * This file is an edited version of VCVRack's simd/Vector.hpp + * Copyright (C) 2016-2021 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + */ + +#pragma once + +#include +#include + + +namespace rack { + + +/** Abstraction of aligned types for SIMD computation +*/ +namespace simd { + + +/** Generic class for vector types. + +This class is designed to be used just like you use scalars, with extra features for handling bitwise logic, conditions, loading, and storing. + +Example: + + float a[4], b[4]; + float_4 a = float_4::load(in); + float_4 b = 2.f * a / (1 - a); + b *= sin(2 * M_PI * a); + b.store(out); +*/ +template +struct Vector; + + +/** Wrapper for `__m128` representing an aligned vector of 4 single-precision float values. +*/ +template <> +struct Vector { + using type = float; + constexpr static int size = 4; + + /** NOTE alignas is required in order to allow SSE usage. */ + union alignas(32) { + __m128 v; + /** Accessing this array of scalars is slow and defeats the purpose of vectorizing. + */ + float s[4]; + }; + + /** Constructs an uninitialized vector. */ + Vector() = default; + + /** Constructs a vector from a native `__m128` type. */ + Vector(__m128 v) : v(v) {} + + /** Constructs a vector with all elements set to `x`. */ + Vector(float x) { + v = _mm_set1_ps(x); + } + + /** Constructs a vector from four scalars. */ + Vector(float x1, float x2, float x3, float x4) { + v = _mm_setr_ps(x1, x2, x3, x4); + } + + /** Returns a vector with all 0 bits. */ + static Vector zero() { + return Vector(_mm_setzero_ps()); + } + + /** Returns a vector with all 1 bits. */ + static Vector mask() { + return Vector(_mm_castsi128_ps(_mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128()))); + } + + /** Reads an array of 4 values. + On little-endian machines (e.g. x86_64), the order is reversed, so `x[0]` corresponds to `vector.s[3]`. + */ + static Vector load(const float* x) { + /* + My benchmarks show that _mm_loadu_ps() performs equally as fast as _mm_load_ps() when data is actually aligned. + This post seems to agree. https://stackoverflow.com/a/20265193/272642 + I therefore use _mm_loadu_ps() for generality, so you can load unaligned arrays using the same function (although load aligned arrays if you can for best performance). + */ + return Vector(_mm_loadu_ps(x)); + } + + /** Writes an array of 4 values. + On little-endian machines (e.g. x86_64), the order is reversed, so `x[0]` corresponds to `vector.s[3]`. + */ + void store(float* x) { + _mm_storeu_ps(x, v); + } + + /** Accessing vector elements individually is slow and defeats the purpose of vectorizing. + However, this operator is convenient when writing simple serial code in a non-bottlenecked section. + */ + float& operator[](int i) { + return s[i]; + } + const float& operator[](int i) const { + return s[i]; + } + + // Conversions + Vector(Vector a); + // Casts + static Vector cast(Vector a); +}; + + +template <> +struct Vector { + using type = int32_t; + constexpr static int size = 4; + + /** NOTE alignas is required in order to allow SSE usage. */ + union alignas(32) { + __m128i v; + int32_t s[4]; + }; + + Vector() = default; + Vector(__m128i v) : v(v) {} + Vector(int32_t x) { + v = _mm_set1_epi32(x); + } + Vector(int32_t x1, int32_t x2, int32_t x3, int32_t x4) { + v = _mm_setr_epi32(x1, x2, x3, x4); + } + static Vector zero() { + return Vector(_mm_setzero_si128()); + } + static Vector mask() { + return Vector(_mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())); + } + static Vector load(const int32_t* x) { + // HACK + // Use _mm_loadu_si128() because GCC doesn't support _mm_loadu_si32() + return Vector(_mm_loadu_si128((const __m128i*) x)); + } + void store(int32_t* x) { + // HACK + // Use _mm_storeu_si128() because GCC doesn't support _mm_storeu_si32() + _mm_storeu_si128((__m128i*) x, v); + } + int32_t& operator[](int i) { + return s[i]; + } + const int32_t& operator[](int i) const { + return s[i]; + } + Vector(Vector a); + static Vector cast(Vector a); +}; + + +// Conversions and casts + + +inline Vector::Vector(Vector a) { + v = _mm_cvtepi32_ps(a.v); +} + +inline Vector::Vector(Vector a) { + v = _mm_cvttps_epi32(a.v); +} + +inline Vector Vector::cast(Vector a) { + return Vector(_mm_castsi128_ps(a.v)); +} + +inline Vector Vector::cast(Vector a) { + return Vector(_mm_castps_si128(a.v)); +} + + +// Operator overloads + + +/** `a @ b` */ +#define DECLARE_VECTOR_OPERATOR_INFIX(t, s, operator, func) \ + inline Vector operator(const Vector& a, const Vector& b) { \ + return Vector(func(a.v, b.v)); \ + } + +/** `a @= b` */ +#define DECLARE_VECTOR_OPERATOR_INCREMENT(t, s, operator, opfunc) \ + inline Vector& operator(Vector& a, const Vector& b) { \ + return a = opfunc(a, b); \ + } + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator+, _mm_add_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator+, _mm_add_epi32) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator-, _mm_sub_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator-, _mm_sub_epi32) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator*, _mm_mul_ps) +// DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator*, NOT AVAILABLE IN SSE3) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator/, _mm_div_ps) +// DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator/, NOT AVAILABLE IN SSE3) + +/* Use these to apply logic, bit masks, and conditions to elements. +Boolean operators on vectors give 0x00000000 for false and 0xffffffff for true, for each vector element. + +Examples: + +Subtract 1 from value if greater than or equal to 1. + + x -= (x >= 1.f) & 1.f; +*/ +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator^, _mm_xor_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator^, _mm_xor_si128) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator&, _mm_and_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator&, _mm_and_si128) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator|, _mm_or_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator|, _mm_or_si128) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator+=, operator+) +DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator+=, operator+) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator-=, operator-) +DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator-=, operator-) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator*=, operator*) +// DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator*=, NOT AVAILABLE IN SSE3) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator/=, operator/) +// DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator/=, NOT AVAILABLE IN SSE3) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator^=, operator^) +DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator^=, operator^) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator&=, operator&) +DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator&=, operator&) + +DECLARE_VECTOR_OPERATOR_INCREMENT(float, 4, operator|=, operator|) +DECLARE_VECTOR_OPERATOR_INCREMENT(int32_t, 4, operator|=, operator|) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator==, _mm_cmpeq_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator==, _mm_cmpeq_epi32) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator>=, _mm_cmpge_ps) +inline Vector operator>=(const Vector& a, const Vector& b) { + return Vector(_mm_cmpgt_epi32(a.v, b.v)) ^ Vector::mask(); +} + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator>, _mm_cmpgt_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator>, _mm_cmpgt_epi32) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator<=, _mm_cmple_ps) +inline Vector operator<=(const Vector& a, const Vector& b) { + return Vector(_mm_cmplt_epi32(a.v, b.v)) ^ Vector::mask(); +} + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator<, _mm_cmplt_ps) +DECLARE_VECTOR_OPERATOR_INFIX(int32_t, 4, operator<, _mm_cmplt_epi32) + +DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator!=, _mm_cmpneq_ps) +inline Vector operator!=(const Vector& a, const Vector& b) { + return Vector(_mm_cmpeq_epi32(a.v, b.v)) ^ Vector::mask(); +} + +/** `+a` */ +inline Vector operator+(const Vector& a) { + return a; +} +inline Vector operator+(const Vector& a) { + return a; +} + +/** `-a` */ +inline Vector operator-(const Vector& a) { + return 0.f - a; +} +inline Vector operator-(const Vector& a) { + return 0 - a; +} + +/** `++a` */ +inline Vector& operator++(Vector& a) { + return a += 1.f; +} +inline Vector& operator++(Vector& a) { + return a += 1; +} + +/** `--a` */ +inline Vector& operator--(Vector& a) { + return a -= 1.f; +} +inline Vector& operator--(Vector& a) { + return a -= 1; +} + +/** `a++` */ +inline Vector operator++(Vector& a, int) { + Vector b = a; + ++a; + return b; +} +inline Vector operator++(Vector& a, int) { + Vector b = a; + ++a; + return b; +} + +/** `a--` */ +inline Vector operator--(Vector& a, int) { + Vector b = a; + --a; + return b; +} +inline Vector operator--(Vector& a, int) { + Vector b = a; + --a; + return b; +} + +/** `~a` */ +inline Vector operator~(const Vector& a) { + return a ^ Vector::mask(); +} +inline Vector operator~(const Vector& a) { + return a ^ Vector::mask(); +} + +/** `a << b` */ +inline Vector operator<<(const Vector& a, const int& b) { + return Vector(_mm_slli_epi32(a.v, b)); +} + +/** `a >> b` */ +inline Vector operator>>(const Vector& a, const int& b) { + return Vector(_mm_srli_epi32(a.v, b)); +} + + +// Typedefs + + +using float_4 = Vector; +using int32_4 = Vector; + + +} // namespace simd +} // namespace rack diff --git a/plugins/Makefile b/plugins/Makefile index 94e6979..0bbbb5b 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -954,7 +954,7 @@ endif BUILD_C_FLAGS += -std=gnu11 BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing +BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing -faligned-new # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS diff --git a/src/Makefile b/src/Makefile index 48b7d05..13d59ba 100644 --- a/src/Makefile +++ b/src/Makefile @@ -95,7 +95,7 @@ endif BUILD_C_FLAGS += -std=gnu11 BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing +BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing -faligned-new # use our custom function to invert some colors BUILD_CXX_FLAGS += -DnsvgParseFromFile=nsvgParseFromFileCardinal @@ -115,6 +115,7 @@ RACK_FILES += custom/network.cpp RACK_FILES += custom/osdialog.cpp RACK_FILES += override/blendish.c RACK_FILES += override/context.cpp +RACK_FILES += override/minblep.cpp RACK_FILES += override/plugin.cpp RACK_FILES += override/Engine.cpp RACK_FILES += override/MenuBar.cpp @@ -144,6 +145,7 @@ IGNORED_FILES += Rack/src/app/MenuBar.cpp IGNORED_FILES += Rack/src/app/MidiDisplay.cpp IGNORED_FILES += Rack/src/app/Scene.cpp IGNORED_FILES += Rack/src/app/TipWindow.cpp +IGNORED_FILES += Rack/src/dsp/minblep.cpp IGNORED_FILES += Rack/src/engine/Engine.cpp IGNORED_FILES += Rack/src/plugin/Model.cpp IGNORED_FILES += Rack/src/window/Window.cpp diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 8c704ca..7160b0b 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -170,7 +170,7 @@ endif BUILD_C_FLAGS += -std=gnu11 BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing +BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing -faligned-new # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS diff --git a/src/override/minblep.cpp b/src/override/minblep.cpp new file mode 100644 index 0000000..6242b0d --- /dev/null +++ b/src/override/minblep.cpp @@ -0,0 +1,111 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +/** + * This file is an edited version of VCVRack's dsp/minblep.cpp + * Copyright (C) 2016-2021 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + */ + +#include +#include +#include + + +namespace rack { +namespace dsp { + + +void minBlepImpulse(int z, int o, float* output) { + // Symmetric sinc array with `z` zero-crossings on each side + int n = 2 * z * o; + float* x = (float*) pffft_aligned_malloc(sizeof(float) * n); + for (int i = 0; i < n; i++) { + float p = math::rescale((float) i, 0.f, (float)(n - 1), (float) - z, (float) z); + x[i] = sinc(p); + } + + // Apply window + blackmanHarrisWindow(x, n); + + // Real cepstrum + float* fx = (float*) pffft_aligned_malloc(sizeof(float) * 2 * n); + // Valgrind complains that the array is uninitialized for some reason, unless we clear it. + std::memset(fx, 0, sizeof(float) * 2 * n); + RealFFT rfft(n); + rfft.rfft(x, fx); + // fx = log(abs(fx)) + fx[0] = std::log(std::fabs(fx[0])); + for (int i = 1; i < n; i++) { + fx[2 * i] = std::log(std::hypot(fx[2 * i], fx[2 * i + 1])); + fx[2 * i + 1] = 0.f; + } + fx[1] = std::log(std::fabs(fx[1])); + // Clamp values in case we have -inf + for (int i = 0; i < 2 * n; i++) { + fx[i] = std::fmax(-30.f, fx[i]); + } + rfft.irfft(fx, x); + rfft.scale(x); + + // Minimum-phase reconstruction + for (int i = 1; i < n / 2; i++) { + x[i] *= 2.f; + } + for (int i = (n + 1) / 2; i < n; i++) { + x[i] = 0.f; + } + rfft.rfft(x, fx); + // fx = exp(fx) + fx[0] = std::exp(fx[0]); + for (int i = 1; i < n; i++) { + float re = std::exp(fx[2 * i]); + float im = fx[2 * i + 1]; + fx[2 * i] = re * std::cos(im); + fx[2 * i + 1] = re * std::sin(im); + } + fx[1] = std::exp(fx[1]); + rfft.irfft(fx, x); + rfft.scale(x); + + // Integrate + float total = 0.f; + for (int i = 0; i < n; i++) { + total += x[i]; + x[i] = total; + } + + // Normalize + float norm = 1.f / x[n - 1]; + for (int i = 0; i < n; i++) { + x[i] *= norm; + } + + std::memcpy(output, x, n * sizeof(float)); + + // Cleanup + pffft_aligned_free(x); + pffft_aligned_free(fx); +} + + +} // namespace dsp +} // namespace rack From 17e8c70c1a60967aebed48cf3c6d305ad409c499 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 14 Mar 2022 23:20:59 +0000 Subject: [PATCH 049/132] Skip Carla bundling on windows builds for now Signed-off-by: falkTX --- .github/workflows/build.yml | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df3683d..72548f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -528,17 +528,17 @@ jobs: pushd deps/PawPaw; source local.env win32; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) - - name: Build win64 cross-compiled (carla) - run: | - pushd deps/PawPaw; source local.env win32; popd - make distclean -C carla - make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc) - make -C carla EMBED_TARGET=true TESTING=true dist - make -C carla EMBED_TARGET=true TESTING=true dist - - name: Build win64 cross-compiled (packaging) - run: | - pushd deps/PawPaw; source local.env win32; popd - xvfb-run ./utils/create-windows-installer.sh 32 + #- name: Build win64 cross-compiled (carla) + #run: | + #pushd deps/PawPaw; source local.env win32; popd + #make distclean -C carla + #make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc) + #make -C carla EMBED_TARGET=true TESTING=true dist + #make -C carla EMBED_TARGET=true TESTING=true dist + #- name: Build win64 cross-compiled (packaging) + #run: | + #pushd deps/PawPaw; source local.env win32; popd + #xvfb-run ./utils/create-windows-installer.sh 32 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -600,17 +600,17 @@ jobs: pushd deps/PawPaw; source local.env win64; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) - - name: Build win64 cross-compiled (carla) - run: | - pushd deps/PawPaw; source local.env win64; popd - make distclean -C carla - make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc) - make -C carla EMBED_TARGET=true TESTING=true dist - make -C carla EMBED_TARGET=true TESTING=true dist - - name: Build win64 cross-compiled (packaging) - run: | - pushd deps/PawPaw; source local.env win64; popd - xvfb-run ./utils/create-windows-installer.sh 64 + #- name: Build win64 cross-compiled (carla) + #run: | + #pushd deps/PawPaw; source local.env win64; popd + #make distclean -C carla + #make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc) + #make -C carla EMBED_TARGET=true TESTING=true dist + #make -C carla EMBED_TARGET=true TESTING=true dist + #- name: Build win64 cross-compiled (packaging) + #run: | + #pushd deps/PawPaw; source local.env win64; popd + #xvfb-run ./utils/create-windows-installer.sh 64 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 From 7af1f52b8c1f23119e5a20d279d9529af36c38ca Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Mar 2022 10:03:12 +0000 Subject: [PATCH 050/132] Create windows installer, without carla for now Signed-off-by: falkTX --- .github/workflows/build.yml | 16 ++++++++-------- utils/inno/win32.iss | 26 +++++++++++++------------- utils/inno/win64.iss | 26 +++++++++++++------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72548f1..05161a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -535,10 +535,10 @@ jobs: #make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc) #make -C carla EMBED_TARGET=true TESTING=true dist #make -C carla EMBED_TARGET=true TESTING=true dist - #- name: Build win64 cross-compiled (packaging) - #run: | - #pushd deps/PawPaw; source local.env win32; popd - #xvfb-run ./utils/create-windows-installer.sh 32 + - name: Build win64 cross-compiled (packaging) + run: | + pushd deps/PawPaw; source local.env win32; popd + xvfb-run ./utils/create-windows-installer.sh 32 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -607,10 +607,10 @@ jobs: #make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc) #make -C carla EMBED_TARGET=true TESTING=true dist #make -C carla EMBED_TARGET=true TESTING=true dist - #- name: Build win64 cross-compiled (packaging) - #run: | - #pushd deps/PawPaw; source local.env win64; popd - #xvfb-run ./utils/create-windows-installer.sh 64 + - name: Build win64 cross-compiled (packaging) + run: | + pushd deps/PawPaw; source local.env win64; popd + xvfb-run ./utils/create-windows-installer.sh 64 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index 7255fd9..9978f46 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -22,7 +22,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom; [Components] Name: resources; Description: "Resources"; Types: full custom; Flags: fixed; -Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; +; Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; Name: lv2; Description: "LV2 plugin"; Types: full; Name: vst2; Description: "VST2 plugin"; Types: full; Name: vst3; Description: "VST3 plugin"; Types: full; @@ -30,18 +30,18 @@ Name: vst3; Description: "VST3 plugin"; Types: full; [Files] #include "resources.iss" ; carla -Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; ; lv2 Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf32}\LV2\Cardinal.lv2"; Components: lv2; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss index 38f371d..3076e27 100644 --- a/utils/inno/win64.iss +++ b/utils/inno/win64.iss @@ -22,7 +22,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom; [Components] Name: resources; Description: "Resources"; Types: full custom; Flags: fixed; -Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; +; Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; Name: lv2; Description: "LV2 plugin"; Types: full; Name: vst2; Description: "VST2 plugin"; Types: full; Name: vst3; Description: "VST3 plugin"; Types: full; @@ -30,18 +30,18 @@ Name: vst3; Description: "VST3 plugin"; Types: full; [Files] #include "resources.iss" ; carla -Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; +; Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; ; lv2 Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf64}\LV2\Cardinal.lv2"; Components: lv2; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf64}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; From 5ab0617dd4444e363e4abf99d7498f0b29b5e2b0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Mar 2022 10:06:26 +0000 Subject: [PATCH 051/132] Only build AU for jucewrapper on macOS Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 7f1e727..775b279 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -98,10 +98,12 @@ endif (NOT APPLE OR WIN32) if (APPLE) set(EXTRA_LIBS "-lz") set(GL_LIBRARIES "-framework OpenGL") +set(PLUGIN_FORMATS AU) else (APPLE) pkg_check_modules(GL REQUIRED gl) set(STATIC_LIBS_START "-Wl,--whole-archive") set(STATIC_LIBS_END "-Wl,--no-whole-archive") +set(PLUGIN_FORMATS Standalone VST3) endif (APPLE) # FX variant @@ -113,7 +115,7 @@ juce_add_plugin(CardinalFX COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" DESCRIPTION "Virtual modular synthesizer plugin" EDITOR_WANTS_KEYBOARD_FOCUS TRUE - FORMATS Standalone VST3 AU + FORMATS ${PLUGIN_FORMATS} IS_MIDI_EFFECT FALSE IS_SYNTH FALSE NEEDS_MIDI_INPUT TRUE From be2d8ddea10e1b76bfc889be104f963b027a2b01 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Mar 2022 11:36:25 +0000 Subject: [PATCH 052/132] Fix win32 build Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 7cd27b1..a449da1 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 7cd27b17fbbd196beff8c1fcc209f10e9c24f274 +Subproject commit a449da1881e3d5bffeb45be476ac34302870708d From 4ac1fed49aef5f04aaf4199387a507bc123cc871 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Mar 2022 16:25:18 +0000 Subject: [PATCH 053/132] Fix missing resources for nonlinearcircuits --- plugins/Makefile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 0bbbb5b..9b313c2 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -994,19 +994,7 @@ PLUGIN_LIST = $(subst /plugin.json,,$(wildcard */plugin.json)) endif UNWANTED_FILES = HetrickCV/res/illustrator - deprecated/MyModule.svg -UNWANTED_FILES += nonlinearcircuits/res/NLC - 1050 MIXER SEQUENCER.svg -UNWANTED_FILES += 1050 MIXER SEQUENCER.svg -UNWANTED_FILES += 32to1.svg -UNWANTED_FILES += 4seq.svg -UNWANTED_FILES += 8 BIT CIPHER.svg -UNWANTED_FILES += DIVIDE & CONQUER.svg -UNWANTED_FILES += DIVINE CMOS.svg -UNWANTED_FILES += GENiE.svg -UNWANTED_FILES += NEURON.svg -UNWANTED_FILES += NUMBERWANG.svg -UNWANTED_FILES += ROUTER.svg -UNWANTED_FILES += SEGUE.svg -UNWANTED_FILES += STATUES.svg +UNWANTED_FILES += $(wildcard nonlinearcircuits/res/*) RESOURCE_FILES = \ $(filter-out $(UNWANTED_FILES), \ From 29fb30af9b9da0f2ef67f6ea5a847a5ee7002c62 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Mar 2022 16:34:32 +0000 Subject: [PATCH 054/132] Fix Orbits panels when installed --- plugins/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Makefile b/plugins/Makefile index 9b313c2..db2289e 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1009,6 +1009,7 @@ RESOURCE_FILES = \ $(wildcard */res/*/*/*.ttf)) RESOURCE_FILES += $(wildcard */presets) +RESOURCE_FILES += $(wildcard Orbits/res/*.json) RESOURCE_FILES += ArableInstruments/res/Joni.png RESOURCE_FILES += BaconPlugs/res/Keypunch029.json RESOURCE_FILES += BaconPlugs/res/midi/chopin From ddddd0f9bcf4e140d79bbf965df822056e6ceb92 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 16 Mar 2022 01:41:49 +0000 Subject: [PATCH 055/132] Fix win32 installer Signed-off-by: falkTX --- utils/inno/win32.iss | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index 9978f46..0b1d003 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -1,7 +1,6 @@ #include "version.iss" [Setup] -ArchitecturesInstallIn64BitMode=x64 AppName=Cardinal AppPublisher=DISTRHO AppPublisherURL=https://github.com/DISTRHO/Cardinal/ @@ -49,6 +48,6 @@ Source: "..\..\bin\CardinalSynth.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalSy ; vst2 Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf32}\VST2\Cardinal.vst"; Components: vst2; Flags: ignoreversion; ; vst3 -Source: "..\..\bin\Cardinal.vst3\Contents\x86-win\Cardinal.vst3"; DestDir: "{commoncf64}\VST3\Cardinal.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; -Source: "..\..\bin\CardinalFX.vst3\Contents\x86-win\CardinalFX.vst3"; DestDir: "{commoncf64}\VST3\CardinalFX.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; -Source: "..\..\bin\CardinalSynth.vst3\Contents\x86-win\CardinalSynth.vst3"; DestDir: "{commoncf64}\VST3\CardinalSynth.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\Cardinal.vst3\Contents\x86-win\Cardinal.vst3"; DestDir: "{commoncf32}\VST3\Cardinal.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\CardinalFX.vst3\Contents\x86-win\CardinalFX.vst3"; DestDir: "{commoncf32}\VST3\CardinalFX.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; +Source: "..\..\bin\CardinalSynth.vst3\Contents\x86-win\CardinalSynth.vst3"; DestDir: "{commoncf32}\VST3\CardinalSynth.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; From 721b4ea6dceeb22e0bb1b635aad8a0545a283bca Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 16 Mar 2022 02:37:56 +0000 Subject: [PATCH 056/132] Cleanup Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 775b279..1c92951 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -86,21 +86,18 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(LIBLO REQUIRED liblo) pkg_check_modules(SNDFILE REQUIRED sndfile) -if (NOT APPLE OR WIN32) -pkg_check_modules(X11 REQUIRED x11) -pkg_check_modules(XCURSOR REQUIRED xcursor) -pkg_check_modules(XEXT REQUIRED xext) -pkg_check_modules(XRANDR REQUIRED xrandr) -pkg_check_modules(DBUS REQUIRED dbus-1) -set(EXTRA_LIBS "-lrt") -endif (NOT APPLE OR WIN32) - if (APPLE) set(EXTRA_LIBS "-lz") set(GL_LIBRARIES "-framework OpenGL") set(PLUGIN_FORMATS AU) else (APPLE) +pkg_check_modules(DBUS REQUIRED dbus-1) pkg_check_modules(GL REQUIRED gl) +pkg_check_modules(X11 REQUIRED x11) +pkg_check_modules(XCURSOR REQUIRED xcursor) +pkg_check_modules(XEXT REQUIRED xext) +pkg_check_modules(XRANDR REQUIRED xrandr) +set(EXTRA_LIBS "-lrt") set(STATIC_LIBS_START "-Wl,--whole-archive") set(STATIC_LIBS_END "-Wl,--no-whole-archive") set(PLUGIN_FORMATS Standalone VST3) From 02b1c78ccc026da23d80ac8beaae5b6f910acf89 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 16 Mar 2022 19:00:41 +0000 Subject: [PATCH 057/132] Fix and enable carla on windows CI builds Signed-off-by: falkTX --- .github/workflows/build.yml | 32 +++++++++++++++----------------- carla | 2 +- deps/PawPaw | 2 +- utils/inno/win32.iss | 26 +++++++++++++------------- utils/inno/win64.iss | 26 +++++++++++++------------- 5 files changed, 43 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05161a9..f76f0a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 10 + CACHE_VERSION: 12 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -519,7 +519,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 xvfb + sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win32 @@ -528,13 +528,12 @@ jobs: pushd deps/PawPaw; source local.env win32; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) - #- name: Build win64 cross-compiled (carla) - #run: | - #pushd deps/PawPaw; source local.env win32; popd - #make distclean -C carla - #make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc) - #make -C carla EMBED_TARGET=true TESTING=true dist - #make -C carla EMBED_TARGET=true TESTING=true dist + - name: Build win64 cross-compiled (carla) + run: | + pushd deps/PawPaw; source local.env win32; popd + make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc) + make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) run: | pushd deps/PawPaw; source local.env win32; popd @@ -591,7 +590,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable xvfb + sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable qttools5-dev qttools5-dev-tools xvfb - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win64 @@ -600,13 +599,12 @@ jobs: pushd deps/PawPaw; source local.env win64; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) - #- name: Build win64 cross-compiled (carla) - #run: | - #pushd deps/PawPaw; source local.env win64; popd - #make distclean -C carla - #make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc) - #make -C carla EMBED_TARGET=true TESTING=true dist - #make -C carla EMBED_TARGET=true TESTING=true dist + - name: Build win64 cross-compiled (carla) + run: | + pushd deps/PawPaw; source local.env win64; popd + make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc) + make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) run: | pushd deps/PawPaw; source local.env win64; popd diff --git a/carla b/carla index 0bd8447..9758218 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 0bd8447005778e6957c7f7a25155cc5a8e163d15 +Subproject commit 97582181926ed102e1e7080e456c2adebbf803fa diff --git a/deps/PawPaw b/deps/PawPaw index 9fa141a..a8b5691 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 9fa141a1050cfd81577f068135218723441b8ac5 +Subproject commit a8b569124ced5a712eee0177f315b9fc53e26cbd diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index 0b1d003..eb38a3e 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -21,7 +21,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom; [Components] Name: resources; Description: "Resources"; Types: full custom; Flags: fixed; -; Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; +Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; Name: lv2; Description: "LV2 plugin"; Types: full; Name: vst2; Description: "VST2 plugin"; Types: full; Name: vst3; Description: "VST3 plugin"; Types: full; @@ -29,18 +29,18 @@ Name: vst3; Description: "VST3 plugin"; Types: full; [Files] #include "resources.iss" ; carla -; Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; ; lv2 Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf32}\LV2\Cardinal.lv2"; Components: lv2; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss index 3076e27..38f371d 100644 --- a/utils/inno/win64.iss +++ b/utils/inno/win64.iss @@ -22,7 +22,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom; [Components] Name: resources; Description: "Resources"; Types: full custom; Flags: fixed; -; Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; +Name: carla; Description: "Carla/Ildaeil host tools"; Types: full; Name: lv2; Description: "LV2 plugin"; Types: full; Name: vst2; Description: "VST2 plugin"; Types: full; Name: vst3; Description: "VST3 plugin"; Types: full; @@ -30,18 +30,18 @@ Name: vst3; Description: "VST3 plugin"; Types: full; [Files] #include "resources.iss" ; carla -; Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; -; Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; ; lv2 Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf64}\LV2\Cardinal.lv2"; Components: lv2; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf64}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; From ec1b86a498cca0506bb97467a3bbba87304a5e85 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 16 Mar 2022 19:19:28 +0000 Subject: [PATCH 058/132] Update README to mention where to find releases Signed-off-by: falkTX --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c30bfc7..c0f3336 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ But a couple of modules background's have their colors flipped, because damn we ![screenshot](docs/Screenshot_Carla+Ildaeil.png "Screenshot") + ## Current status With the exception of a few bugs, Cardinal can be considered stable. @@ -78,12 +79,25 @@ Though currently the following should be noted: - VST3 support incomplete/experimental [#41](https://github.com/DISTRHO/Cardinal/issues/41) - Windows 32bit builds do not work well [#80](https://github.com/DISTRHO/Cardinal/issues/80) -### Current builds +### Stable release + +Cardinal releases have official builds for Linux, macOS and Windows. +You can find these under https://github.com/DISTRHO/Cardinal/releases. + +There are Linux builds for various architectures (armhf, arm64, i686 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. +Both macOS and Windows builds have an installer. + +Install instructions are available [here](https://github.com/DISTRHO/Cardinal/wiki/Install). + +Note: Neither the macOS or Windows builds are signed, so expect warnings saying they are from an "untrusted developer". + +### Nightly builds -If you want to try this out early, checkout the [GitHub actions tab](https://github.com/DISTRHO/Cardinal/actions/workflows/build.yml). -There is absolutely no warranty, use at your own risk and all that... +You can find builds for pretty much any recent Cardinal commit [here](https://github.com/DISTRHO/Cardinal/actions/workflows/build.yml). +Just click on any successful build, and scroll to the bottom to find the builds. +(note the canvas-like area in the middle prevents mouse wheel scrolling) -Basic building instructions are available in [BUILDING.md](docs/BUILDING.md) +A GitHub account is required in order to download these builds. ### Community chat From e6e3fb7ad3fa157813cb22c31d12779fb1216afa Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 17 Mar 2022 14:20:36 +0000 Subject: [PATCH 059/132] Change some text and docs Signed-off-by: falkTX --- README.md | 5 ++--- docs/DIFFERENCES.md | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c0f3336..9fdfa00 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,8 @@ Though currently the following should be noted: Cardinal releases have official builds for Linux, macOS and Windows. You can find these under https://github.com/DISTRHO/Cardinal/releases. -There are Linux builds for various architectures (armhf, arm64, i686 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. -Both macOS and Windows builds have an installer. - +There are Linux builds for various architectures (armhf, arm64, i686 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. +Both macOS and Windows builds have an installer. Install instructions are available [here](https://github.com/DISTRHO/Cardinal/wiki/Install). Note: Neither the macOS or Windows builds are signed, so expect warnings saying they are from an "untrusted developer". diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index 7f402a9..56b97a3 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -31,14 +31,14 @@ Bellow follows a list of features comparing the official plugin to Cardinal. | Supports BSD systems | No | Yes | Available as FreeBSD port | | Synth plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | FX plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | -| Raw-CV plugin variant | Unsupported | 8 audio IO + 10 CV IO | Available in JACK, LV2 and VST3 formats, not possible in VST2 | +| Raw-CV plugin variant | Unsupported | 8 audio IO + 10 CV IO | Available in JACK, LV2 and VST3 formats, not possible in AU and VST2 | | Arbitrary parameter automation | Yes | No | Unsupported in Cardinal, tricky to do for many plugin formats at once | | Integrated plugin host | No, Host payed separately | Yes, using Carla or Ildaeil | | | Host sync/timing | Using MIDI signals | Using dedicated module | | | Linux/X11 event handling | Runs on 2nd thread | Runs on main/GUI thread | | | v1 module compatibility | No | No, but with less restrictions | Module widgets can load resources at any point | | Online phone-home | Yes | No | Online access is strictly forbidden in Cardinal | -| Proper dark theme | No, only room brightness | Yes | CC-ND respected by leaving files intact, dark mode applied at runtime | +| Proper dark theme | No, only room brightness | Yes | All dark panel variants have explicit permission when required | | Proper Linux headless mode | No, always requires X11 | Yes | | Additionally, Cardinal contains the following built-in modules not present in the official plugin or standalone: From ef3ba8fee704c3de8cc19ea8dcb24b7c736d51e2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 17 Mar 2022 19:13:33 +0000 Subject: [PATCH 060/132] Fix maximumStringLength usage in jucewrapper, used for AU Signed-off-by: falkTX --- jucewrapper/CardinalWrapper.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 8503c06..d093389 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -69,7 +69,8 @@ protected: juce::String getName(const int maximumStringLength) const override { - DISTRHO_SAFE_ASSERT_RETURN(maximumStringLength > 0, {}); + if (maximumStringLength <= 0) + return juce::String(plugin.getParameterName(index).buffer()); return juce::String(plugin.getParameterName(index).buffer(), static_cast(maximumStringLength)); } @@ -111,8 +112,6 @@ protected: juce::String getText(const float normalizedValue, const int maximumStringLength) const override { - DISTRHO_SAFE_ASSERT_RETURN(maximumStringLength > 0, {}); - float value = ranges.getUnnormalizedValue(normalizedValue); if (hints & kParameterIsBoolean) @@ -130,7 +129,12 @@ protected: for (uint32_t i=0; i < enumValues.count; ++i) { if (d_isEqual(enumValues.values[i].value, value)) + { + if (maximumStringLength <= 0) + return juce::String(enumValues.values[i].label); + return juce::String(enumValues.values[i].label, static_cast(maximumStringLength)); + } } } @@ -140,6 +144,9 @@ protected: else text = juce::String(value); + if (maximumStringLength <= 0) + return text; + return juce::String(text.toRawUTF8(), static_cast(maximumStringLength)); } From 9c700d3bff24bd8907af1a10fdbd40ea35349d5b Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 17 Mar 2022 19:55:37 +0000 Subject: [PATCH 061/132] Fix location of carla files on the windows installers Signed-off-by: falkTX --- utils/inno/win32.iss | 8 ++++---- utils/inno/win64.iss | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index eb38a3e..31d5182 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -34,11 +34,11 @@ Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\iconengines"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\imageformats"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\platforms"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\styles"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; ; lv2 diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss index 38f371d..c57912f 100644 --- a/utils/inno/win64.iss +++ b/utils/inno/win64.iss @@ -35,11 +35,11 @@ Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; -Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\iconengines\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\iconengines"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\imageformats\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\imageformats"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\platforms\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\platforms"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\build\Carla\styles\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\styles"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion; ; lv2 From 5ebd513a38ede21081ff00e165c14f335e716dbf Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Mar 2022 13:59:56 +0000 Subject: [PATCH 062/132] A few extra rules for easier testing Signed-off-by: falkTX --- src/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Makefile b/src/Makefile index 13d59ba..4cc861c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -187,6 +187,20 @@ else $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) endif +lv2: $(TARGET) + $(MAKE) lv2 -C Cardinal + $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) lv2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) + +vst2: $(TARGET) + $(MAKE) vst2 -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) vst2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) + +vst3: $(TARGET) + $(MAKE) vst3 -C Cardinal + $(MAKE) vst3 -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) vst3 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) + clean: rm -f $(TARGET) rm -rf $(BUILD_DIR) From f59ff8f266b0fc69b99c21bceb01f110a729a0bf Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 18:08:41 +0000 Subject: [PATCH 063/132] Add jack standalone to windows installer Signed-off-by: falkTX --- Makefile | 11 ++++++++++- deps/PawPaw | 2 +- dpf | 2 +- src/Makefile | 3 +++ src/Makefile.cardinal.mk | 16 ++++++++++++++++ utils/distrho.ico | Bin 0 -> 103397 bytes utils/distrho.rc | 1 + utils/inno/win32.iss | 8 ++++++++ utils/inno/win64.iss | 8 ++++++++ 9 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 utils/distrho.ico create mode 100644 utils/distrho.rc diff --git a/Makefile b/Makefile index 63bed51..c52793a 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,15 @@ endif CARLA_EXTRA_ARGS += USING_JUCE=false CARLA_EXTRA_ARGS += USING_JUCE_GUI_EXTRA=false +# -------------------------------------------------------------- +# DGL config + +DGL_EXTRA_ARGS = \ + NVG_DISABLE_SKIPPING_WHITESPACE=true \ + NVG_FONT_TEXTURE_FLAGS=NVG_IMAGE_NEAREST \ + USE_NANOVG_FBO=true \ + WINDOWS_ICON_ID=401 + # -------------------------------------------------------------- # Check for system-wide dependencies @@ -196,7 +205,7 @@ endif dgl: ifneq ($(HEADLESS),true) - $(MAKE) -C dpf/dgl opengl NVG_DISABLE_SKIPPING_WHITESPACE=true NVG_FONT_TEXTURE_FLAGS=NVG_IMAGE_NEAREST USE_NANOVG_FBO=true + $(MAKE) -C dpf/dgl opengl $(DGL_EXTRA_ARGS) endif plugins: deps diff --git a/deps/PawPaw b/deps/PawPaw index a8b5691..3738f32 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit a8b569124ced5a712eee0177f315b9fc53e26cbd +Subproject commit 3738f32f133523c701393e1f9fd7248cddd1b488 diff --git a/dpf b/dpf index a449da1..ddf878c 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit a449da1881e3d5bffeb45be476ac34302870708d +Subproject commit ddf878c13a08dd212e3dcc3ce1bd708ea2373dbb diff --git a/src/Makefile b/src/Makefile index 4cc861c..d9e5ee6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -187,6 +187,9 @@ else $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) endif +jack: $(TARGET) + $(MAKE) jack -C Cardinal + lv2: $(TARGET) $(MAKE) lv2 -C Cardinal $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 7160b0b..5756bbd 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -85,6 +85,10 @@ FILES_UI = CardinalUI.cpp FILES_UI += Window.cpp endif +ifeq ($(WINDOWS),true) +FILES_UI += distrho.rc +endif + # -------------------------------------------------------------- # Extra libraries to link against @@ -298,6 +302,18 @@ lv2: $(LV2_RESOURCES) vst2: $(VST2_RESOURCES) vst3: $(VST3_RESOURCES) +# -------------------------------------------------------------- +# Extra rules for Windows icon + +ifeq ($(WINDOWS),true) +JACK_LIBS += -Wl,-subsystem,windows + +$(BUILD_DIR)/distrho.rc.o: ../../utils/distrho.rc ../../utils/distrho.ico + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling distrho.rc" + $(SILENT)$(WINDRES) $< -O coff -o $@ +endif + # -------------------------------------------------------------- $(TARGET_DIR)/%/template.vcv: ../template.vcv diff --git a/utils/distrho.ico b/utils/distrho.ico new file mode 100644 index 0000000000000000000000000000000000000000..85d2fd7b22895b137945c753c7612613f9ebdcfc GIT binary patch literal 103397 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 Date: Sat, 19 Mar 2022 20:48:19 +0000 Subject: [PATCH 064/132] Alternative way to deal with resizes in jucewrapper Signed-off-by: falkTX --- jucewrapper/CardinalWrapper.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index d093389..15561c2 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -525,6 +525,7 @@ static constexpr const fileRequestFunc nullFileRequestFunc = nullptr; // UI/editor implementation class CardinalWrapperEditor : public juce::AudioProcessorEditor, + private juce::AsyncUpdater, private juce::Timer { CardinalWrapperProcessor& cardinalProcessor; @@ -554,6 +555,22 @@ public: } protected: + void handleAsyncUpdate() override + { + DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); + + int width = static_cast(ui->getWidth()); + int height = static_cast(ui->getHeight()); + + #ifdef DISTRHO_OS_MAC + const double scaleFactor = ui->getScaleFactor(); + width /= scaleFactor; + height /= scaleFactor; + #endif + + setSize(width, height); + } + void timerCallback() override { if (ui == nullptr) @@ -639,21 +656,12 @@ private: cardinalProcessor.plugin.setState(key, value); } - static void setSizeFunc(void* const ptr, uint width, uint height) + static void setSizeFunc(void* const ptr, uint, uint) { CardinalWrapperEditor* const editor = static_cast(ptr); DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); - #ifdef DISTRHO_OS_MAC - UIExporter* const ui = editor->ui; - DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); - - const double scaleFactor = ui->getScaleFactor(); - width /= scaleFactor; - height /= scaleFactor; - #endif - - editor->setSize(static_cast(width), static_cast(height)); + editor->triggerAsyncUpdate(); } }; From 5e3e74c21809e09229067992e241f5b3b3b17a35 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 20:57:26 +0000 Subject: [PATCH 065/132] Cleanup Signed-off-by: falkTX --- jucewrapper/CardinalWrapper.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 15561c2..7b07525 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -264,14 +264,13 @@ public: updatedParameters(nullptr) { if (const double sampleRate = getSampleRate()) - plugin.setSampleRate(sampleRate); + if (sampleRate > 0.0) + plugin.setSampleRate(sampleRate); if (const int samplesPerBlock = getBlockSize()) if (samplesPerBlock > 0) plugin.setBufferSize(static_cast(samplesPerBlock)); - getBypassParameter(); - if (parameterCount != 0) { updatedParameters = new bool[parameterCount]; @@ -429,7 +428,7 @@ protected: juce::AudioProcessorParameter* getBypassParameter() const override { - return nullptr; + return bypassParameter; } juce::AudioProcessorEditor* createEditor() override; @@ -508,10 +507,13 @@ private: CardinalWrapperProcessor* const processor = static_cast(ptr); DISTRHO_SAFE_ASSERT_RETURN(processor != nullptr, false); + juce::MidiBuffer* const currentMidiMessages = processor->currentMidiMessages; + DISTRHO_SAFE_ASSERT_RETURN(currentMidiMessages != nullptr, false); + const uint8_t* const data = midiEvent.size > MidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data; - return processor->currentMidiMessages->addEvent(data, - static_cast(midiEvent.size), - static_cast(midiEvent.frame)); + return currentMidiMessages->addEvent(data, + static_cast(midiEvent.size), + static_cast(midiEvent.frame)); } }; From 3e4be7401fe0e30fbe8acc93174fe62527c98ec9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:00:32 +0000 Subject: [PATCH 066/132] Update AmalgamatedHarmonics Signed-off-by: falkTX --- plugins/AmalgamatedHarmonics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/AmalgamatedHarmonics b/plugins/AmalgamatedHarmonics index 35b89c9..21a0318 160000 --- a/plugins/AmalgamatedHarmonics +++ b/plugins/AmalgamatedHarmonics @@ -1 +1 @@ -Subproject commit 35b89c93152ac2194eecffbd4aa39e71caa90cc0 +Subproject commit 21a031870db2068a98d9690eaffc24bbbfc99c2e From e6e24537ca1415d481564683678a4892f57362e0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:06:17 +0000 Subject: [PATCH 067/132] Update BaconPlugs, Befaco and Bidoo Signed-off-by: falkTX --- plugins/BaconPlugs | 2 +- plugins/Befaco | 2 +- plugins/Bidoo | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/BaconPlugs b/plugins/BaconPlugs index 0a6c390..9d35b74 160000 --- a/plugins/BaconPlugs +++ b/plugins/BaconPlugs @@ -1 +1 @@ -Subproject commit 0a6c390eedf98884393f82cb066038a78a316ea5 +Subproject commit 9d35b745af8569d6a9d6bc5c3f2c3e64c852d8e0 diff --git a/plugins/Befaco b/plugins/Befaco index 0cff3b0..7e0b020 160000 --- a/plugins/Befaco +++ b/plugins/Befaco @@ -1 +1 @@ -Subproject commit 0cff3b0281873a97831dd51a03ad5cd92ce83c0e +Subproject commit 7e0b020000225e3d2aecba3f09054595339fe540 diff --git a/plugins/Bidoo b/plugins/Bidoo index e55fcd2..07cc605 160000 --- a/plugins/Bidoo +++ b/plugins/Bidoo @@ -1 +1 @@ -Subproject commit e55fcd2e1d7c0fef69d4919baac6f791172c89ca +Subproject commit 07cc6054e39d2832a32a51cfe56bb0b700cb8eb5 From 7acc842b1daa8e6c32ee6653c56d8333da010dac Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:07:45 +0000 Subject: [PATCH 068/132] Update bogaudio Signed-off-by: falkTX --- plugins/BogaudioModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/BogaudioModules b/plugins/BogaudioModules index 8e982f4..a86e7d7 160000 --- a/plugins/BogaudioModules +++ b/plugins/BogaudioModules @@ -1 +1 @@ -Subproject commit 8e982f462c4117f84794cbf6a13740992ff17d92 +Subproject commit a86e7d7b18e0c7cb6e857df36263b0e85bf85566 From a0f844c3900a9ef6e67f030edf91eed3488ed5ec Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:18:24 +0000 Subject: [PATCH 069/132] Update GlueTheGiant and GrandeModular Signed-off-by: falkTX --- plugins/GlueTheGiant | 2 +- plugins/GrandeModular | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GlueTheGiant b/plugins/GlueTheGiant index 54fed7f..2c535bc 160000 --- a/plugins/GlueTheGiant +++ b/plugins/GlueTheGiant @@ -1 +1 @@ -Subproject commit 54fed7f78bbaac1f1d6275aa737acc39aebc6e72 +Subproject commit 2c535bc38d61fd4d776aad7307c1dfbbed062b66 diff --git a/plugins/GrandeModular b/plugins/GrandeModular index 33f445d..b0d8a6f 160000 --- a/plugins/GrandeModular +++ b/plugins/GrandeModular @@ -1 +1 @@ -Subproject commit 33f445d1e3f78aa1f62c8995010303bdb42e0163 +Subproject commit b0d8a6fcdb28d2e56d6b024326a7378a2c8ee45d From 5b2f4f9cc831d1f57650acf794965e4fb93e24c3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:20:55 +0000 Subject: [PATCH 070/132] Update HetrickCV and ImpromptuModular Signed-off-by: falkTX --- plugins/HetrickCV | 2 +- plugins/ImpromptuModular | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/HetrickCV b/plugins/HetrickCV index 2fc83df..6eb1492 160000 --- a/plugins/HetrickCV +++ b/plugins/HetrickCV @@ -1 +1 @@ -Subproject commit 2fc83df75154c32b83addd3ed68b35eb6156ca0d +Subproject commit 6eb1492ac21e5fc154bca34c626101ab5e2ee6e2 diff --git a/plugins/ImpromptuModular b/plugins/ImpromptuModular index 368cbd6..2bd5691 160000 --- a/plugins/ImpromptuModular +++ b/plugins/ImpromptuModular @@ -1 +1 @@ -Subproject commit 368cbd6ee17398c7329b263dde0409bf7a57ce3b +Subproject commit 2bd5691c8f12e21e1e6db33e42fe2fe3db7726a3 From 5cf912346b73ad1e53db8f38c2ddeea49b3a19f2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:33:59 +0000 Subject: [PATCH 071/132] Update LyraeModules, MindMeldModular and Mog Signed-off-by: falkTX --- .gitmodules | 2 +- plugins/LyraeModules | 2 +- plugins/MindMeldModular | 2 +- plugins/Mog | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 373a11d..5eef79b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -84,7 +84,7 @@ url = https://gitlab.com/sonusdept/sonusmodular.git [submodule "plugins/Mog"] path = plugins/Mog - url = https://github.com/CardinalModules/Mog-VCV.git + url = https://github.com/JustMog/Mog-VCV.git [submodule "plugins/ChowDSP"] path = plugins/ChowDSP url = https://github.com/jatinchowdhury18/ChowDSP-VCV.git diff --git a/plugins/LyraeModules b/plugins/LyraeModules index 1c32b02..a239b82 160000 --- a/plugins/LyraeModules +++ b/plugins/LyraeModules @@ -1 +1 @@ -Subproject commit 1c32b02bd11a549d28da0620719541ac6f966652 +Subproject commit a239b823cea2bbde28ae2a9299f51f01c95b7b93 diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index 38e72d4..a721e38 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit 38e72d454ddb1197ec8225224656135abe6b6609 +Subproject commit a721e381fa1d72d738c9c2daae08c740107e3d5e diff --git a/plugins/Mog b/plugins/Mog index 01c4fac..00a7e3b 160000 --- a/plugins/Mog +++ b/plugins/Mog @@ -1 +1 @@ -Subproject commit 01c4fac9f2e91f60125d36767224f457b2057fb7 +Subproject commit 00a7e3b01f56da5cfc86720ae6951ecdf8953ee5 From 15efe43959a68bc1326f3ff300e51d6d0b0cd32a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:41:44 +0000 Subject: [PATCH 072/132] Update MSM, Prism, nonlinearcircuits and repelzen Signed-off-by: falkTX --- plugins/MSM | 2 +- plugins/Prism | 2 +- plugins/nonlinearcircuits | 2 +- plugins/repelzen | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/MSM b/plugins/MSM index 80b4a5a..abe3c24 160000 --- a/plugins/MSM +++ b/plugins/MSM @@ -1 +1 @@ -Subproject commit 80b4a5aa06d9c4a58f62d90fe567b28b01f6312d +Subproject commit abe3c24d40b11d31f9f38b2125eff9280c77ad1b diff --git a/plugins/Prism b/plugins/Prism index 453da22..8a9cc03 160000 --- a/plugins/Prism +++ b/plugins/Prism @@ -1 +1 @@ -Subproject commit 453da225742f3829ba037770245333a28751fbb8 +Subproject commit 8a9cc034d905079f156ed6c64efaeb4baf81490f diff --git a/plugins/nonlinearcircuits b/plugins/nonlinearcircuits index d7c3763..57eb090 160000 --- a/plugins/nonlinearcircuits +++ b/plugins/nonlinearcircuits @@ -1 +1 @@ -Subproject commit d7c3763ba3f801a3cfe98c49dfb7419a1477fd46 +Subproject commit 57eb090f233c21b2edee541ea17d800f22045d91 diff --git a/plugins/repelzen b/plugins/repelzen index 185e07e..f812cc5 160000 --- a/plugins/repelzen +++ b/plugins/repelzen @@ -1 +1 @@ -Subproject commit 185e07ea94086a04b3daacb4bf94c0fbd3544725 +Subproject commit f812cc56b7fe9e41bb13da99ef23f014015c86c1 From ea3460537c7b00f55908b9a910385866e38d807e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 21:51:02 +0000 Subject: [PATCH 073/132] Update ValleyAudio and voxglitch Signed-off-by: falkTX --- plugins/ValleyAudio | 2 +- plugins/voxglitch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ValleyAudio b/plugins/ValleyAudio index c05209a..98698dc 160000 --- a/plugins/ValleyAudio +++ b/plugins/ValleyAudio @@ -1 +1 @@ -Subproject commit c05209a6ad74e8b99703a033842797f06515f865 +Subproject commit 98698dc28e6ed7aec56e4ab8280171a160d673ef diff --git a/plugins/voxglitch b/plugins/voxglitch index 3281fd3..03f4fc5 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit 3281fd38883576ad3afaf96bf6b10639345a4f25 +Subproject commit 03f4fc5cebb5d8eb152ac59d3a51ce0ec87a2740 From 1d27a884a82b7d2f0cd8949fb6a6b42d7420f9e5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 22:08:59 +0000 Subject: [PATCH 074/132] Correct hash used for hetrickcv Signed-off-by: falkTX --- plugins/HetrickCV | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/HetrickCV b/plugins/HetrickCV index 6eb1492..2fc83df 160000 --- a/plugins/HetrickCV +++ b/plugins/HetrickCV @@ -1 +1 @@ -Subproject commit 6eb1492ac21e5fc154bca34c626101ab5e2ee6e2 +Subproject commit 2fc83df75154c32b83addd3ed68b35eb6156ca0d From 0e43d41645b061c2d9f3904fa16425b1f44d3ce8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 19 Mar 2022 22:15:10 +0000 Subject: [PATCH 075/132] Fixes to get it building and running again after module updates Signed-off-by: falkTX --- plugins/LyraeModules | 2 +- plugins/Makefile | 18 ++++++++++++++++-- plugins/plugins.cpp | 5 ++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/plugins/LyraeModules b/plugins/LyraeModules index a239b82..b21cbe8 160000 --- a/plugins/LyraeModules +++ b/plugins/LyraeModules @@ -1 +1 @@ -Subproject commit a239b823cea2bbde28ae2a9299f51f01c95b7b93 +Subproject commit b21cbe8ee25ddf2a927e0b4ec9f2c97c115857af diff --git a/plugins/Makefile b/plugins/Makefile index db2289e..ab9c9d6 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -431,7 +431,7 @@ BEFACO_CUSTOM = ADSR Mixer # -------------------------------------------------------------- # Bidoo -PLUGIN_FILES += $(filter-out Bidoo/src/plugin.cpp Bidoo/src/ANTN.cpp,$(wildcard Bidoo/src/*.cpp)) +PLUGIN_FILES += $(filter-out Bidoo/src/ANTN.cpp,$(wildcard Bidoo/src/*.cpp)) PLUGIN_FILES += $(wildcard Bidoo/src/dep/*.cpp) PLUGIN_FILES += $(wildcard Bidoo/src/dep/filters/*.cpp) PLUGIN_FILES += $(wildcard Bidoo/src/dep/freeverb/*.cpp) @@ -439,7 +439,7 @@ PLUGIN_FILES += $(wildcard Bidoo/src/dep/lodepng/*.cpp) PLUGIN_FILES += $(filter-out Bidoo/src/dep/resampler/main.cpp,$(wildcard Bidoo/src/dep/resampler/*.cpp)) # modules/types which are present in other plugins -BIDOO_CUSTOM = ChannelDisplay LadderFilter $(DRWAV) +BIDOO_CUSTOM = ChannelDisplay InstantiateExpanderItem LadderFilter $(DRWAV) BIDOO_CUSTOM_PER_FILE = channel channel filterType # -------------------------------------------------------------- @@ -1295,6 +1295,20 @@ $(BUILD_DIR)/Befaco/%.cpp.o: Befaco/%.cpp $(foreach m,$(BEFACO_CUSTOM),$(call custom_module_names,$(m),Befaco)) \ -DpluginInstance=pluginInstance__Befaco +$(BUILD_DIR)/Bidoo/src/plugin.cpp.o: Bidoo/src/plugin.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(BIDOO_CUSTOM),$(call custom_module_names,$(m),Bidoo)) \ + -DpluginInstance=pluginInstance__Bidoo \ + -Dinit=init__Bidoo \ + -DSKIP_MINGW_FORMAT \ + -IBidoo/src/dep/gverb/include \ + -Wno-ignored-qualifiers \ + -Wno-sign-compare \ + -Wno-unused-function \ + -UBUILDING_PLUGIN_MODULES + $(BUILD_DIR)/Bidoo/%.cpp.o: Bidoo/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index b789e26..e8ebb7a 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -697,7 +697,7 @@ extern Plugin* pluginInstance__Autinn; Plugin* pluginInstance__Axioma; Plugin* pluginInstance__Bacon; Plugin* pluginInstance__Befaco; -Plugin* pluginInstance__Bidoo; +extern Plugin* pluginInstance__Bidoo; Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__CatroModulo; Plugin* pluginInstance__cf; @@ -1204,6 +1204,7 @@ static void initStatic__Bidoo() p->addModel(modelDTROY); p->addModel(modelBORDL); p->addModel(modelZOUMAI); + p->addModel(modelZOUMAIExpander); p->addModel(modelMU); p->addModel(modelCHUTE); p->addModel(modelLOURDE); @@ -1687,6 +1688,7 @@ static void initStatic__GrandeModular() { p->addModel(modelClip); p->addModel(modelLFO3); + p->addModel(modelLFO4); p->addModel(modelLogic); p->addModel(modelMerge8); p->addModel(modelMergeSplit4); @@ -1696,6 +1698,7 @@ static void initStatic__GrandeModular() p->addModel(modelPeak); p->addModel(modelPolyMergeResplit); p->addModel(modelPolySplit); + p->addModel(modelPush); p->addModel(modelQuant); p->addModel(modelQuantIntervals); p->addModel(modelQuantMT); From 5fc282b84f24949aa3fd89e3f7b25d1c95321d1d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 00:55:11 +0000 Subject: [PATCH 076/132] Fix build with upstream Mog --- plugins/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index ab9c9d6..8638aa9 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -994,6 +994,7 @@ PLUGIN_LIST = $(subst /plugin.json,,$(wildcard */plugin.json)) endif UNWANTED_FILES = HetrickCV/res/illustrator - deprecated/MyModule.svg +UNWANTED_FILES += $(wildcard Mog/res/*) UNWANTED_FILES += $(wildcard nonlinearcircuits/res/*) RESOURCE_FILES = \ @@ -1022,6 +1023,7 @@ RESOURCE_FILES += MindMeldModular/res/ShapeMaster/CommunityPresets RESOURCE_FILES += MindMeldModular/res/ShapeMaster/CommunityShapes RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldPresets RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldShapes +RESOURCE_FILES += Mog/res RESOURCE_FILES += nonlinearcircuits/res RESOURCE_FILES += ParableInstruments/res/Neil.png From f1b66f66f7f21f598c75498a4197b595bd1a6b44 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 03:39:20 +0000 Subject: [PATCH 077/132] Fixup for module updates --- plugins/BidooDark/plugin.cpp | 34 ++++++++++++++++++++++++++++++++++ plugins/Makefile | 20 ++++---------------- plugins/plugins.cpp | 2 +- 3 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 plugins/BidooDark/plugin.cpp diff --git a/plugins/BidooDark/plugin.cpp b/plugins/BidooDark/plugin.cpp new file mode 100644 index 0000000..f0a0c0c --- /dev/null +++ b/plugins/BidooDark/plugin.cpp @@ -0,0 +1,34 @@ +#include "../Bidoo/src/plugin.hpp" +#undef ModuleWidget + +void InstantiateExpanderItem::onAction(const event::Action &e) { + engine::Module* module = model->createModule(); + APP->engine->addModule(module); + ModuleWidget* mw = model->createModuleWidget(module); + if (mw) { + APP->scene->rack->setModulePosNearest(mw, posit); + APP->scene->rack->addModule(mw); + history::ModuleAdd *h = new history::ModuleAdd; + h->name = "create expander module"; + h->setModule(mw); + APP->history->push(h); + } +} + +json_t* BidooModule::dataToJson() { + return nullptr; +} + +void BidooModule::dataFromJson(json_t*) { +} + +void BidooWidget::appendContextMenu(Menu*) { +} + +void BidooWidget::prepareThemes(const std::string& filename) { + setPanel(APP->window->loadSvg(filename)); +} + +void BidooWidget::step() { + CardinalModuleWidget::step(); +} diff --git a/plugins/Makefile b/plugins/Makefile index 8638aa9..30d7230 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -431,12 +431,13 @@ BEFACO_CUSTOM = ADSR Mixer # -------------------------------------------------------------- # Bidoo -PLUGIN_FILES += $(filter-out Bidoo/src/ANTN.cpp,$(wildcard Bidoo/src/*.cpp)) +PLUGIN_FILES += $(filter-out Bidoo/src/plugin.cpp Bidoo/src/ANTN.cpp,$(wildcard Bidoo/src/*.cpp)) PLUGIN_FILES += $(wildcard Bidoo/src/dep/*.cpp) PLUGIN_FILES += $(wildcard Bidoo/src/dep/filters/*.cpp) PLUGIN_FILES += $(wildcard Bidoo/src/dep/freeverb/*.cpp) PLUGIN_FILES += $(wildcard Bidoo/src/dep/lodepng/*.cpp) PLUGIN_FILES += $(filter-out Bidoo/src/dep/resampler/main.cpp,$(wildcard Bidoo/src/dep/resampler/*.cpp)) +PLUGIN_FILES += BidooDark/plugin.cpp # modules/types which are present in other plugins BIDOO_CUSTOM = ChannelDisplay InstantiateExpanderItem LadderFilter $(DRWAV) @@ -1297,21 +1298,7 @@ $(BUILD_DIR)/Befaco/%.cpp.o: Befaco/%.cpp $(foreach m,$(BEFACO_CUSTOM),$(call custom_module_names,$(m),Befaco)) \ -DpluginInstance=pluginInstance__Befaco -$(BUILD_DIR)/Bidoo/src/plugin.cpp.o: Bidoo/src/plugin.cpp - -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" - @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ - $(foreach m,$(BIDOO_CUSTOM),$(call custom_module_names,$(m),Bidoo)) \ - -DpluginInstance=pluginInstance__Bidoo \ - -Dinit=init__Bidoo \ - -DSKIP_MINGW_FORMAT \ - -IBidoo/src/dep/gverb/include \ - -Wno-ignored-qualifiers \ - -Wno-sign-compare \ - -Wno-unused-function \ - -UBUILDING_PLUGIN_MODULES - -$(BUILD_DIR)/Bidoo/%.cpp.o: Bidoo/%.cpp +$(BUILD_DIR)/Bidoo%.cpp.o: Bidoo%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ @@ -1456,6 +1443,7 @@ $(BUILD_DIR)/GrandeModular/%.cpp.o: GrandeModular/%.cpp $(foreach m,$(GRANDEMODULAR_CUSTOM),$(call custom_module_names,$(m),GrandeModular)) \ -DpluginInstance=pluginInstance__GrandeModular \ -Wno-missing-braces \ + -Wno-narrowing \ -Wno-self-assign $(BUILD_DIR)/HamptonHarmonics/%.cpp.o: HamptonHarmonics/%.cpp diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index e8ebb7a..468a76c 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -697,7 +697,7 @@ extern Plugin* pluginInstance__Autinn; Plugin* pluginInstance__Axioma; Plugin* pluginInstance__Bacon; Plugin* pluginInstance__Befaco; -extern Plugin* pluginInstance__Bidoo; +Plugin* pluginInstance__Bidoo; Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__CatroModulo; Plugin* pluginInstance__cf; From 5a64561def1607a0c5b751d0fcd38b2c7d1e1fea Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 14:37:10 +0000 Subject: [PATCH 078/132] Revert "Alternative way to deal with resizes in jucewrapper" This reverts commit e4c04c507468aece305c7f96832aca75d07f941c. --- jucewrapper/CardinalWrapper.cpp | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 7b07525..c4da989 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -527,7 +527,6 @@ static constexpr const fileRequestFunc nullFileRequestFunc = nullptr; // UI/editor implementation class CardinalWrapperEditor : public juce::AudioProcessorEditor, - private juce::AsyncUpdater, private juce::Timer { CardinalWrapperProcessor& cardinalProcessor; @@ -557,22 +556,6 @@ public: } protected: - void handleAsyncUpdate() override - { - DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); - - int width = static_cast(ui->getWidth()); - int height = static_cast(ui->getHeight()); - - #ifdef DISTRHO_OS_MAC - const double scaleFactor = ui->getScaleFactor(); - width /= scaleFactor; - height /= scaleFactor; - #endif - - setSize(width, height); - } - void timerCallback() override { if (ui == nullptr) @@ -658,12 +641,21 @@ private: cardinalProcessor.plugin.setState(key, value); } - static void setSizeFunc(void* const ptr, uint, uint) + static void setSizeFunc(void* const ptr, uint width, uint height) { CardinalWrapperEditor* const editor = static_cast(ptr); DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); - editor->triggerAsyncUpdate(); + #ifdef DISTRHO_OS_MAC + UIExporter* const ui = editor->ui; + DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); + + const double scaleFactor = ui->getScaleFactor(); + width /= scaleFactor; + height /= scaleFactor; + #endif + + editor->setSize(static_cast(width), static_cast(height)); } }; From e979ee2fba21d9f44ea41adbb2dc54de7de95119 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 14:46:19 +0000 Subject: [PATCH 079/132] Fix Mog res --- plugins/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Makefile b/plugins/Makefile index 30d7230..2469f94 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -996,6 +996,7 @@ endif UNWANTED_FILES = HetrickCV/res/illustrator - deprecated/MyModule.svg UNWANTED_FILES += $(wildcard Mog/res/*) +UNWANTED_FILES += $(wildcard Mog/res/*/*) UNWANTED_FILES += $(wildcard nonlinearcircuits/res/*) RESOURCE_FILES = \ From 26afe726491eb689744f57b5370a286f37e76234 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 14:54:18 +0000 Subject: [PATCH 080/132] Remove workaround for VST2 uppercase keys, as it breaks some hosts --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index ddf878c..a941917 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit ddf878c13a08dd212e3dcc3ce1bd708ea2373dbb +Subproject commit a941917f15be21e6bdce6793addec225537cccc5 From ff779b917936aa51361e2d64336179b99c897c9f Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 18:54:22 +0000 Subject: [PATCH 081/132] Fix color for new Bidoo (expander) module --- src/custom/dep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index c13442f..79f3408 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -140,6 +140,7 @@ static const struct { { "/Bidoo/res/VOID.svg", {}, -1 }, { "/Bidoo/res/ZINC.svg", {}, -1 }, { "/Bidoo/res/ZOUMAI.svg", {}, -1 }, + { "/Bidoo/res/ZOUMAIExpander.svg", {}, -1 }, // BSD-3-Clause { "/cf/res/ALGEBRA.svg", {}, -1 }, { "/cf/res/BUFFER.svg", {}, -1 }, From 0d24cfb1f8e6ba9aa5917160195811218f115c2e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 19:10:45 +0000 Subject: [PATCH 082/132] Adjust for new dark widgets in bidoo --- src/custom/dep.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 79f3408..6e26b1f 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -336,10 +336,25 @@ static inline bool invertPaint(NSVGshape* const shape, NSVGpaint& paint, const c return false; // Special case for Bidoo red color - if (paint.color == 0xff001fcd && svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/Bidoo/", 7) == 0) + if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/Bidoo/", 7) == 0) { - paint.color = 0xcf8b94c4; - return true; + if (paint.color == 0xff001fcd) + { + paint.color = 0xcf8b94c4; + return true; + } + if (paint.color == 0xff000000 && shape->stroke.type == NSVG_PAINT_COLOR) + { + switch (shape->stroke.color) + { + case 0xff777777: + case 0xff7c7c7c: + case 0xff828282: + case 0xffb1b1b1: + case 0xffb2b2b2: + return false; + } + } } // Special case for JW-Modules colors From faeaa5862c43acdaac5aa21a7f432862dd220f06 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 21:24:10 +0000 Subject: [PATCH 083/132] Initial bypass implementation, MIDI only for now --- plugins/Cardinal/src/HostAudio.cpp | 2 +- plugins/Cardinal/src/plugincontext.hpp | 2 +- src/CardinalPlugin.cpp | 50 +++++++++++++++++++++++--- src/PluginContext.hpp | 3 +- 4 files changed, 50 insertions(+), 7 deletions(-) diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index 8e12603..4578a7f 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -139,7 +139,7 @@ struct HostAudio2 : HostAudio<2> { resetMeters = true; } - void processTerminalOutput(const ProcessArgs&) + void processTerminalOutput(const ProcessArgs&) override { const int blockFrames = pcontext->engine->getBlockFrames(); diff --git a/plugins/Cardinal/src/plugincontext.hpp b/plugins/Cardinal/src/plugincontext.hpp index 2d0eeba..dcba23b 100644 --- a/plugins/Cardinal/src/plugincontext.hpp +++ b/plugins/Cardinal/src/plugincontext.hpp @@ -55,7 +55,7 @@ struct CardinalPluginContext : rack::Context { double sampleRate; float parameters[kModuleParameters]; CardinalVariant variant; - bool playing, reset, bbtValid; + bool bypassed, playing, reset, bbtValid; int32_t bar, beat, beatsPerBar, beatType; uint64_t frame; double barStartTick, beatsPerMinute; diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index b7fab0f..4bfc747 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -343,6 +343,9 @@ struct Initializer void CardinalPluginContext::writeMidiMessage(const rack::midi::Message& message, const uint8_t channel) { + if (bypassed) + return; + const size_t size = message.bytes.size(); DISTRHO_SAFE_ASSERT_RETURN(size > 0,); DISTRHO_SAFE_ASSERT_RETURN(message.frame >= 0,); @@ -429,6 +432,7 @@ class CardinalPlugin : public CardinalBasePlugin #if DISTRHO_PLUGIN_NUM_INPUTS != 0 /* If host audio ins == outs we can get issues for inplace processing. * So allocate a float array that will serve as safe copy for those cases. + * Also used for bypass, so inputs are fully zero. */ float** fAudioBufferCopy; #endif @@ -439,6 +443,10 @@ class CardinalPlugin : public CardinalBasePlugin String fStateScreenshot; String fWindowSize; + // bypass handling + bool fWasBypassed; + MidiEvent bypassMidiEvents[16]; + #ifndef HEADLESS // real values, not VCV interpreted ones float fWindowParameters[kWindowParameterCount]; @@ -451,7 +459,8 @@ public: #if DISTRHO_PLUGIN_NUM_INPUTS != 0 fAudioBufferCopy(nullptr), #endif - fPreviousFrame(0) + fPreviousFrame(0), + fWasBypassed(false) { #ifndef HEADLESS fWindowParameters[kWindowParameterShowTooltips] = 1.0f; @@ -485,6 +494,16 @@ public: } } DISTRHO_SAFE_EXCEPTION("create unique temporary path"); + // initialize midi events used when entering bypassed state + std::memset(bypassMidiEvents, 0, sizeof(bypassMidiEvents)); + + for (uint8_t i=0; i<16; ++i) + { + bypassMidiEvents[i].size = 3; + bypassMidiEvents[i].data[0] = 0xB0 + i; + bypassMidiEvents[i].data[1] = 0x7B; + } + const float sampleRate = getSampleRate(); rack::settings::sampleRate = sampleRate; @@ -773,7 +792,7 @@ protected: // bypass if (index == kModuleParameters) - return 0.0f; + return context->bypassed ? 1.0f : 0.0f; #ifndef HEADLESS // window related parameters @@ -797,7 +816,10 @@ protected: // bypass if (index == kModuleParameters) + { + context->bypassed = value > 0.5f; return; + } #ifndef HEADLESS // window related parameters @@ -924,6 +946,8 @@ protected: { rack::contextSet(context); + const bool bypassed = context->bypassed; + { const TimePosition& timePos(getTimePosition()); @@ -977,10 +1001,28 @@ protected: for (int i=0; imidiEvents = midiEvents; - context->midiEventCount = midiEventCount; + if (bypassed) + { + if (fWasBypassed != bypassed) + { + context->midiEvents = bypassMidiEvents; + context->midiEventCount = 16; + } + else + { + context->midiEvents = nullptr; + context->midiEventCount = 0; + } + } + else + { + context->midiEvents = midiEvents; + context->midiEventCount = midiEventCount; + } context->engine->stepBlock(frames); + + fWasBypassed = bypassed; } void bufferSizeChanged(const uint32_t newBufferSize) override diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index da29fa4..e140759 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -52,7 +52,7 @@ struct CardinalPluginContext : rack::Context { double sampleRate; float parameters[kModuleParameters]; CardinalVariant variant; - bool playing, reset, bbtValid; + bool bypassed, playing, reset, bbtValid; int32_t bar, beat, beatsPerBar, beatType; uint64_t frame; double barStartTick, beatsPerMinute; @@ -79,6 +79,7 @@ struct CardinalPluginContext : rack::Context { #else #error cardinal variant not set #endif + bypassed(false), playing(false), reset(false), bbtValid(false), From 72f42baac75f5be0a3b16dd0141986194040b58c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Mar 2022 21:42:15 +0000 Subject: [PATCH 084/132] Remove a comment, doesnt apply yet --- src/CardinalPlugin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 4bfc747..f949f80 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -432,7 +432,6 @@ class CardinalPlugin : public CardinalBasePlugin #if DISTRHO_PLUGIN_NUM_INPUTS != 0 /* If host audio ins == outs we can get issues for inplace processing. * So allocate a float array that will serve as safe copy for those cases. - * Also used for bypass, so inputs are fully zero. */ float** fAudioBufferCopy; #endif From e68b175101ec01981ec124711ac70bf63525e2d1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 21 Mar 2022 12:56:25 +0000 Subject: [PATCH 085/132] Reorganize README Signed-off-by: falkTX --- README.md | 86 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 9fdfa00..8568088 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,40 @@ All VCV branding has been removed (to the best of our knowledge) in order to avo The VST3 version is in progress, already part of the build but still experimental. +## Current status + +With the exception of a few bugs, Cardinal can be considered stable. +Though currently the following should be noted: + +- Keyboard input does not always work in some hosts [#24](https://github.com/DISTRHO/Cardinal/issues/24) +- VST3 support incomplete/experimental [#41](https://github.com/DISTRHO/Cardinal/issues/41) +- Windows 32bit builds do not work well [#80](https://github.com/DISTRHO/Cardinal/issues/80) +- Windows High-DPI issues [#186](https://github.com/DISTRHO/Cardinal/issues/186) + +### Stable release + +Cardinal releases have official builds for Linux, macOS and Windows. +You can find these under https://github.com/DISTRHO/Cardinal/releases. + +There are Linux builds for various architectures (armhf, arm64, i686 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. +Both macOS and Windows builds have an installer. +Install instructions are available [here](https://github.com/DISTRHO/Cardinal/wiki/Install). + +Note: Neither the macOS or Windows builds are signed, so expect warnings saying they are from an "untrusted developer". + +### Nightly builds + +You can find builds for pretty much any recent Cardinal commit [here](https://github.com/DISTRHO/Cardinal/actions/workflows/build.yml). +Just click on any successful build, and scroll to the bottom to find the builds. +(note the canvas-like area in the middle prevents mouse wheel scrolling) + +A GitHub account is required in order to download these builds. + +### Building + +Basic building instructions are available in [BUILDING.md](docs/BUILDING.md). + + ## Plugin variants Cardinal provides 3 plugin variants - "main", Synth and FX. @@ -70,46 +104,6 @@ But a couple of modules background's have their colors flipped, because damn we ![screenshot](docs/Screenshot_Carla+Ildaeil.png "Screenshot") -## Current status - -With the exception of a few bugs, Cardinal can be considered stable. -Though currently the following should be noted: - -- Keyboard input does not always work in some hosts [#24](https://github.com/DISTRHO/Cardinal/issues/24) -- VST3 support incomplete/experimental [#41](https://github.com/DISTRHO/Cardinal/issues/41) -- Windows 32bit builds do not work well [#80](https://github.com/DISTRHO/Cardinal/issues/80) - -### Stable release - -Cardinal releases have official builds for Linux, macOS and Windows. -You can find these under https://github.com/DISTRHO/Cardinal/releases. - -There are Linux builds for various architectures (armhf, arm64, i686 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. -Both macOS and Windows builds have an installer. -Install instructions are available [here](https://github.com/DISTRHO/Cardinal/wiki/Install). - -Note: Neither the macOS or Windows builds are signed, so expect warnings saying they are from an "untrusted developer". - -### Nightly builds - -You can find builds for pretty much any recent Cardinal commit [here](https://github.com/DISTRHO/Cardinal/actions/workflows/build.yml). -Just click on any successful build, and scroll to the bottom to find the builds. -(note the canvas-like area in the middle prevents mouse wheel scrolling) - -A GitHub account is required in order to download these builds. - -### Community chat - -Currently we are all on #cardinal IRC room in irc.libera.chat server. -Come join us in your favorite IRC client or through a Matrix bridge. - - -## License - -Cardinal is licensed under GPLv3+, see [LICENSE](LICENSE) for more details. -An overview of the included code and linked submodules can be seen [here](docs/LICENSES.md#code-license--binary). - - ## Included modules At the moment the following 3rd-party modules are provided: @@ -241,3 +235,15 @@ Cardinal and Rack should be able to co-exist friendly and peacefully, as they cl It is likely most people will prefer to use Rack Pro for its official support and its big module collection (including commercial ones). A feature comparison between Cardinal and Rack Pro can be seen [here](docs/DIFFERENCES.md). + + +## License + +Cardinal is licensed under GPLv3+, see [LICENSE](LICENSE) for more details. +An overview of the included code and linked submodules can be seen [here](docs/LICENSES.md#code-license--binary). + + +## Community chat + +Currently we are all on #cardinal IRC room in irc.libera.chat server. +Come join us in your favorite IRC client or through a Matrix bridge. From dbbc955df628a2d815145241d91f9aceb62df217 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 22 Mar 2022 11:46:19 +0000 Subject: [PATCH 086/132] Small headless optimizations Signed-off-by: falkTX --- plugins/Cardinal/src/HostAudio.cpp | 47 +++++++++++++++++++++---- plugins/Cardinal/src/HostCV.cpp | 12 +++++++ plugins/Cardinal/src/HostMIDI.cpp | 12 +++++++ plugins/Cardinal/src/HostParameters.cpp | 11 +++--- plugins/Cardinal/src/HostTime.cpp | 18 ++++++++++ plugins/Cardinal/src/Widgets.hpp | 2 ++ 6 files changed, 92 insertions(+), 10 deletions(-) diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index 4578a7f..6b022ad 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -29,6 +29,8 @@ struct HostAudio : TerminalModule { const int numParams; const int numInputs; const int numOutputs; + bool bypassed = false; + bool in2connected = false; int dataFrame = 0; int64_t lastBlockFrame = -1; @@ -74,8 +76,12 @@ struct HostAudio : TerminalModule { // only checked on input if (lastBlockFrame != blockFrame) { + bypassed = isBypassed(); dataFrame = 0; lastBlockFrame = blockFrame; + + if (numIO == 2) + in2connected = inputs[1].isConnected(); } // only incremented on output @@ -83,7 +89,7 @@ struct HostAudio : TerminalModule { DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); // from host into cardinal, shows as output plug - if (isBypassed()) + if (bypassed) { for (int i=0; i { +#ifndef HEADLESS // for stereo meter int internalDataFrame = 0; float internalDataBuffer[2][128]; volatile bool resetMeters = true; float gainMeterL = 0.0f; float gainMeterR = 0.0f; +#endif HostAudio2() : HostAudio<2>() { +#ifndef HEADLESS std::memset(internalDataBuffer, 0, sizeof(internalDataBuffer)); +#endif } +#ifndef HEADLESS void onReset() override { HostAudio<2>::onReset(); @@ -138,6 +149,7 @@ struct HostAudio2 : HostAudio<2> { HostAudio<2>::onSampleRateChange(e); resetMeters = true; } +#endif void processTerminalOutput(const ProcessArgs&) override { @@ -147,7 +159,7 @@ struct HostAudio2 : HostAudio<2> { const int k = dataFrame++; DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); - if (isBypassed()) + if (bypassed) return; float** const dataOuts = pcontext->dataOuts; @@ -155,9 +167,6 @@ struct HostAudio2 : HostAudio<2> { // gain (stereo variant only) const float gain = std::pow(params[0].getValue(), 2.f); - // left/mono check - const bool in2connected = inputs[1].isConnected(); - // read stereo values float valueL = inputs[0].getVoltageSum() * 0.1f; float valueR = inputs[1].getVoltageSum() * 0.1f; @@ -189,6 +198,7 @@ struct HostAudio2 : HostAudio<2> { dataOuts[1][k] += valueL; } +#ifndef HEADLESS const int j = internalDataFrame++; internalDataBuffer[0][j] = valueL; internalDataBuffer[1][j] = valueR; @@ -209,6 +219,7 @@ struct HostAudio2 : HostAudio<2> { resetMeters = false; } +#endif } }; @@ -223,7 +234,7 @@ struct HostAudio8 : HostAudio<8> { const int k = dataFrame++; DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); - if (isBypassed()) + if (bypassed) return; float** const dataOuts = pcontext->dataOuts; @@ -244,6 +255,7 @@ struct HostAudio8 : HostAudio<8> { }; +#ifndef HEADLESS // -------------------------------------------------------------------------------------------------------------------- template @@ -343,7 +355,30 @@ struct HostAudioWidget8 : HostAudioWidget<8> { } }; +#else +// -------------------------------------------------------------------------------------------------------------------- + +struct HostAudioWidget2 : ModuleWidget { + HostAudioWidget2(HostAudio2* const module) { + setModule(module); + for (uint i=0; i<2; ++i) { + addInput(createInput({}, module, i)); + addOutput(createOutput({}, module, i)); + } + } +}; +struct HostAudioWidget8 : ModuleWidget { + HostAudioWidget8(HostAudio8* const module) { + setModule(module); + for (uint i=0; i<8; ++i) { + addInput(createInput({}, module, i)); + addOutput(createOutput({}, module, i)); + } + } +}; + // -------------------------------------------------------------------------------------------------------------------- +#endif Model* modelHostAudio2 = createModel("HostAudio2"); Model* modelHostAudio8 = createModel("HostAudio8"); diff --git a/plugins/Cardinal/src/HostCV.cpp b/plugins/Cardinal/src/HostCV.cpp index e2e61ae..191495f 100644 --- a/plugins/Cardinal/src/HostCV.cpp +++ b/plugins/Cardinal/src/HostCV.cpp @@ -124,6 +124,7 @@ struct HostCV : TerminalModule { } }; +#ifndef HEADLESS struct HostCVWidget : ModuleWidgetWith8HP { HostCVWidget(HostCV* const module) { @@ -184,6 +185,17 @@ struct HostCVWidget : ModuleWidgetWith8HP { )); } }; +#else +struct HostCVWidget : ModuleWidget { + HostCVWidget(HostCV* const module) { + setModule(module); + for (uint i=0; i({}, module, i)); + for (uint i=0; i({}, module, i)); + } +}; +#endif // -------------------------------------------------------------------------------------------------------------------- diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index 0ab992a..ac58411 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -695,6 +695,7 @@ struct HostMIDI : TerminalModule { // -------------------------------------------------------------------------------------------------------------------- +#ifndef HEADLESS struct HostMIDIWidget : ModuleWidgetWith9HP { HostMIDI* const module; @@ -829,6 +830,17 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { )); } }; +#else +struct HostMIDIWidget : ModuleWidget { + HostMIDIWidget(HostMIDI* const module) { + setModule(module); + for (uint i=0; i({}, module, i)); + for (uint i=0; i({}, module, i)); + } +}; +#endif // -------------------------------------------------------------------------------------------------------------------- diff --git a/plugins/Cardinal/src/HostParameters.cpp b/plugins/Cardinal/src/HostParameters.cpp index a46f659..0bea835 100644 --- a/plugins/Cardinal/src/HostParameters.cpp +++ b/plugins/Cardinal/src/HostParameters.cpp @@ -20,8 +20,6 @@ // ----------------------------------------------------------------------------------------------------------- -USE_NAMESPACE_DISTRHO; - struct HostParameters : TerminalModule { enum ParamIds { NUM_PARAMS @@ -91,6 +89,8 @@ struct HostParameters : TerminalModule { } }; +// -------------------------------------------------------------------------------------------------------------------- + #ifndef HEADLESS struct CardinalParameterPJ301MPort : PJ301MPort { void onDragStart(const DragStartEvent& e) override { @@ -159,11 +159,14 @@ struct HostParametersWidget : ModuleWidgetWith9HP { struct HostParametersWidget : ModuleWidget { HostParametersWidget(HostParameters* const module) { setModule(module); - - for (int i=0; i<24; ++i) + for (uint i=0; i({}, module, i)); } }; #endif +// -------------------------------------------------------------------------------------------------------------------- + Model* modelHostParameters = createModel("HostParameters"); + +// -------------------------------------------------------------------------------------------------------------------- diff --git a/plugins/Cardinal/src/HostTime.cpp b/plugins/Cardinal/src/HostTime.cpp index e49b855..4e41628 100644 --- a/plugins/Cardinal/src/HostTime.cpp +++ b/plugins/Cardinal/src/HostTime.cpp @@ -17,6 +17,8 @@ #include "plugincontext.hpp" +// -------------------------------------------------------------------------------------------------------------------- + struct HostTime : TerminalModule { enum ParamIds { NUM_PARAMS @@ -166,6 +168,9 @@ struct HostTime : TerminalModule { {} }; +// -------------------------------------------------------------------------------------------------------------------- + +#ifndef HEADLESS struct HostTimeWidget : ModuleWidget { static constexpr const float startX = 10.0f; static constexpr const float startY_top = 71.0f; @@ -285,5 +290,18 @@ struct HostTimeWidget : ModuleWidget { ModuleWidget::drawLayer(args, layer); } }; +#else +struct HostTimeWidget : ModuleWidget { + HostTimeWidget(HostTime* const module) { + setModule(module); + for (uint i=0; i({}, module, i)); + } +}; +#endif + +// -------------------------------------------------------------------------------------------------------------------- Model* modelHostTime = createModel("HostTime"); + +// -------------------------------------------------------------------------------------------------------------------- diff --git a/plugins/Cardinal/src/Widgets.hpp b/plugins/Cardinal/src/Widgets.hpp index a727e98..730262a 100644 --- a/plugins/Cardinal/src/Widgets.hpp +++ b/plugins/Cardinal/src/Widgets.hpp @@ -25,6 +25,7 @@ using namespace rack; +#ifndef HEADLESS struct CardinalLedDisplayChoice : LedDisplayChoice { bool alignTextCenter = true; @@ -403,3 +404,4 @@ struct OpenGlWidgetWithBrowserPreview : OpenGlWidget { virtual void drawFramebufferForBrowserPreview() = 0; }; +#endif From cab2aa9862ebce9ed5a4fc95bcdc080ecb18e628 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 22 Mar 2022 14:37:56 +0000 Subject: [PATCH 087/132] Optimizations to core modules Signed-off-by: falkTX --- plugins/Cardinal/src/AudioFile.cpp | 8 +- plugins/Cardinal/src/Carla.cpp | 8 +- plugins/Cardinal/src/HostAudio.cpp | 74 +++++++++++------- plugins/Cardinal/src/HostCV.cpp | 19 +++-- plugins/Cardinal/src/HostMIDI-CC.cpp | 15 ++-- plugins/Cardinal/src/HostMIDI-Gate.cpp | 17 ++-- plugins/Cardinal/src/HostMIDI-Map.cpp | 13 ++-- plugins/Cardinal/src/HostMIDI.cpp | 104 +++++++++++++++++++------ plugins/Cardinal/src/HostTime.cpp | 22 +++--- plugins/Cardinal/src/Ildaeil.cpp | 8 +- plugins/Cardinal/src/plugincontext.hpp | 2 +- src/CardinalPlugin.cpp | 1 + src/PluginContext.hpp | 3 +- 13 files changed, 185 insertions(+), 109 deletions(-) diff --git a/plugins/Cardinal/src/AudioFile.cpp b/plugins/Cardinal/src/AudioFile.cpp index ed72126..a76d412 100644 --- a/plugins/Cardinal/src/AudioFile.cpp +++ b/plugins/Cardinal/src/AudioFile.cpp @@ -99,7 +99,7 @@ struct CarlaInternalPluginModule : Module, Thread { float dataOut[NUM_OUTPUTS][BUFFER_SIZE]; float* dataOutPtr[NUM_OUTPUTS]; unsigned audioDataFill = 0; - int64_t lastBlockFrame = -1; + uint32_t lastProcessCounter = 0; bool fileChanged = false; std::string currentFile; @@ -300,12 +300,12 @@ struct CarlaInternalPluginModule : Module, Thread { if (audioDataFill == BUFFER_SIZE) { - const int64_t blockFrame = pcontext->engine->getBlockFrame(); + const uint32_t processCounter = pcontext->processCounter; // Update time position if running a new audio block - if (lastBlockFrame != blockFrame) + if (lastProcessCounter != processCounter) { - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; fCarlaTimeInfo.playing = pcontext->playing; fCarlaTimeInfo.frame = pcontext->frame; } diff --git a/plugins/Cardinal/src/Carla.cpp b/plugins/Cardinal/src/Carla.cpp index f5d726f..30fef47 100644 --- a/plugins/Cardinal/src/Carla.cpp +++ b/plugins/Cardinal/src/Carla.cpp @@ -95,7 +95,7 @@ struct CarlaModule : Module { float* dataInPtr[NUM_INPUTS]; float* dataOutPtr[NUM_OUTPUTS]; unsigned audioDataFill = 0; - int64_t lastBlockFrame = -1; + uint32_t lastProcessCounter = 0; CardinalExpanderFromCarlaMIDIToCV* midiOutExpander = nullptr; std::string patchStorage; @@ -327,12 +327,12 @@ struct CarlaModule : Module { if (audioDataFill == BUFFER_SIZE) { - const int64_t blockFrame = pcontext->engine->getBlockFrame(); + const uint32_t processCounter = pcontext->processCounter; // Update time position if running a new audio block - if (lastBlockFrame != blockFrame) + if (lastProcessCounter != processCounter) { - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; fCarlaTimeInfo.playing = pcontext->playing; fCarlaTimeInfo.frame = pcontext->frame; fCarlaTimeInfo.bbt.valid = pcontext->bbtValid; diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index 6b022ad..d5f4c64 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -30,9 +30,10 @@ struct HostAudio : TerminalModule { const int numInputs; const int numOutputs; bool bypassed = false; + bool in1connected = false; bool in2connected = false; - int dataFrame = 0; - int64_t lastBlockFrame = -1; + uint32_t dataFrame = 0; + uint32_t lastProcessCounter = 0; // for rack core audio module compatibility dsp::RCFilter dcFilters[numIO]; @@ -70,23 +71,26 @@ struct HostAudio : TerminalModule { void processTerminalInput(const ProcessArgs&) override { - const int blockFrames = pcontext->engine->getBlockFrames(); - const int64_t blockFrame = pcontext->engine->getBlockFrame(); + const uint32_t bufferSize = pcontext->bufferSize; + const uint32_t processCounter = pcontext->processCounter; // only checked on input - if (lastBlockFrame != blockFrame) + if (lastProcessCounter != processCounter) { bypassed = isBypassed(); dataFrame = 0; - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; if (numIO == 2) + { + in1connected = inputs[0].isConnected(); in2connected = inputs[1].isConnected(); + } } // only incremented on output - const int k = dataFrame; - DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); + const uint32_t k = dataFrame; + DISTRHO_SAFE_ASSERT_INT2_RETURN(k < bufferSize, k, bufferSize,); // from host into cardinal, shows as output plug if (bypassed) @@ -122,7 +126,7 @@ struct HostAudio : TerminalModule { struct HostAudio2 : HostAudio<2> { #ifndef HEADLESS // for stereo meter - int internalDataFrame = 0; + uint32_t internalDataFrame = 0; float internalDataBuffer[2][128]; volatile bool resetMeters = true; float gainMeterL = 0.0f; @@ -153,11 +157,14 @@ struct HostAudio2 : HostAudio<2> { void processTerminalOutput(const ProcessArgs&) override { - const int blockFrames = pcontext->engine->getBlockFrames(); + if (!in1connected && !in2connected) + return; + + const uint32_t bufferSize = pcontext->bufferSize; // only incremented on output - const int k = dataFrame++; - DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); + const uint32_t k = dataFrame++; + DISTRHO_SAFE_ASSERT_INT2_RETURN(k < bufferSize, k, bufferSize,); if (bypassed) return; @@ -168,21 +175,30 @@ struct HostAudio2 : HostAudio<2> { const float gain = std::pow(params[0].getValue(), 2.f); // read stereo values - float valueL = inputs[0].getVoltageSum() * 0.1f; - float valueR = inputs[1].getVoltageSum() * 0.1f; + float valueL, valueR; - // Apply DC filter - if (dcFilterEnabled) + if (in1connected) { - dcFilters[0].process(valueL); - valueL = dcFilters[0].highpass(); - } + valueL = inputs[0].getVoltageSum() * 0.1f; - valueL = clamp(valueL * gain, -1.0f, 1.0f); - dataOuts[0][k] += valueL; + if (dcFilterEnabled) + { + dcFilters[0].process(valueL); + valueL = dcFilters[0].highpass(); + } + + valueL = clamp(valueL * gain, -1.0f, 1.0f); + dataOuts[0][k] += valueL; + } + else + { + valueL = 0.0f; + } if (in2connected) { + valueR = inputs[1].getVoltageSum() * 0.1f; + if (dcFilterEnabled) { dcFilters[1].process(valueR); @@ -192,14 +208,18 @@ struct HostAudio2 : HostAudio<2> { valueR = clamp(valueR * gain, -1.0f, 1.0f); dataOuts[1][k] += valueR; } - else + else if (in1connected) { valueR = valueL; dataOuts[1][k] += valueL; } - #ifndef HEADLESS - const int j = internalDataFrame++; + else + { + valueR = 0.0f; + } + + const uint32_t j = internalDataFrame++; internalDataBuffer[0][j] = valueL; internalDataBuffer[1][j] = valueR; @@ -228,11 +248,11 @@ struct HostAudio8 : HostAudio<8> { void processTerminalOutput(const ProcessArgs&) override { - const int blockFrames = pcontext->engine->getBlockFrames(); + const uint32_t bufferSize = pcontext->bufferSize; // only incremented on output - const int k = dataFrame++; - DISTRHO_SAFE_ASSERT_INT2_RETURN(k < blockFrames, k, blockFrames,); + const uint32_t k = dataFrame++; + DISTRHO_SAFE_ASSERT_INT2_RETURN(k < bufferSize, k, bufferSize,); if (bypassed) return; diff --git a/plugins/Cardinal/src/HostCV.cpp b/plugins/Cardinal/src/HostCV.cpp index 191495f..9626219 100644 --- a/plugins/Cardinal/src/HostCV.cpp +++ b/plugins/Cardinal/src/HostCV.cpp @@ -27,7 +27,7 @@ USE_NAMESPACE_DISTRHO; struct HostCV : TerminalModule { CardinalPluginContext* const pcontext; int dataFrame = 0; - int64_t lastBlockFrame = -1; + uint32_t lastProcessCounter = 0; enum ParamIds { BIPOLAR_INPUTS_1_5, @@ -64,18 +64,19 @@ struct HostCV : TerminalModule { if (pcontext->variant != kCardinalVariantMain) return; - const int64_t blockFrame = pcontext->engine->getBlockFrame(); + const uint32_t bufferSize = pcontext->bufferSize; + const uint32_t processCounter = pcontext->processCounter; // only checked on input - if (lastBlockFrame != blockFrame) + if (lastProcessCounter != processCounter) { dataFrame = 0; - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; } // only incremented on output - const int k = dataFrame; - DISTRHO_SAFE_ASSERT_RETURN(k < pcontext->engine->getBlockFrames(),); + const uint32_t k = dataFrame; + DISTRHO_SAFE_ASSERT_RETURN(k < bufferSize,); if (isBypassed()) { @@ -102,9 +103,11 @@ struct HostCV : TerminalModule { if (pcontext->variant != kCardinalVariantMain) return; + const uint32_t bufferSize = pcontext->bufferSize; + // only incremented on output - const int k = dataFrame++; - DISTRHO_SAFE_ASSERT_RETURN(k < pcontext->engine->getBlockFrames(),); + const uint32_t k = dataFrame++; + DISTRHO_SAFE_ASSERT_RETURN(k < bufferSize,); if (isBypassed()) return; diff --git a/plugins/Cardinal/src/HostMIDI-CC.cpp b/plugins/Cardinal/src/HostMIDI-CC.cpp index 5b75d28..96b58d5 100644 --- a/plugins/Cardinal/src/HostMIDI-CC.cpp +++ b/plugins/Cardinal/src/HostMIDI-CC.cpp @@ -62,7 +62,7 @@ struct HostMIDICC : TerminalModule { const MidiEvent* midiEvents; uint32_t midiEventsLeft; uint32_t midiEventFrame; - int64_t lastBlockFrame; + uint32_t lastProcessCounter; uint8_t channel; uint8_t chPressure[16]; @@ -99,7 +99,7 @@ struct HostMIDICC : TerminalModule { midiEvents = nullptr; midiEventsLeft = 0; midiEventFrame = 0; - lastBlockFrame = -1; + lastProcessCounter = 0; channel = 0; // adapted from Rack @@ -120,13 +120,12 @@ struct HostMIDICC : TerminalModule { const bool isBypassed) { // Cardinal specific - const int64_t blockFrame = pcontext->engine->getBlockFrame(); - const bool blockFrameChanged = lastBlockFrame != blockFrame; + const uint32_t processCounter = pcontext->processCounter; + const bool processCounterChanged = lastProcessCounter != processCounter; - if (blockFrameChanged) + if (processCounterChanged) { - lastBlockFrame = blockFrame; - + lastProcessCounter = processCounter; midiEvents = pcontext->midiEvents; midiEventsLeft = pcontext->midiEventCount; midiEventFrame = 0; @@ -306,7 +305,7 @@ struct HostMIDICC : TerminalModule { } } - return blockFrameChanged; + return processCounterChanged; } } midiInput; diff --git a/plugins/Cardinal/src/HostMIDI-Gate.cpp b/plugins/Cardinal/src/HostMIDI-Gate.cpp index abd6a74..3dfed9a 100644 --- a/plugins/Cardinal/src/HostMIDI-Gate.cpp +++ b/plugins/Cardinal/src/HostMIDI-Gate.cpp @@ -58,7 +58,7 @@ struct HostMIDIGate : TerminalModule { const MidiEvent* midiEvents; uint32_t midiEventsLeft; uint32_t midiEventFrame; - int64_t lastBlockFrame; + uint32_t lastProcessCounter; uint8_t channel; // stuff from Rack @@ -84,7 +84,7 @@ struct HostMIDIGate : TerminalModule { midiEvents = nullptr; midiEventsLeft = 0; midiEventFrame = 0; - lastBlockFrame = -1; + lastProcessCounter = 0; channel = 0; learningId = -1; mpeMode = false; @@ -107,13 +107,12 @@ struct HostMIDIGate : TerminalModule { const bool velocityMode, int8_t learnedNotes[18], const bool isBypassed) { // Cardinal specific - const int64_t blockFrame = pcontext->engine->getBlockFrame(); - const bool blockFrameChanged = lastBlockFrame != blockFrame; + const uint32_t processCounter = pcontext->processCounter; + const bool processCounterChanged = lastProcessCounter != processCounter; - if (blockFrameChanged) + if (processCounterChanged) { - lastBlockFrame = blockFrame; - + lastProcessCounter = processCounter; midiEvents = pcontext->midiEvents; midiEventsLeft = pcontext->midiEventCount; midiEventFrame = 0; @@ -122,7 +121,7 @@ struct HostMIDIGate : TerminalModule { if (isBypassed) { ++midiEventFrame; - return blockFrameChanged; + return processCounterChanged; } while (midiEventsLeft != 0) @@ -220,7 +219,7 @@ struct HostMIDIGate : TerminalModule { } } - return blockFrameChanged; + return processCounterChanged; } } midiInput; diff --git a/plugins/Cardinal/src/HostMIDI-Map.cpp b/plugins/Cardinal/src/HostMIDI-Map.cpp index 9f8a480..40b4374 100644 --- a/plugins/Cardinal/src/HostMIDI-Map.cpp +++ b/plugins/Cardinal/src/HostMIDI-Map.cpp @@ -55,7 +55,7 @@ struct HostMIDIMap : TerminalModule { const MidiEvent* midiEvents; uint32_t midiEventsLeft; uint32_t midiEventFrame; - int64_t lastBlockFrame; + uint32_t lastProcessCounter; int nextLearningId; uint8_t channel; @@ -117,7 +117,7 @@ struct HostMIDIMap : TerminalModule { midiEvents = nullptr; midiEventsLeft = 0; midiEventFrame = 0; - lastBlockFrame = -1; + lastProcessCounter = 0; nextLearningId = -1; channel = 0; @@ -134,13 +134,12 @@ struct HostMIDIMap : TerminalModule { void processTerminalInput(const ProcessArgs& args) override { // Cardinal specific - const int64_t blockFrame = pcontext->engine->getBlockFrame(); - const bool blockFrameChanged = lastBlockFrame != blockFrame; + const uint32_t processCounter = pcontext->processCounter; + const bool processCounterChanged = lastProcessCounter != processCounter; - if (blockFrameChanged) + if (processCounterChanged) { - lastBlockFrame = blockFrame; - + lastProcessCounter = processCounter; midiEvents = pcontext->midiEvents; midiEventsLeft = pcontext->midiEventCount; midiEventFrame = 0; diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index ac58411..660bc43 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -81,7 +81,7 @@ struct HostMIDI : TerminalModule { const MidiEvent* midiEvents; uint32_t midiEventsLeft; uint32_t midiEventFrame; - int64_t lastBlockFrame; + uint32_t lastProcessCounter; bool wasPlaying; uint8_t channel; @@ -140,7 +140,7 @@ struct HostMIDI : TerminalModule { midiEvents = nullptr; midiEventsLeft = 0; midiEventFrame = 0; - lastBlockFrame = -1; + lastProcessCounter = 0; wasPlaying = false; channel = 0; smooth = true; @@ -171,12 +171,12 @@ struct HostMIDI : TerminalModule { bool process(const ProcessArgs& args, std::vector& outputs, const bool isBypassed) { // Cardinal specific - const int64_t blockFrame = pcontext->engine->getBlockFrame(); - const bool blockFrameChanged = lastBlockFrame != blockFrame; + const uint32_t processCounter = pcontext->processCounter; + const bool processCounterChanged = lastProcessCounter != processCounter; - if (blockFrameChanged) + if (processCounterChanged) { - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; midiEvents = pcontext->midiEvents; midiEventsLeft = pcontext->midiEventCount; @@ -292,7 +292,7 @@ struct HostMIDI : TerminalModule { outputs[STOP_OUTPUT].setVoltage(stopPulse.process(args.sampleTime) ? 10.f : 0.f); outputs[CONTINUE_OUTPUT].setVoltage(continuePulse.process(args.sampleTime) ? 10.f : 0.f); - return blockFrameChanged; + return processCounterChanged; } void processMessage(const midi::Message& msg) @@ -541,6 +541,18 @@ struct HostMIDI : TerminalModule { CardinalPluginContext* const pcontext; uint8_t channel = 0; + // caching + struct { + bool gate = false; + bool velocity = false; + bool aftertouch = false; + bool pitchbend = false; + bool modwheel = false; + bool start = false; + bool stop = false; + bool cont = false; + } connected; + MidiOutput(CardinalPluginContext* const pc) : pcontext(pc) {} @@ -595,9 +607,21 @@ struct HostMIDI : TerminalModule { void processTerminalInput(const ProcessArgs& args) override { if (midiInput.process(args, outputs, isBypassed())) + { midiOutput.frame = 0; + midiOutput.connected.gate = inputs[GATE_INPUT].isConnected(); + midiOutput.connected.velocity = inputs[VELOCITY_INPUT].isConnected(); + midiOutput.connected.aftertouch = inputs[AFTERTOUCH_INPUT].isConnected(); + midiOutput.connected.pitchbend = inputs[PITCHBEND_INPUT].isConnected(); + midiOutput.connected.modwheel = inputs[MODWHEEL_INPUT].isConnected(); + midiOutput.connected.start = inputs[START_INPUT].isConnected(); + midiOutput.connected.stop = inputs[STOP_INPUT].isConnected(); + midiOutput.connected.cont = inputs[CONTINUE_INPUT].isConnected(); + } else + { ++midiOutput.frame; + } } void processTerminalOutput(const ProcessArgs&) override @@ -605,37 +629,67 @@ struct HostMIDI : TerminalModule { if (isBypassed()) return; + auto connected = midiOutput.connected; + for (int c = 0; c < inputs[PITCH_INPUT].getChannels(); ++c) { - int vel = (int) std::round(inputs[VELOCITY_INPUT].getNormalPolyVoltage(10.f * 100 / 127, c) / 10.f * 127); - vel = clamp(vel, 0, 127); - midiOutput.setVelocity(vel, c); + if (connected.velocity) + { + const constexpr float n = 10.f * 100.f / 127.f; + const int vel = clamp( + static_cast(inputs[VELOCITY_INPUT].getNormalPolyVoltage(n, c) / 10.f * 127.f + 0.5f), 0, 127); + midiOutput.setVelocity(vel, c); + } + else + { + midiOutput.setVelocity(100, 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; + const int note = clamp(static_cast(inputs[PITCH_INPUT].getVoltage(c) * 12.f + 60.5f), 0, 127); + const bool gate = connected.gate ? inputs[GATE_INPUT].getPolyVoltage(c) >= 1.f : false; midiOutput.setNoteGate(note, gate, c); - int aft = (int) std::round(inputs[AFTERTOUCH_INPUT].getPolyVoltage(c) / 10.f * 127); - aft = clamp(aft, 0, 127); - midiOutput.setKeyPressure(aft, c); + if (connected.aftertouch) + { + const int aft = clamp( + static_cast(inputs[AFTERTOUCH_INPUT].getPolyVoltage(c) / 10.f * 127.f + 0.5f), 0, 127); + midiOutput.setKeyPressure(aft, c); + } + else + { + midiOutput.setKeyPressure(0, c); + } } - int pw = (int) std::round((inputs[PITCHBEND_INPUT].getVoltage() + 5.f) / 10.f * 16383); - pw = clamp(pw, 0, 16383); - midiOutput.setPitchWheel(pw); + if (connected.pitchbend) + { + const int pw = clamp( + static_cast((inputs[PITCHBEND_INPUT].getVoltage() + 5.f) / 10.f * 16383.f + 0.5f), 0, 16383); + midiOutput.setPitchWheel(pw); + } + else + { + midiOutput.setPitchWheel(0); + } - int mw = (int) std::round(inputs[MODWHEEL_INPUT].getVoltage() / 10.f * 127); - mw = clamp(mw, 0, 127); - midiOutput.setModWheel(mw); + if (connected.modwheel) + { + const int mw = clamp( + static_cast(inputs[MODWHEEL_INPUT].getVoltage() / 10.f * 127.f + 0.5f), 0, 127); + midiOutput.setModWheel(mw); + } + else + { + midiOutput.setModWheel(0); + } - bool start = inputs[START_INPUT].getVoltage() >= 1.f; + const bool start = connected.start ? inputs[START_INPUT].getVoltage() >= 1.f : false; midiOutput.setStart(start); - bool stop = inputs[STOP_INPUT].getVoltage() >= 1.f; + const bool stop = connected.stop ? inputs[STOP_INPUT].getVoltage() >= 1.f : false; midiOutput.setStop(stop); - bool cont = inputs[CONTINUE_INPUT].getVoltage() >= 1.f; + const bool cont = connected.cont ? inputs[CONTINUE_INPUT].getVoltage() >= 1.f : false; midiOutput.setContinue(cont); } diff --git a/plugins/Cardinal/src/HostTime.cpp b/plugins/Cardinal/src/HostTime.cpp index 4e41628..da3fd5a 100644 --- a/plugins/Cardinal/src/HostTime.cpp +++ b/plugins/Cardinal/src/HostTime.cpp @@ -41,7 +41,7 @@ struct HostTime : TerminalModule { rack::dsp::PulseGenerator pulseReset, pulseBar, pulseBeat, pulseClock; float sampleTime = 0.0f; - int64_t lastBlockFrame = -1; + uint32_t lastProcessCounter = 0; // cached time values struct { bool reset = true; @@ -63,15 +63,15 @@ struct HostTime : TerminalModule { void processTerminalInput(const ProcessArgs& args) override { - const int64_t blockFrame = pcontext->engine->getBlockFrame(); + const uint32_t processCounter = pcontext->processCounter; // local variables for faster access double tick, tickClock; // Update time position if running a new audio block - if (lastBlockFrame != blockFrame) + if (lastProcessCounter != processCounter) { - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; timeInfo.reset = pcontext->reset; timeInfo.bar = pcontext->bar; timeInfo.beat = pcontext->beat; @@ -129,6 +129,13 @@ struct HostTime : TerminalModule { } } + // store back the local values + timeInfo.tick = tick; + timeInfo.tickClock = tickClock; + + if (isBypassed()) + return; + const bool hasReset = pulseReset.process(args.sampleTime); const bool hasBar = pulseBar.process(args.sampleTime); const bool hasBeat = pulseBeat.process(args.sampleTime); @@ -140,13 +147,6 @@ struct HostTime : TerminalModule { ? ((float) (timeInfo.beat - 1) + beatPhase) / pcontext->beatsPerBar : 0.0f; - // store back the local values - timeInfo.tick = tick; - timeInfo.tickClock = tickClock; - - if (isBypassed()) - return; - lights[kHostTimeRolling].setBrightness(playing ? 1.0f : 0.0f); lights[kHostTimeReset].setBrightnessSmooth(hasReset ? 1.0f : 0.0f, args.sampleTime * 0.5f); lights[kHostTimeBar].setBrightnessSmooth(hasBar ? 1.0f : 0.0f, args.sampleTime * 0.5f); diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index f22a7e1..60d86a6 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -148,7 +148,7 @@ struct IldaeilModule : Module { float audioDataOut1[BUFFER_SIZE]; float audioDataOut2[BUFFER_SIZE]; unsigned audioDataFill = 0; - int64_t lastBlockFrame = -1; + uint32_t lastProcessCounter = 0; CardinalExpanderFromCarlaMIDIToCV* midiOutExpander = nullptr; volatile bool resetMeterIn = true; @@ -359,12 +359,12 @@ struct IldaeilModule : Module { if (audioDataFill == BUFFER_SIZE) { - const int64_t blockFrame = pcontext->engine->getBlockFrame(); + const uint32_t processCounter = pcontext->processCounter; // Update time position if running a new audio block - if (lastBlockFrame != blockFrame) + if (lastProcessCounter != processCounter) { - lastBlockFrame = blockFrame; + lastProcessCounter = processCounter; fCarlaTimeInfo.playing = pcontext->playing; fCarlaTimeInfo.frame = pcontext->frame; fCarlaTimeInfo.bbt.valid = pcontext->bbtValid; diff --git a/plugins/Cardinal/src/plugincontext.hpp b/plugins/Cardinal/src/plugincontext.hpp index dcba23b..1d25256 100644 --- a/plugins/Cardinal/src/plugincontext.hpp +++ b/plugins/Cardinal/src/plugincontext.hpp @@ -51,7 +51,7 @@ struct MidiEvent { }; struct CardinalPluginContext : rack::Context { - uint32_t bufferSize; + uint32_t bufferSize, processCounter; double sampleRate; float parameters[kModuleParameters]; CardinalVariant variant; diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index f949f80..b41be7a 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -1019,6 +1019,7 @@ protected: context->midiEventCount = midiEventCount; } + ++context->processCounter; context->engine->stepBlock(frames); fWasBypassed = bypassed; diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index e140759..0aa9edc 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -48,7 +48,7 @@ enum CardinalVariant { // ----------------------------------------------------------------------------------------------------------- struct CardinalPluginContext : rack::Context { - uint32_t bufferSize; + uint32_t bufferSize, processCounter; double sampleRate; float parameters[kModuleParameters]; CardinalVariant variant; @@ -69,6 +69,7 @@ struct CardinalPluginContext : rack::Context { CardinalPluginContext(Plugin* const p) : bufferSize(p->getBufferSize()), + processCounter(0), sampleRate(p->getSampleRate()), #if CARDINAL_VARIANT_MAIN variant(kCardinalVariantMain), From 849bacebfd91b5a72f38bed63771e540256c92e3 Mon Sep 17 00:00:00 2001 From: dingodoppelt <62596379+dingodoppelt@users.noreply.github.com> Date: Thu, 24 Mar 2022 19:07:09 +0100 Subject: [PATCH 088/132] change defaults in HostMIDI.cpp disable mw/pw smoothing by default, set pwRange to zero so it doesn't unexpectedly affect V/OCT (restores behaviour of previous releases) --- plugins/Cardinal/src/HostMIDI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index 660bc43..c6366c1 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -143,10 +143,10 @@ struct HostMIDI : TerminalModule { lastProcessCounter = 0; wasPlaying = false; channel = 0; - smooth = true; + smooth = false; channels = 1; polyMode = ROTATE_MODE; - pwRange = 2; + pwRange = 0; panic(); } From 9a792c72bf2e04be1754fac2e5a28f1570b7e1f2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 24 Mar 2022 22:43:00 +0000 Subject: [PATCH 089/132] Slowly start introducing fundamental Signed-off-by: falkTX --- .gitmodules | 3 ++ plugins/Fundamental | 1 + plugins/Makefile | 4 --- plugins/plugins.cpp | 73 +++++++++++++++++---------------------------- 4 files changed, 32 insertions(+), 49 deletions(-) create mode 160000 plugins/Fundamental diff --git a/.gitmodules b/.gitmodules index 5eef79b..771ebb0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -184,3 +184,6 @@ [submodule "plugins/ArableInstruments"] path = plugins/ArableInstruments url = https://github.com/CardinalModules/ArableInstruments.git +[submodule "plugins/Fundamental"] + path = plugins/Fundamental + url = https://github.com/CardinalModules/Fundamental.git diff --git a/plugins/Fundamental b/plugins/Fundamental new file mode 160000 index 0000000..9159cc3 --- /dev/null +++ b/plugins/Fundamental @@ -0,0 +1 @@ +Subproject commit 9159cc3182ff3f4ec981fe574bd5dd1a9ea59490 diff --git a/plugins/Makefile b/plugins/Makefile index 2469f94..11fdfae 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -514,15 +514,11 @@ FEHLERFABRIK_CUSTOM = Operator Sequencer SlewLimiter # -------------------------------------------------------------- # Fundamental -ifeq ($(WITH_FUNDAMENTAL),true) -BASE_FLAGS += -DWITH_FUNDAMENTAL - PLUGIN_FILES += $(filter-out Fundamental/src/plugin.cpp,$(wildcard Fundamental/src/*.cpp)) PLUGIN_FILES += Fundamental/src/dr_wav.c # modules/types which are present in other plugins FUNDAMENTAL_CUSTOM = $(DRWAV) -endif # -------------------------------------------------------------- # GlueTheGiant diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 468a76c..448d2c4 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -307,9 +307,7 @@ void setupSamples(); #include "FehlerFabrik/src/plugin.hpp" // Fundamental -#ifdef WITH_FUNDAMENTAL #include "Fundamental/src/plugin.hpp" -#endif // GlueTheGiant #include "GlueTheGiant/src/plugin.hpp" @@ -707,9 +705,7 @@ Plugin* pluginInstance__ESeries; Plugin* pluginInstance__ExpertSleepersEncoders; Plugin* pluginInstance__Extratone; Plugin* pluginInstance__FehlerFabrik; -#ifdef WITH_FUNDAMENTAL Plugin* pluginInstance__Fundamental; -#endif Plugin* pluginInstance__GlueTheGiant; Plugin* pluginInstance__GoodSheperd; Plugin* pluginInstance__GrandeModular; @@ -1589,7 +1585,6 @@ static void initStatic__FehlerFabrik() } } -#ifdef WITH_FUNDAMENTAL static void initStatic__Fundamental() { Plugin* const p = new Plugin; @@ -1598,48 +1593,38 @@ static void initStatic__Fundamental() const StaticPluginLoader spl(p, "Fundamental"); if (spl.ok()) { - p->addModel(modelVCO); - p->addModel(modelVCO2); p->addModel(modelVCF); - p->addModel(modelVCA_1); - p->addModel(modelVCA); - p->addModel(modelLFO); - p->addModel(modelLFO2); - p->addModel(modelDelay); - p->addModel(modelADSR); - p->addModel(modelMixer); - p->addModel(modelVCMixer); - p->addModel(model_8vert); - p->addModel(modelUnity); - p->addModel(modelMutes); - p->addModel(modelPulses); - p->addModel(modelScope); - p->addModel(modelSEQ3); - p->addModel(modelSequentialSwitch1); - p->addModel(modelSequentialSwitch2); - p->addModel(modelOctave); - p->addModel(modelQuantizer); - p->addModel(modelSplit); - p->addModel(modelMerge); - p->addModel(modelSum); - p->addModel(modelViz); - p->addModel(modelMidSide); - p->addModel(modelNoise); - p->addModel(modelRandom); - // show all plugins, helping those familiar with v1 Rack modules - if (json_t* const modules = json_object_get(spl.rootJ, "modules")) - { - size_t i; - json_t* v; - json_array_foreach(modules, i, v) - { - json_object_set(v, "hidden", json_false()); - } - } + // TODO + spl.removeModule("VCO"); + spl.removeModule("VCO2"); + spl.removeModule("VCA"); + spl.removeModule("VCA-1"); + spl.removeModule("LFO"); + spl.removeModule("LFO2"); + spl.removeModule("Delay"); + spl.removeModule("ADSR"); + spl.removeModule("Mixer"); + spl.removeModule("VCMixer"); + spl.removeModule("8vert"); + spl.removeModule("Unity"); + spl.removeModule("Mutes"); + spl.removeModule("Pulses"); + spl.removeModule("Scope"); + spl.removeModule("SEQ3"); + spl.removeModule("SequentialSwitch1"); + spl.removeModule("SequentialSwitch2"); + spl.removeModule("Octave"); + spl.removeModule("Quantizer"); + spl.removeModule("Split"); + spl.removeModule("Merge"); + spl.removeModule("Sum"); + spl.removeModule("Viz"); + spl.removeModule("MidSide"); + spl.removeModule("Noise"); + spl.removeModule("Random"); } } -#endif static void initStatic__GlueTheGiant() { @@ -2515,9 +2500,7 @@ void initStaticPlugins() initStatic__ExpertSleepersEncoders(); initStatic__Extratone(); initStatic__FehlerFabrik(); - #ifdef WITH_FUNDAMENTAL initStatic__Fundamental(); - #endif initStatic__GlueTheGiant(); initStatic__GoodSheperd(); initStatic__GrandeModular(); From c411946ccf45ec382d2bab31f68f0a0cff8afa78 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Mar 2022 13:18:08 +0000 Subject: [PATCH 090/132] Add retrigger to Host-MIDI Fixes #200 Signed-off-by: falkTX --- plugins/Cardinal/src/HostMIDI.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index c6366c1..7469a8e 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -122,6 +122,7 @@ struct HostMIDI : TerminalModule { dsp::PulseGenerator startPulse; dsp::PulseGenerator stopPulse; dsp::PulseGenerator continuePulse; + dsp::PulseGenerator retriggerPulses[16]; MidiInput(CardinalPluginContext* const pc) : pcontext(pc) @@ -278,6 +279,7 @@ struct HostMIDI : TerminalModule { outputs[GATE_OUTPUT].setChannels(channels); outputs[VELOCITY_OUTPUT].setChannels(channels); outputs[AFTERTOUCH_OUTPUT].setChannels(channels); + outputs[RETRIGGER_OUTPUT].setChannels(channels); for (int c = 0; c < channels; c++) { float pw = pwValues[(polyMode == MPE_MODE) ? c : 0]; @@ -286,6 +288,7 @@ struct HostMIDI : TerminalModule { outputs[GATE_OUTPUT].setVoltage(gates[c] ? 10.f : 0.f, c); outputs[VELOCITY_OUTPUT].setVoltage(rescale(velocities[c], 0, 127, 0.f, 10.f), c); outputs[AFTERTOUCH_OUTPUT].setVoltage(rescale(aftertouches[c], 0, 127, 0.f, 10.f), c); + outputs[RETRIGGER_OUTPUT].setVoltage(retriggerPulses[c].process(args.sampleTime) ? 10.f : 0.f, c); } outputs[START_OUTPUT].setVoltage(startPulse.process(args.sampleTime) ? 10.f : 0.f); @@ -460,6 +463,7 @@ struct HostMIDI : TerminalModule { // Set note notes[*channel] = note; gates[*channel] = true; + retriggerPulses[*channel].trigger(1e-3); } void releaseNote(uint8_t note) { @@ -780,12 +784,13 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { createAndAddOutput(6, HostMIDI::START_OUTPUT); createAndAddOutput(7, HostMIDI::STOP_OUTPUT); createAndAddOutput(8, HostMIDI::CONTINUE_OUTPUT); + createAndAddOutput(9, HostMIDI::RETRIGGER_OUTPUT); } void draw(const DrawArgs& args) override { drawBackground(args.vg); - drawOutputJacksArea(args.vg, 9); + drawOutputJacksArea(args.vg, 10); setupTextLines(args.vg); drawTextLine(args.vg, 0, "V/Oct"); @@ -797,6 +802,7 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { drawTextLine(args.vg, 6, "Start"); drawTextLine(args.vg, 7, "Stop"); drawTextLine(args.vg, 8, "Cont"); + drawTextLine(args.vg, 9, "Retrigger"); ModuleWidgetWith9HP::draw(args); } From 56305eb03710dfe1a9d88d210a86a8436b0377f0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Mar 2022 16:07:25 +0000 Subject: [PATCH 091/132] Use native APIs instead of env vars or finding Windows paths Fixes #202 Signed-off-by: falkTX --- src/CardinalCommon.cpp | 43 ++++++++++++++++++++++++++++++------------ src/CardinalCommon.hpp | 8 ++++++++ src/CardinalPlugin.cpp | 3 ++- 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 5945b9f..1670a8b 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -43,8 +43,10 @@ # undef DEBUG #endif -// for finding home dir -#ifndef ARCH_WIN +// for finding special paths +#ifdef ARCH_WIN +# include +#else # include # include #endif @@ -55,6 +57,31 @@ namespace rack { namespace settings { int rateLimit = 0; } + +#ifdef ARCH_WIN +std::string getSpecialPath(const SpecialPath type) +{ + int csidl; + switch (type) + { + case kSpecialPathUserProfile: + csidl = CSIDL_PROFILE; + break; + case kSpecialPathCommonProgramFiles: + csidl = CSIDL_PROGRAM_FILES_COMMON; + break; + default: + return {}; + } + + WCHAR path[MAX_PATH + 256]; + + if (SHGetSpecialFolderPathW(nullptr, path, csidl, FALSE)) + return string::UTF16toUTF8(path); + + return {}; +} +#endif } namespace patchUtils @@ -74,19 +101,11 @@ static void promptClear(const char* const message, const std::function a static std::string homeDir() { # ifdef ARCH_WIN - if (const char* const userprofile = getenv("USERPROFILE")) - { - return userprofile; - } - else if (const char* const homedrive = getenv("HOMEDRIVE")) - { - if (const char* const homepath = getenv("HOMEPATH")) - return system::join(homedrive, homepath); - } + return getSpecialPath(kSpecialPathUserProfile); # else if (const char* const home = getenv("HOME")) return home; - else if (struct passwd* const pwd = getpwuid(getuid())) + if (struct passwd* const pwd = getpwuid(getuid())) return pwd->pw_dir; # endif return {}; diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 7c9a74f..961c340 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -41,6 +41,14 @@ namespace window { void generateScreenshot(); } +#ifdef ARCH_WIN +enum SpecialPath { + kSpecialPathUserProfile, + kSpecialPathCommonProgramFiles, +}; +std::string getSpecialPath(SpecialPath type); +#endif + } // namespace rack namespace patchUtils { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index b41be7a..c5779f2 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -155,7 +155,8 @@ struct Initializer #if defined(ARCH_MAC) asset::systemDir = "/Library/Application Support/Cardinal"; #elif defined(ARCH_WIN) - if (const char* const commonprogfiles = std::getenv("COMMONPROGRAMFILES")) + const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles); + if (! commonprogfiles.empty()) asset::systemDir = system::join(commonprogfiles, "Cardinal"); #else asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; From 5072463703cc2a0497b311f7e88a7e336a215382 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Mar 2022 16:25:06 +0000 Subject: [PATCH 092/132] Make JACK Standalone more useful on windows Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index a941917..1ec670c 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit a941917f15be21e6bdce6793addec225537cccc5 +Subproject commit 1ec670c9cc7fef66dfc42802a4b69e285bb7455e From 0badb6561129b0c2a103cd2e9ea965ccca10b571 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Mar 2022 17:07:19 +0000 Subject: [PATCH 093/132] Ensure OpenGL context is still valid after UI is resized Fixes #186 Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 1ec670c..f26b814 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 1ec670c9cc7fef66dfc42802a4b69e285bb7455e +Subproject commit f26b8147d309f8b3cdcaa6b3e6d8dac773658009 From 8931eaf89922a2bccbf6691df7d98590f9d89c57 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Mar 2022 22:17:20 +0100 Subject: [PATCH 094/132] Update ihtsyn for unitialized vars fix; Add Interverb patch Signed-off-by: falkTX --- patches/DRMR_-_Interverb.vcv | 657 +++++++++++++++++++++++++++++++++++ plugins/ihtsyn | 2 +- 2 files changed, 658 insertions(+), 1 deletion(-) create mode 100644 patches/DRMR_-_Interverb.vcv diff --git a/patches/DRMR_-_Interverb.vcv b/patches/DRMR_-_Interverb.vcv new file mode 100644 index 0000000..6a6fa18 --- /dev/null +++ b/patches/DRMR_-_Interverb.vcv @@ -0,0 +1,657 @@ +{ + "version": "2.0", + "zoom": 1.0, + "gridOffset": [ + -3.4424479007720947, + 0.86171877384185791 + ], + "modules": [ + { + "id": 1184757612963547, + "plugin": "Valley", + "model": "Interzone", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 1.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.26100000739097595, + "id": 6 + }, + { + "value": 0.26799961924552917, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.23399992287158966, + "id": 11 + }, + { + "value": 1.8360022306442261, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 1.0, + "id": 14 + }, + { + "value": 0.24399974942207336, + "id": 15 + }, + { + "value": 0.92999976873397827, + "id": 16 + }, + { + "value": 0.48200002312660217, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 8.0599746704101562, + "id": 20 + }, + { + "value": 3.6200008392333984, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 1.0, + "id": 23 + }, + { + "value": 0.24999970197677612, + "id": 24 + }, + { + "value": 0.058000005781650543, + "id": 25 + }, + { + "value": 0.45800071954727173, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.46746969223022461, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.20722892880439758, + "id": 32 + }, + { + "value": 1.0, + "id": 33 + }, + { + "value": 0.60399961471557617, + "id": 34 + }, + { + "value": 0.24399995803833008, + "id": 35 + }, + { + "value": 0.85800004005432129, + "id": 36 + }, + { + "value": 0.25000002980232239, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 1.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + } + ], + "data": { + "panelStyle": 0 + }, + "pos": [ + 12, + 1 + ] + }, + { + "id": 7479062205976098, + "plugin": "repelzen", + "model": "rexmix", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": -11.855396270751953, + "id": 4 + }, + { + "value": -10.481927871704102, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": -60.0, + "id": 7 + }, + { + "value": -60.0, + "id": 8 + }, + { + "value": -60.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": -0.21927711367607117, + "id": 34 + }, + { + "value": 0.26265060901641846, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.66747087240219116, + "id": 40 + }, + { + "value": 0.31686747074127197, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + } + ], + "rightModuleId": 1, + "pos": [ + 47, + 1 + ] + }, + { + "id": 5265678395554143, + "plugin": "ihtsyn", + "model": "MVerb", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.31204831600189209, + "id": 1 + }, + { + "value": 0.69638609886169434, + "id": 2 + }, + { + "value": 0.50963789224624634, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.68000000715255737, + "id": 5 + }, + { + "value": 0.60000002384185791, + "id": 6 + }, + { + "value": 0.80000001192092896, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + } + ], + "pos": [ + 50, + 0 + ] + }, + { + "id": 8996849652715896, + "plugin": "Cardinal", + "model": "Carla", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + } + ], + "data": "\n\n\n \n false\n false\n false\n true\n 200\n 4000\n \n \n \n \n \n \n \n \n \n\n \n \n\n", + "pos": [ + 123, + 1 + ] + }, + { + "id": 644714212872810, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "data": { + "filepath": "", + "lang": "None", + "etext": " \n ^ ^ ,_, \n (O,O) (.,.) \n ( ) ( ) \n--------\"-\"---dwb--\"-\"---dwb- \n\nversatile 4 voice polyphonic synth with a bit\nof reverb\n\nParam1: pulse width modulation\nParam2: filter frequency\nParam3: filter resonance\n\n\n /^--^\\ /^--^\\ /^--^\\ \n \\____/ \\____/ \\____/ \n / \\ / \\ / \\ \n | | | | | | \n \\__ __/ \\__ __/ \\__ __/ \n|^|^|^|^\\ \\^|^|^|^/ /^|^|^|^|^\\ \\^|^|^|^|^|^|^|^|^|\n| | | | |\\ \\| | |/ /| | | | | |\\ \\| | | | | | | | |\n#########/ /#####\\ \\###########/ /#################\n| | | | |\\/ | | | \\/| | | | | |\\/ | | | | | | | | |\n|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\n\n\n\n\n\n\n", + "width": 27 + }, + "pos": [ + 2, + 2 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 7479062205976098, + "data": { + "dcFilter": true + }, + "pos": [ + 75, + 1 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "data": { + "smooth": true, + "channels": 4, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + 0, + 1 + ] + }, + { + "id": 4, + "plugin": "Cardinal", + "model": "HostParameters", + "version": "2.0", + "params": [], + "pos": [ + 32, + 2 + ] + } + ], + "cables": [ + { + "id": 6433670563492534, + "outputModuleId": 7479062205976098, + "outputId": 1, + "inputModuleId": 1, + "inputId": 1, + "color": "#67ff52" + }, + { + "id": 7811632878270413, + "outputModuleId": 7479062205976098, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#52ff7d" + }, + { + "id": 5639365994348230, + "outputModuleId": 1184757612963547, + "outputId": 5, + "inputModuleId": 7479062205976098, + "inputId": 4, + "color": "#6752ff" + }, + { + "id": 4697080526212779, + "outputModuleId": 7479062205976098, + "outputId": 3, + "inputModuleId": 5265678395554143, + "inputId": 1, + "color": "#527dff" + }, + { + "id": 749068877206824, + "outputModuleId": 7479062205976098, + "outputId": 2, + "inputModuleId": 5265678395554143, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 385489337409134, + "outputModuleId": 5265678395554143, + "outputId": 1, + "inputModuleId": 7479062205976098, + "inputId": 1, + "color": "#52ffff" + }, + { + "id": 6967686280457428, + "outputModuleId": 5265678395554143, + "outputId": 0, + "inputModuleId": 7479062205976098, + "inputId": 0, + "color": "#52ffbe" + }, + { + "id": 8997840924253604, + "outputModuleId": 4, + "outputId": 0, + "inputModuleId": 1184757612963547, + "inputId": 2, + "color": "#a852ff" + }, + { + "id": 2740863142747665, + "outputModuleId": 4, + "outputId": 1, + "inputModuleId": 1184757612963547, + "inputId": 7, + "color": "#e952ff" + }, + { + "id": 5297103153509182, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 1184757612963547, + "inputId": 3, + "color": "#ff9352" + }, + { + "id": 7340028675801259, + "outputModuleId": 4, + "outputId": 2, + "inputModuleId": 1184757612963547, + "inputId": 8, + "color": "#ff5252" + }, + { + "id": 5629473447667825, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 1184757612963547, + "inputId": 0, + "color": "#ff5252" + } + ] +} diff --git a/plugins/ihtsyn b/plugins/ihtsyn index 31c4229..1b77e3c 160000 --- a/plugins/ihtsyn +++ b/plugins/ihtsyn @@ -1 +1 @@ -Subproject commit 31c4229eb328f6aaa4024f76c595b55213cdf1cf +Subproject commit 1b77e3c3ba12734bbd29a4aa59dd408e679b5cf7 From a82af5aff855a6821e5ee878ae3c09d3c7fb3122 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Mar 2022 22:58:05 +0100 Subject: [PATCH 095/132] Fix ChowDSP Credit module Closes #98 Signed-off-by: falkTX --- plugins/ChowDSP | 2 +- plugins/Makefile | 3 +-- plugins/plugins.cpp | 5 +---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/ChowDSP b/plugins/ChowDSP index 80f61cd..52f89b9 160000 --- a/plugins/ChowDSP +++ b/plugins/ChowDSP @@ -1 +1 @@ -Subproject commit 80f61cd0171bb7d988c9ec3a144e0566d62c767c +Subproject commit 52f89b94a25828f9debf8bca4d58854fb1e70228 diff --git a/plugins/Makefile b/plugins/Makefile index 11fdfae..e0dcbff 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -457,8 +457,7 @@ BOGAUDIO_CUSTOM_PER_FILE = ARQuantity AttackMenuItem ReleaseMenuItem # -------------------------------------------------------------- # ChowDSP -# Credit module crashes on save, see https://github.com/DISTRHO/Cardinal/issues/98 -PLUGIN_FILES += $(filter-out ChowDSP/src/Credit.cpp,$(wildcard ChowDSP/src/*/*.cpp)) +PLUGIN_FILES += $(wildcard ChowDSP/src/*/*.cpp) PLUGIN_FILES += $(wildcard ChowDSP/src/*/*/*.cpp) PLUGIN_FILES += $(wildcard ChowDSP/lib/r8lib/*.cpp) diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 448d2c4..3846535 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1471,16 +1471,13 @@ static void initStatic__ChowDSP() p->addModel(modelChowDer); p->addModel(modelWarp); p->addModel(modelWerner); + p->addModel(modelCredit); p->addModel(modelChowPulse); p->addModel(modelChowTapeCompression); p->addModel(modelChowTapeChew); p->addModel(modelChowTapeDegrade); p->addModel(modelChowTapeLoss); p->addModel(modelChowChorus); - - // Credit crashes on save, see https://github.com/DISTRHO/Cardinal/issues/98 - // p->addModel(modelCredit); - spl.removeModule("Credit"); } } From 05cac6e738e5c4811aa7131fff99f9c08fef8e41 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Mar 2022 14:13:29 +0100 Subject: [PATCH 096/132] Make DBus desktop portal start automatically Signed-off-by: falkTX --- dpf | 2 +- src/CardinalCommon.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dpf b/dpf index f26b814..2e224d4 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit f26b8147d309f8b3cdcaa6b3e6d8dac773658009 +Subproject commit 2e224d4a7fda99a705879648a3b335f6c12b131f diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 1670a8b..b946ef7 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -131,6 +131,7 @@ void loadDialog() FileBrowserOptions opts; opts.startDir = dir.c_str(); opts.saving = ui->saving = false; + opts.title = "Open patch"; ui->openFileBrowser(opts); }); #endif @@ -227,6 +228,7 @@ static void saveAsDialog(const bool uncompressed) FileBrowserOptions opts; opts.startDir = dir.c_str(); opts.saving = ui->saving = true; + opts.title = "Save patch"; ui->savingUncompressed = uncompressed; ui->openFileBrowser(opts); } From 8311fb6641076d0afa18d3870588736e6d86f29c Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Mar 2022 15:40:55 +0100 Subject: [PATCH 097/132] Update carla for windows utf16 fixes Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 9758218..f55b034 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 97582181926ed102e1e7080e456c2adebbf803fa +Subproject commit f55b034fb53d354fc4b0e025babc6cc3679ed6d1 diff --git a/dpf b/dpf index 2e224d4..c122af4 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 2e224d4a7fda99a705879648a3b335f6c12b131f +Subproject commit c122af48955dace9d01ada91b05d8d7359a9f08d From f5ca52b5e4f61d84b4860e36ae953301f93f57a0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Mar 2022 20:53:27 +0100 Subject: [PATCH 098/132] Fix VST3 state under some hosts See https://github.com/DISTRHO/DPF/issues/370 Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index c122af4..e512b25 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit c122af48955dace9d01ada91b05d8d7359a9f08d +Subproject commit e512b25281af5887033dae4bfb1c10c40c18fde7 From 1628f29a9821748ac237904aefa6f6bc1dd91e9c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 2 Apr 2022 03:18:23 +0100 Subject: [PATCH 099/132] Do not show resize handle on standalone Signed-off-by: falkTX --- dpf | 2 +- src/CardinalCommon.cpp | 6 ++++++ src/CardinalCommon.hpp | 2 ++ src/override/Scene.cpp | 8 ++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dpf b/dpf index e512b25..1bab226 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit e512b25281af5887033dae4bfb1c10c40c18fde7 +Subproject commit 1bab2267628ec5c58e8b41d9df4f346bbde3545a diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index b946ef7..43c3545 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -29,6 +29,7 @@ #include "AsyncDialog.hpp" #include "PluginContext.hpp" +#include "DistrhoPluginUtils.hpp" #include #include @@ -58,6 +59,11 @@ namespace settings { int rateLimit = 0; } +bool isStandalone() +{ + return std::strstr(getPluginFormatName(), "JACK") != nullptr; +} + #ifdef ARCH_WIN std::string getSpecialPath(const SpecialPath type) { diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 961c340..e7584c8 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -41,6 +41,8 @@ namespace window { void generateScreenshot(); } +bool isStandalone(); + #ifdef ARCH_WIN enum SpecialPath { kSpecialPathUserProfile, diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 82f09e3..03c4354 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -127,7 +127,7 @@ struct ResizeHandle : widget::OpaqueWidget { struct Scene::Internal { - ResizeHandle* resizeHandle; + ResizeHandle* resizeHandle = nullptr; bool heldArrowKeys[4] = {}; @@ -173,6 +173,9 @@ Scene::Scene() { browser->hide(); addChild(browser); + if (isStandalone()) + return; + internal->resizeHandle = new ResizeHandle; internal->resizeHandle->box.size = math::Vec(16, 16); addChild(internal->resizeHandle); @@ -200,7 +203,8 @@ void Scene::step() { rackScroll->box.pos.y = menuBar->box.size.y; } - internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size); + if (internal->resizeHandle != nullptr) + internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size); // Resize owned descendants menuBar->box.size.x = box.size.x; From 3318ae17d0dc6e69d61aa46a3b8aa0c947cbb396 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 4 Apr 2022 17:02:03 +0100 Subject: [PATCH 100/132] Bump version Signed-off-by: falkTX --- Makefile | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c52793a..be7735c 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ # also set in: # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.03 +VERSION = 22.04 # -------------------------------------------------------------- # Import base definitions diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 43c3545..c5414ba 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -52,7 +52,7 @@ # include #endif -const std::string CARDINAL_VERSION = "22.03"; +const std::string CARDINAL_VERSION = "22.04"; namespace rack { namespace settings { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index c5779f2..730aef4 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -593,7 +593,7 @@ protected: uint32_t getVersion() const override { - return d_version(0, 22, 3); + return d_version(0, 22, 4); } int64_t getUniqueId() const override From 9d89f16e54eea34aa5d63fa9b6120564571c7da8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 4 Apr 2022 17:31:15 +0100 Subject: [PATCH 101/132] Refresh default template, add fx and synth variants of those Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 14 ++- src/Makefile.cardinal.mk | 4 +- src/template-fx.vcv | 161 ++++++++++++++++++++++++++ src/template-synth.vcv | 238 +++++++++++++++++++++++++++++++++++++++ src/template.vcv | 90 ++++++++++++--- 5 files changed, 485 insertions(+), 22 deletions(-) create mode 100644 src/template-fx.vcv create mode 100644 src/template-synth.vcv diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 730aef4..060af58 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -57,6 +57,14 @@ static const constexpr uint kCardinalStateCount = 4; // patch, screenshot, comme static const constexpr uint kCardinalStateCount = 3; // patch, screenshot, comment #endif +#if CARDINAL_VARIANT_FX +# define CARDINAL_TEMPLATE_NAME "template-fx.vcv" +#elif CARDINAL_VARIANT_SYNTH +# define CARDINAL_TEMPLATE_NAME "template-synth.vcv" +#else +# define CARDINAL_TEMPLATE_NAME "template.vcv" +#endif + namespace rack { namespace plugin { void initStaticPlugins(); @@ -134,7 +142,7 @@ struct Initializer { asset::bundlePath = system::join(resourcePath, "PluginManifests"); asset::systemDir = resourcePath; - templatePath = system::join(asset::systemDir, "template.vcv"); + templatePath = system::join(asset::systemDir, CARDINAL_TEMPLATE_NAME); } } @@ -146,7 +154,7 @@ struct Initializer if (system::exists(system::join(asset::systemDir, "res"))) { - templatePath = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "template.vcv"; + templatePath = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR CARDINAL_TEMPLATE_NAME; } // If source code dir does not exist use install target prefix as system dir else @@ -165,7 +173,7 @@ struct Initializer if (! asset::systemDir.empty()) { asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); - templatePath = system::join(asset::systemDir, "template.vcv"); + templatePath = system::join(asset::systemDir, CARDINAL_TEMPLATE_NAME); } } } diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 5756bbd..fd42c24 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -272,7 +272,9 @@ all: lv2 vst2 vst3 static endif CORE_RESOURCES = $(subst ../Rack/res/,,$(wildcard ../Rack/res/ComponentLibrary/*.svg ../Rack/res/fonts/*.ttf)) -CORE_RESOURCES += template.vcv +CORE_RESOURCES += $(subst ../,,$(wildcard ../template*.vcv)) + +$(error $(CORE_RESOURCES)) LV2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).lv2/resources/%) VST3_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%) diff --git a/src/template-fx.vcv b/src/template-fx.vcv new file mode 100644 index 0000000..ee13a7a --- /dev/null +++ b/src/template-fx.vcv @@ -0,0 +1,161 @@ +{ + "version": "2.1", + "path": "/Shared/Personal/FOSS/GIT/DISTRHO/DISTRHO_Cardinal/src/template-fx.vcv", + "unsaved": true, + "zoom": 1.0, + "modules": [ + { + "id": 8712245256622475, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "leftModuleId": 4, + "data": { + "filepath": "", + "lang": "None", + "etext": "Welcome to Cardinal!\n\nThis is the FX variant\nIt has 2 audio ports, plus MIDI\n\nAudio and MIDI is pass-through in\nthe default patch\n\n", + "width": 19 + }, + "pos": [ + 34, + 0 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "rightModuleId": 2, + "data": { + "dcFilter": true + }, + "pos": [ + 0, + 0 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "leftModuleId": 1, + "rightModuleId": 3, + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + 8, + 0 + ] + }, + { + "id": 3, + "plugin": "Cardinal", + "model": "HostTime", + "version": "2.0", + "params": [], + "leftModuleId": 2, + "rightModuleId": 4, + "pos": [ + 17, + 0 + ] + }, + { + "id": 4, + "plugin": "Cardinal", + "model": "HostParameters", + "version": "2.0", + "params": [], + "leftModuleId": 3, + "rightModuleId": 8712245256622475, + "pos": [ + 25, + 0 + ] + } + ], + "cables": [ + { + "id": 4678253779474352, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 2, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 7683580154025470, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 2, + "inputId": 1, + "color": "#ff9352" + }, + { + "id": 8430980435213069, + "outputModuleId": 2, + "outputId": 2, + "inputModuleId": 2, + "inputId": 2, + "color": "#ffd452" + }, + { + "id": 4583111412242866, + "outputModuleId": 2, + "outputId": 3, + "inputModuleId": 2, + "inputId": 3, + "color": "#e8ff52" + }, + { + "id": 4427623524544856, + "outputModuleId": 2, + "outputId": 4, + "inputModuleId": 2, + "inputId": 4, + "color": "#a8ff52" + }, + { + "id": 6950452937672903, + "outputModuleId": 2, + "outputId": 5, + "inputModuleId": 2, + "inputId": 5, + "color": "#67ff52" + }, + { + "id": 3491422883476882, + "outputModuleId": 1, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 4569757452962581, + "outputModuleId": 1, + "outputId": 1, + "inputModuleId": 1, + "inputId": 1, + "color": "#527dff" + } + ] +} diff --git a/src/template-synth.vcv b/src/template-synth.vcv new file mode 100644 index 0000000..a83399c --- /dev/null +++ b/src/template-synth.vcv @@ -0,0 +1,238 @@ +{ + "version": "2.1", + "path": "/Shared/Personal/FOSS/GIT/DISTRHO/DISTRHO_Cardinal/src/template-fx.vcv", + "unsaved": true, + "zoom": 1.0, + "modules": [ + { + "id": 8712245256622475, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "leftModuleId": 4, + "data": { + "filepath": "", + "lang": "None", + "etext": "Welcome to Cardinal!\n\nThis is the Synth variant\nIt has 2 audio outputs, plus MIDI\n\nA basic VCO + ADSR + VCA is\nthe default patch\n\n", + "width": 19 + }, + "pos": [ + 43, + 0 + ] + }, + { + "id": 674529428127255, + "plugin": "Bogaudio", + "model": "Bogaudio-ADSR", + "version": "2.0", + "params": [ + { + "value": 0.069131895899772644, + "id": 0 + }, + { + "value": 0.31622999906539917, + "id": 1 + }, + { + "value": 1.0, + "id": 2 + }, + { + "value": 0.31622999906539917, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 331777374771466, + "rightModuleId": 3281475959768191, + "data": { + "invert": 1.0 + }, + "pos": [ + 12, + 0 + ] + }, + { + "id": 3281475959768191, + "plugin": "Bogaudio", + "model": "Bogaudio-VCAmp", + "version": "2.0", + "params": [ + { + "value": 0.83333331346511841, + "id": 0 + } + ], + "leftModuleId": 674529428127255, + "rightModuleId": 1, + "data": {}, + "pos": [ + 15, + 0 + ] + }, + { + "id": 331777374771466, + "plugin": "Bogaudio", + "model": "Bogaudio-LVCO", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.02500000037252903, + "id": 3 + } + ], + "leftModuleId": 2, + "rightModuleId": 674529428127255, + "data": { + "poly_input": 0, + "dc_correction": true, + "fm_mode": false, + "linear_mode": false, + "reset_on_wave_change": false + }, + "pos": [ + 9, + 0 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 3281475959768191, + "rightModuleId": 3, + "data": { + "dcFilter": true + }, + "pos": [ + 18, + 0 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "rightModuleId": 331777374771466, + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + 0, + 0 + ] + }, + { + "id": 3, + "plugin": "Cardinal", + "model": "HostTime", + "version": "2.0", + "params": [], + "leftModuleId": 1, + "rightModuleId": 4, + "pos": [ + 26, + 0 + ] + }, + { + "id": 4, + "plugin": "Cardinal", + "model": "HostParameters", + "version": "2.0", + "params": [], + "leftModuleId": 3, + "rightModuleId": 8712245256622475, + "pos": [ + 34, + 0 + ] + } + ], + "cables": [ + { + "id": 4819926075235968, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 331777374771466, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 2420818759782995, + "outputModuleId": 331777374771466, + "outputId": 0, + "inputModuleId": 3281475959768191, + "inputId": 1, + "color": "#67ff52" + }, + { + "id": 5329555665685235, + "outputModuleId": 674529428127255, + "outputId": 0, + "inputModuleId": 3281475959768191, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 4079786865533706, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 674529428127255, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 3101737648049587, + "outputModuleId": 3281475959768191, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 537659689081948, + "outputModuleId": 2, + "outputId": 2, + "inputModuleId": 331777374771466, + "inputId": 1, + "color": "#ffd452" + } + ] +} diff --git a/src/template.vcv b/src/template.vcv index 0ddaf29..91bf456 100644 --- a/src/template.vcv +++ b/src/template.vcv @@ -1,24 +1,23 @@ { - "version": "2.0", + "version": "2.1", + "unsaved": true, "zoom": 1.0, "modules": [ { - "id": 1, + "id": 2799203590388841, "plugin": "Cardinal", - "model": "HostAudio2", + "model": "TextEditor", "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - } - ], - "rightModuleId": 2, + "params": [], + "leftModuleId": 4, "data": { - "dcFilter": true + "filepath": "", + "lang": "None", + "etext": "Welcome to Cardinal!\n\nThis is the main variant\nIt has 8 audio ports, 10 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nHave fun!\n\n", + "width": 23 }, "pos": [ - 0, + 42, 0 ] }, @@ -28,10 +27,20 @@ "model": "HostMIDI", "version": "2.0", "params": [], - "leftModuleId": 1, + "leftModuleId": 7249509538355161, "rightModuleId": 3, + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, "pos": [ - 8, + 16, 0 ] }, @@ -44,7 +53,7 @@ "leftModuleId": 2, "rightModuleId": 4, "pos": [ - 17, + 25, 0 ] }, @@ -55,12 +64,57 @@ "version": "2.0", "params": [], "leftModuleId": 3, + "rightModuleId": 2799203590388841, "pos": [ - 25, + 33, + 0 + ] + }, + { + "id": 7249509538355161, + "plugin": "Cardinal", + "model": "HostCV", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "leftModuleId": 3606136179759592, + "rightModuleId": 2, + "pos": [ + 8, + 0 + ] + }, + { + "id": 3606136179759592, + "plugin": "Cardinal", + "model": "HostAudio8", + "version": "2.0", + "params": [], + "rightModuleId": 7249509538355161, + "data": { + "dcFilter": false + }, + "pos": [ + 0, 0 ] } ], - "cables": [], - "masterModuleId": 1 + "cables": [] } From a65840d2cdb3d1229ef71a6871d301d45b96506b Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 4 Apr 2022 20:17:40 +0100 Subject: [PATCH 102/132] Remove line added during testing, sorry! Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index fd42c24..ee56b7a 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -274,8 +274,6 @@ endif CORE_RESOURCES = $(subst ../Rack/res/,,$(wildcard ../Rack/res/ComponentLibrary/*.svg ../Rack/res/fonts/*.ttf)) CORE_RESOURCES += $(subst ../,,$(wildcard ../template*.vcv)) -$(error $(CORE_RESOURCES)) - LV2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).lv2/resources/%) VST3_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%) From d633abc35c9f8255aaf1f057244b4a2b95517e13 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 4 Apr 2022 21:46:57 +0100 Subject: [PATCH 103/132] Fix build Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- src/Makefile.cardinal.mk | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/carla b/carla index f55b034..04558b6 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit f55b034fb53d354fc4b0e025babc6cc3679ed6d1 +Subproject commit 04558b63101de55556733edfa4a369b51f36e9b3 diff --git a/dpf b/dpf index 1bab226..c2f66ac 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 1bab2267628ec5c58e8b41d9df4f346bbde3545a +Subproject commit c2f66ac3c7d62082d38cc806bd86e15cebb9c6a7 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index ee56b7a..45661a2 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -320,6 +320,14 @@ $(TARGET_DIR)/%/template.vcv: ../template.vcv -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +$(TARGET_DIR)/%/template-fx.vcv: ../template-fx.vcv + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + +$(TARGET_DIR)/%/template-synth.vcv: ../template-synth.vcv + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + $(TARGET_DIR)/$(NAME).lv2/resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ From 6795d8acba64ed3c63076e3856d19f4c653c7eed Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 4 Apr 2022 21:54:26 +0100 Subject: [PATCH 104/132] Do not ship with fundamental on this release, WIP Signed-off-by: falkTX --- plugins/plugins.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 3846535..2cc5433 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1582,6 +1582,7 @@ static void initStatic__FehlerFabrik() } } +/* TODO enable this when ready, WIP static void initStatic__Fundamental() { Plugin* const p = new Plugin; @@ -1622,6 +1623,7 @@ static void initStatic__Fundamental() spl.removeModule("Random"); } } +*/ static void initStatic__GlueTheGiant() { @@ -2497,7 +2499,9 @@ void initStaticPlugins() initStatic__ExpertSleepersEncoders(); initStatic__Extratone(); initStatic__FehlerFabrik(); + /* TODO enable this when ready, WIP initStatic__Fundamental(); + */ initStatic__GlueTheGiant(); initStatic__GoodSheperd(); initStatic__GrandeModular(); From 3e50cb16a84c8827f1250dc265e040f5b84aac2f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 11 Apr 2022 14:40:27 +0100 Subject: [PATCH 105/132] Mention how to manually start xdg-desktop-portal in FAQ Signed-off-by: falkTX --- README.md | 1 - docs/FAQ.md | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8568088..3f4d1df 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ Though currently the following should be noted: - Keyboard input does not always work in some hosts [#24](https://github.com/DISTRHO/Cardinal/issues/24) - VST3 support incomplete/experimental [#41](https://github.com/DISTRHO/Cardinal/issues/41) - Windows 32bit builds do not work well [#80](https://github.com/DISTRHO/Cardinal/issues/80) -- Windows High-DPI issues [#186](https://github.com/DISTRHO/Cardinal/issues/186) ### Stable release diff --git a/docs/FAQ.md b/docs/FAQ.md index 5220605..5619603 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -64,9 +64,15 @@ As a plugin, the state will be saved together with the host/DAW project. ## On BSD/Linux/X11 the menu item "Save As/Export..." does nothing The save-file dialogs in Cardinal requires a working [xdg-desktop-portal](https://github.com/flatpak/xdg-desktop-portal) DBus implementation from your desktop environment. -Typically your desktop already provides this, if not consider looking for a package to install with "desktop-portal" in the name. +Typically your desktop already provides this, if not consider looking for a package to install with "desktop-portal" in the name. +If you are running a window manager without a "real" desktop environment (like custom X11 or i3 setups), +you will need to manually activate the systemd unit that provides these DBus services, like so: -The open-file dialogs in Cardinal do not have this restriction, with a fallback in case desktop portal is not available. +``` +systemctl enable xdg-desktop-portal --user --now +``` + +Note: The open-file dialogs in Cardinal do not have this restriction, with a fallback in case the desktop portal is not available. ## Why IRC and not Discord? From fa67ab98c3ee4347955a452e83e7c87e7cd6d6ce Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 11 Apr 2022 18:54:37 +0100 Subject: [PATCH 106/132] Update bidoo Signed-off-by: falkTX --- plugins/Bidoo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Bidoo b/plugins/Bidoo index 07cc605..f771bf2 160000 --- a/plugins/Bidoo +++ b/plugins/Bidoo @@ -1 +1 @@ -Subproject commit 07cc6054e39d2832a32a51cfe56bb0b700cb8eb5 +Subproject commit f771bf270393b8587516329614ba76e2894355b7 From cafceb66173ce2f372cf047d0c367490831180d1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 14 Apr 2022 00:02:21 +0100 Subject: [PATCH 107/132] Cache entire build --- .github/workflows/build.yml | 94 ++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f76f0a5..fb65556 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 12 + CACHE_VERSION: 13 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -17,10 +17,14 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build key: linux-arm64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -41,12 +45,21 @@ jobs: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux arm64 cross-compiled run: | pushd deps/PawPaw; source local.env linux-aarch64; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -83,10 +96,14 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build key: linux-armhf-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -107,12 +124,21 @@ jobs: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux armhf cross-compiled run: | pushd deps/PawPaw; source local.env linux-armhf; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -149,10 +175,14 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build key: linux-i686-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -169,12 +199,21 @@ jobs: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux i686 run: | pushd deps/PawPaw; source local.env linux-i686; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -211,10 +250,14 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build key: linux-x86_64-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | @@ -223,12 +266,21 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh linux + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux x86_64 run: | pushd deps/PawPaw; source local.env linux; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -324,10 +376,15 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build + jucewrapper/build key: macos-universal-v${{ env.CACHE_VERSION }} - name: Fix up Xcode run: | @@ -336,6 +393,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos-universal + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build macOS universal (base) run: | pushd deps/PawPaw; source local.env macos-universal; popd @@ -352,6 +415,9 @@ jobs: run: | pushd deps/PawPaw; source local.env macos-universal; popd ./utils/create-macos-installer.sh + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -505,10 +571,14 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build key: win32-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -523,6 +593,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win32 + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win32 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win32; popd @@ -538,6 +614,9 @@ jobs: run: | pushd deps/PawPaw; source local.env win32; popd xvfb-run ./utils/create-windows-installer.sh 32 + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -576,10 +655,14 @@ jobs: with: submodules: recursive - name: Set up cache + id: cache uses: actions/cache@v2 with: path: | ~/PawPawBuilds + build + carla/build + dpf/build key: win64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -594,6 +677,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win64 + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win64 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win64; popd @@ -609,6 +698,9 @@ jobs: run: | pushd deps/PawPaw; source local.env win64; popd xvfb-run ./utils/create-windows-installer.sh 64 + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 From b57cb219b2c8deb4300a53358c6d05adf1764cc3 Mon Sep 17 00:00:00 2001 From: unless games <38718816+unlessgames@users.noreply.github.com> Date: Sat, 16 Apr 2022 11:09:31 +0000 Subject: [PATCH 108/132] adding unless_modules (#209) * adding unless_modules * fix makefiles * add name to readme * update docs/LICENSES.md * update submodule --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 4 ++++ plugins/Makefile | 13 +++++++++++++ plugins/plugins.cpp | 29 +++++++++++++++++++++++++++++ plugins/unless_modules | 1 + 6 files changed, 51 insertions(+) create mode 160000 plugins/unless_modules diff --git a/.gitmodules b/.gitmodules index 771ebb0..61cde09 100644 --- a/.gitmodules +++ b/.gitmodules @@ -187,3 +187,6 @@ [submodule "plugins/Fundamental"] path = plugins/Fundamental url = https://github.com/CardinalModules/Fundamental.git +[submodule "plugins/unless_modules"] + path = plugins/unless_modules + url = https://gitlab.com/unlessgames/unless_modules diff --git a/README.md b/README.md index 3f4d1df..66df12a 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,7 @@ At the moment the following 3rd-party modules are provided: - repelzen - Sonus Modular - stocaudio +- unless_modules - Valley - Voxglitch - ZetaCarinae diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 31c969a..117b4c0 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -65,6 +65,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | repelzen | GPL-3.0-or-later | | | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | +| unless_modules | GPL-3.0-or-later | | | Valley | GPL-3.0-or-later | | | Voxglitch | GPL-3.0-or-later | | | ZetaCarinae | GPL-3.0-or-later | | @@ -183,6 +184,9 @@ Below is a list of artwork licenses from plugins | repelzen/* | CC-BY-SA-4.0 | | | sonusmodular/* | GPL-3.0-or-later | [Same license as source code](https://gitlab.com/sonusdept/sonusmodular/-/issues/14) | | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | +| unless_modules/* | CC BY-NC-ND 4.0 | | +| unless_modules/font/CuteFont-Regular.ttf| OFL-1.1 | | +| unless_modules/font/Terminus.ttf | GPL-2.0 | | | ValleyAudio/* | GPL-3.0-or-later | [Same license as source code](https://github.com/ValleyAudio/ValleyRackFree/issues/73) | | ValleyAudio/din1451alt.ttf | CC-BY-3.0-DE | | | ValleyAudio/DSEG14Classic-*.ttf | OFL-1.1-RFN | | diff --git a/plugins/Makefile b/plugins/Makefile index e0dcbff..7bf218d 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -762,6 +762,12 @@ PLUGIN_FILES += $(filter-out sonusmodular/src/sonusmodular.cpp,$(wildcard sonusm PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/*.cpp)) +# -------------------------------------------------------------- + +# unless_modules + +PLUGIN_FILES += $(filter-out unless_modules/src/unless.cpp,$(wildcard unless_modules/src/*.cpp)) + # -------------------------------------------------------------- # ValleyAudio @@ -1689,6 +1695,13 @@ $(BUILD_DIR)/stocaudio/%.cpp.o: stocaudio/%.cpp $(foreach m,$(STOCAUDIO_CUSTOM),$(call custom_module_names,$(m),stocaudio)) \ -DpluginInstance=pluginInstance__stocaudio +$(BUILD_DIR)/unless_modules/%.cpp.o: unless_modules/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(UNLESS_MODULES_CUSTOM),$(call custom_module_names,$(m),unless_modules)) \ + -DpluginInstance=pluginInstance__unless_modules + $(BUILD_DIR)/ValleyAudio/%.cpp.o: ValleyAudio/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 2cc5433..d758390 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -647,6 +647,10 @@ extern Model* modelBlankPanel; // stocaudio #include "stocaudio/src/plugin.hpp" +// unless_modules +#include "unless_modules/src/unless.hpp" + + // ValleyAudio #include "ValleyAudio/src/Valley.hpp" @@ -735,6 +739,7 @@ Plugin* pluginInstance__rackwindows; Plugin* pluginInstance__repelzen; Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; +Plugin* pluginInstance__unless_modules; Plugin* pluginInstance__ValleyAudio; Plugin* pluginInstance__Voxglitch; Plugin* pluginInstance__ZetaCarinaeModules; @@ -2377,6 +2382,29 @@ static void initStatic__stocaudio() p->addModel(modelSpread); } } +static void initStatic__unless_modules() +{ + Plugin* const p = new Plugin; + pluginInstance__unless_modules = p; + + const StaticPluginLoader spl(p, "unless_modules"); + if (spl.ok()) + { + // unless_modules::init_theme(); + // theme = _less::Theme(); + p->addModel(modelPiong); + p->addModel(modelChainkov); + p->addModel(modelAtoms); + p->addModel(modelCantor); + p->addModel(modelRoom); + p->addModel(modelSnake); + p->addModel(modelTowers); + p->addModel(modelPianoid); + p->addModel(modelPremuter); + p->addModel(modelAvoider); + } +} + static void initStatic__ValleyAudio() { @@ -2531,6 +2559,7 @@ void initStaticPlugins() initStatic__repelzen(); initStatic__sonusmodular(); initStatic__stocaudio(); + initStatic__unless_modules(); initStatic__ValleyAudio(); initStatic__Voxglitch(); initStatic__ZetaCarinaeModules(); diff --git a/plugins/unless_modules b/plugins/unless_modules new file mode 160000 index 0000000..3f895c7 --- /dev/null +++ b/plugins/unless_modules @@ -0,0 +1 @@ +Subproject commit 3f895c7663e3e54c4e30c406c56d420ea407133e From 83ef7f224e753d4f0a091d2fa599d5b3d791eb92 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 16 Apr 2022 12:16:36 +0100 Subject: [PATCH 109/132] Fix whitespace and wording Signed-off-by: falkTX --- .gitmodules | 2 +- docs/LICENSES.md | 4 ++-- plugins/plugins.cpp | 27 +++++++++++++-------------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.gitmodules b/.gitmodules index 61cde09..6ecf1ba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -189,4 +189,4 @@ url = https://github.com/CardinalModules/Fundamental.git [submodule "plugins/unless_modules"] path = plugins/unless_modules - url = https://gitlab.com/unlessgames/unless_modules + url = https://gitlab.com/unlessgames/unless_modules.git diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 117b4c0..39b2ca4 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -184,9 +184,9 @@ Below is a list of artwork licenses from plugins | repelzen/* | CC-BY-SA-4.0 | | | sonusmodular/* | GPL-3.0-or-later | [Same license as source code](https://gitlab.com/sonusdept/sonusmodular/-/issues/14) | | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | -| unless_modules/* | CC BY-NC-ND 4.0 | | +| unless_modules/* | CC-BY-NC-ND-4.0 | | | unless_modules/font/CuteFont-Regular.ttf| OFL-1.1 | | -| unless_modules/font/Terminus.ttf | GPL-2.0 | | +| unless_modules/font/Terminus.ttf | GPL-2.0-or-later | [Starting from v4.32, font license is OFL-1.1](https://files.ax86.net/terminus-ttf/#license) | | ValleyAudio/* | GPL-3.0-or-later | [Same license as source code](https://github.com/ValleyAudio/ValleyRackFree/issues/73) | | ValleyAudio/din1451alt.ttf | CC-BY-3.0-DE | | | ValleyAudio/DSEG14Classic-*.ttf | OFL-1.1-RFN | | diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index d758390..36aaf44 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -650,7 +650,6 @@ extern Model* modelBlankPanel; // unless_modules #include "unless_modules/src/unless.hpp" - // ValleyAudio #include "ValleyAudio/src/Valley.hpp" @@ -2382,6 +2381,7 @@ static void initStatic__stocaudio() p->addModel(modelSpread); } } + static void initStatic__unless_modules() { Plugin* const p = new Plugin; @@ -2390,22 +2390,21 @@ static void initStatic__unless_modules() const StaticPluginLoader spl(p, "unless_modules"); if (spl.ok()) { - // unless_modules::init_theme(); - // theme = _less::Theme(); - p->addModel(modelPiong); - p->addModel(modelChainkov); - p->addModel(modelAtoms); - p->addModel(modelCantor); - p->addModel(modelRoom); - p->addModel(modelSnake); - p->addModel(modelTowers); - p->addModel(modelPianoid); - p->addModel(modelPremuter); - p->addModel(modelAvoider); + // unless_modules::init_theme(); + // theme = _less::Theme(); + p->addModel(modelPiong); + p->addModel(modelChainkov); + p->addModel(modelAtoms); + p->addModel(modelCantor); + p->addModel(modelRoom); + p->addModel(modelSnake); + p->addModel(modelTowers); + p->addModel(modelPianoid); + p->addModel(modelPremuter); + p->addModel(modelAvoider); } } - static void initStatic__ValleyAudio() { Plugin* const p = new Plugin; From d5410a00f4b14324f10e83c78eea5d54cecdcafa Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 16 Apr 2022 12:24:34 +0100 Subject: [PATCH 110/132] Add needed resources files for unless_modules Signed-off-by: falkTX --- plugins/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 7bf218d..fe4e185 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1029,6 +1029,10 @@ RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldShapes RESOURCE_FILES += Mog/res RESOURCE_FILES += nonlinearcircuits/res RESOURCE_FILES += ParableInstruments/res/Neil.png +RESOURCE_FILES += $(wildcard unless_modules/art/*.art) +RESOURCE_FILES += $(wildcard unless_modules/art/svg/*/*.svg) +RESOURCE_FILES += $(wildcard unless_modules/font/*.ttf) +# RESOURCE_FILES += $(wildcard unless_modules/manual/*) # MOD builds only have LV2 FX variant for now ifeq ($(MOD_BUILD),true) From 94ba48623a4fbf5bf77762c5f3ef0232098b84bd Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 16 Apr 2022 13:37:01 +0100 Subject: [PATCH 111/132] Fix build, improve caching Signed-off-by: falkTX --- .github/workflows/build.yml | 65 ++++++++++++++++++++++++++++++++++++- plugins/Makefile | 3 ++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb65556..929ca40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 13 + CACHE_VERSION: 14 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -25,6 +25,15 @@ jobs: build carla/build dpf/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: linux-arm64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -104,6 +113,15 @@ jobs: build carla/build dpf/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: linux-armhf-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -183,6 +201,15 @@ jobs: build carla/build dpf/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: linux-i686-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -258,6 +285,15 @@ jobs: build carla/build dpf/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: linux-x86_64-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | @@ -385,6 +421,15 @@ jobs: carla/build dpf/build jucewrapper/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: macos-universal-v${{ env.CACHE_VERSION }} - name: Fix up Xcode run: | @@ -579,6 +624,15 @@ jobs: build carla/build dpf/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: win32-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | @@ -663,6 +717,15 @@ jobs: build carla/build dpf/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 key: win64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | diff --git a/plugins/Makefile b/plugins/Makefile index fe4e185..31bc3c6 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -768,6 +768,9 @@ PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/* PLUGIN_FILES += $(filter-out unless_modules/src/unless.cpp,$(wildcard unless_modules/src/*.cpp)) +# modules/types which are present in other plugins +UNLESS_MODULES_CUSTOM = Selection + # -------------------------------------------------------------- # ValleyAudio From c9f303e45941680e8cf4dd3b2ff390744e04192a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 00:14:55 +0100 Subject: [PATCH 112/132] Restart fundamental for new designs, 8vert and vcf done Signed-off-by: falkTX --- plugins/Fundamental | 2 +- plugins/Makefile | 18 +++--- plugins/plugins.cpp | 146 +++++++++++++++++++++++++++++--------------- 3 files changed, 107 insertions(+), 59 deletions(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index 9159cc3..2b165b4 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 9159cc3182ff3f4ec981fe574bd5dd1a9ea59490 +Subproject commit 2b165b45036e0d33f63f7c95c3eeb2287023cd2f diff --git a/plugins/Makefile b/plugins/Makefile index 31bc3c6..f398e45 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -222,6 +222,15 @@ PLUGIN_FILES += $(wildcard Cardinal/src/DearImGui/*.cpp) PLUGIN_FILES += $(wildcard Cardinal/src/DearImGuiColorTextEditor/*.cpp) endif +# -------------------------------------------------------------- +# Fundamental (always enabled) + +PLUGIN_FILES += $(filter-out Fundamental/src/plugin.cpp,$(wildcard Fundamental/src/*.cpp)) +PLUGIN_FILES += Fundamental/src/dr_wav.c + +# modules/types which are present in other plugins +FUNDAMENTAL_CUSTOM = $(DRWAV) + ifneq ($(NOPLUGINS),true) # -------------------------------------------------------------- # 21kHz @@ -510,15 +519,6 @@ PLUGIN_FILES += $(filter-out FehlerFabrik/src/plugin.cpp,$(wildcard FehlerFabrik # modules/types which are present in other plugins FEHLERFABRIK_CUSTOM = Operator Sequencer SlewLimiter -# -------------------------------------------------------------- -# Fundamental - -PLUGIN_FILES += $(filter-out Fundamental/src/plugin.cpp,$(wildcard Fundamental/src/*.cpp)) -PLUGIN_FILES += Fundamental/src/dr_wav.c - -# modules/types which are present in other plugins -FUNDAMENTAL_CUSTOM = $(DRWAV) - # -------------------------------------------------------------- # GlueTheGiant diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 36aaf44..75bd641 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -23,6 +23,9 @@ // Cardinal (built-in) #include "Cardinal/src/plugin.hpp" +// Fundamental (always enabled) +#include "Fundamental/src/plugin.hpp" + #ifndef NOPLUGINS // 21kHz #include "21kHz/src/21kHz.hpp" @@ -306,9 +309,6 @@ void setupSamples(); // FehlerFabrik #include "FehlerFabrik/src/plugin.hpp" -// Fundamental -#include "Fundamental/src/plugin.hpp" - // GlueTheGiant #include "GlueTheGiant/src/plugin.hpp" bool audition_mixer = false; @@ -684,6 +684,7 @@ void saveHighQualityAsDefault(bool) {} // plugin instances Plugin* pluginInstance__Cardinal; +Plugin* pluginInstance__Fundamental; #ifndef NOPLUGINS Plugin* pluginInstance__21kHz; Plugin* pluginInstance__8Mode; @@ -708,7 +709,6 @@ Plugin* pluginInstance__ESeries; Plugin* pluginInstance__ExpertSleepersEncoders; Plugin* pluginInstance__Extratone; Plugin* pluginInstance__FehlerFabrik; -Plugin* pluginInstance__Fundamental; Plugin* pluginInstance__GlueTheGiant; Plugin* pluginInstance__GoodSheperd; Plugin* pluginInstance__GrandeModular; @@ -884,6 +884,98 @@ static void initStatic__Cardinal() } } +static void initStatic__Fundamental() +{ + Plugin* const p = new Plugin; + pluginInstance__Fundamental = p; + + const StaticPluginLoader spl(p, "Fundamental"); + if (spl.ok()) + { + p->addModel(model_8vert); + p->addModel(modelVCF); + + spl.removeModule("ADSR"); + // p->addModel(modelADSR); + + spl.removeModule("Delay"); + // p->addModel(modelDelay); + + spl.removeModule("LFO"); + // p->addModel(modelLFO); + + spl.removeModule("LFO2"); + // p->addModel(modelLFO2); + + spl.removeModule("Merge"); + // p->addModel(modelMerge); + + spl.removeModule("MidSide"); + // p->addModel(modelMidSide); + + spl.removeModule("Mixer"); + // p->addModel(modelMixer); + + spl.removeModule("Mutes"); + // p->addModel(modelMutes); + + spl.removeModule("Noise"); + // p->addModel(modelNoise); + + spl.removeModule("Octave"); + // p->addModel(modelOctave); + + spl.removeModule("Pulses"); + // p->addModel(modelPulses); + + spl.removeModule("Quantizer"); + // p->addModel(modelQuantizer); + + spl.removeModule("Random"); + // p->addModel(modelRandom); + + spl.removeModule("Scope"); + // p->addModel(modelScope); + + spl.removeModule("SEQ3"); + // p->addModel(modelSEQ3); + + spl.removeModule("SequentialSwitch1"); + // p->addModel(modelSequentialSwitch1); + + spl.removeModule("SequentialSwitch2"); + // p->addModel(modelSequentialSwitch2); + + spl.removeModule("Split"); + // p->addModel(modelSplit); + + spl.removeModule("Sum"); + // p->addModel(modelSum); + + spl.removeModule("Unity"); + // p->addModel(modelUnity); + + spl.removeModule("VCA"); + // p->addModel(modelVCA); + + spl.removeModule("VCA-1"); + // p->addModel(modelVCA_1); + + spl.removeModule("VCO"); + // p->addModel(modelVCO); + + spl.removeModule("VCO2"); + // p->addModel(modelVCO2); + + spl.removeModule("VCMixer"); + // p->addModel(modelVCMixer); + + spl.removeModule("Viz"); + // p->addModel(modelViz); + + } +} + #ifndef NOPLUGINS static void initStatic__21kHz() { @@ -1586,49 +1678,6 @@ static void initStatic__FehlerFabrik() } } -/* TODO enable this when ready, WIP -static void initStatic__Fundamental() -{ - Plugin* const p = new Plugin; - pluginInstance__Fundamental = p; - - const StaticPluginLoader spl(p, "Fundamental"); - if (spl.ok()) - { - p->addModel(modelVCF); - - // TODO - spl.removeModule("VCO"); - spl.removeModule("VCO2"); - spl.removeModule("VCA"); - spl.removeModule("VCA-1"); - spl.removeModule("LFO"); - spl.removeModule("LFO2"); - spl.removeModule("Delay"); - spl.removeModule("ADSR"); - spl.removeModule("Mixer"); - spl.removeModule("VCMixer"); - spl.removeModule("8vert"); - spl.removeModule("Unity"); - spl.removeModule("Mutes"); - spl.removeModule("Pulses"); - spl.removeModule("Scope"); - spl.removeModule("SEQ3"); - spl.removeModule("SequentialSwitch1"); - spl.removeModule("SequentialSwitch2"); - spl.removeModule("Octave"); - spl.removeModule("Quantizer"); - spl.removeModule("Split"); - spl.removeModule("Merge"); - spl.removeModule("Sum"); - spl.removeModule("Viz"); - spl.removeModule("MidSide"); - spl.removeModule("Noise"); - spl.removeModule("Random"); - } -} -*/ - static void initStatic__GlueTheGiant() { Plugin* const p = new Plugin; @@ -2502,6 +2551,7 @@ static void initStatic__ZZC() void initStaticPlugins() { initStatic__Cardinal(); + initStatic__Fundamental(); #ifndef NOPLUGINS initStatic__21kHz(); initStatic__8Mode(); @@ -2526,9 +2576,7 @@ void initStaticPlugins() initStatic__ExpertSleepersEncoders(); initStatic__Extratone(); initStatic__FehlerFabrik(); - /* TODO enable this when ready, WIP initStatic__Fundamental(); - */ initStatic__GlueTheGiant(); initStatic__GoodSheperd(); initStatic__GrandeModular(); From 6167d6bf13c0a1fdf87aeedd58dfb5eb30f96eb3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 01:40:44 +0100 Subject: [PATCH 113/132] Add fundamental scope, tweak build cache Signed-off-by: falkTX --- .github/workflows/build.yml | 9 ++++++++- deps/PawPaw | 2 +- plugins/Fundamental | 2 +- plugins/plugins.cpp | 4 +--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 929ca40..2c34397 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 14 + CACHE_VERSION: 15 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -22,6 +22,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build @@ -110,6 +111,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build @@ -198,6 +200,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build @@ -282,6 +285,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build @@ -417,6 +421,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build @@ -621,6 +626,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build @@ -714,6 +720,7 @@ jobs: with: path: | ~/PawPawBuilds + bin build carla/build dpf/build diff --git a/deps/PawPaw b/deps/PawPaw index 3738f32..01d0708 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 3738f32f133523c701393e1f9fd7248cddd1b488 +Subproject commit 01d07086586818e427b2898d2d446d30b68f3139 diff --git a/plugins/Fundamental b/plugins/Fundamental index 2b165b4..04c9637 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 2b165b45036e0d33f63f7c95c3eeb2287023cd2f +Subproject commit 04c963753e3b61fa206dcc9a34fd50b95ec35471 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 75bd641..42e9fad 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -893,6 +893,7 @@ static void initStatic__Fundamental() if (spl.ok()) { p->addModel(model_8vert); + p->addModel(modelScope); p->addModel(modelVCF); spl.removeModule("ADSR"); @@ -934,9 +935,6 @@ static void initStatic__Fundamental() spl.removeModule("Random"); // p->addModel(modelRandom); - spl.removeModule("Scope"); - // p->addModel(modelScope); - spl.removeModule("SEQ3"); // p->addModel(modelSEQ3); From 56569d9d35773b9fffc5222ce3b4bc5426b251d3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 02:39:52 +0100 Subject: [PATCH 114/132] Add fundamental VCO Signed-off-by: falkTX --- plugins/Fundamental | 2 +- plugins/plugins.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index 04c9637..d9bd1a6 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 04c963753e3b61fa206dcc9a34fd50b95ec35471 +Subproject commit d9bd1a6c35c3908ead341320d5fb75a52313fa1d diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 42e9fad..707c95a 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -895,6 +895,7 @@ static void initStatic__Fundamental() p->addModel(model_8vert); p->addModel(modelScope); p->addModel(modelVCF); + p->addModel(modelVCO); spl.removeModule("ADSR"); // p->addModel(modelADSR); @@ -959,9 +960,6 @@ static void initStatic__Fundamental() spl.removeModule("VCA-1"); // p->addModel(modelVCA_1); - spl.removeModule("VCO"); - // p->addModel(modelVCO); - spl.removeModule("VCO2"); // p->addModel(modelVCO2); From 157b16ee97572a3b8b8c4183b81c1fc4852d55d1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 14:00:41 +0100 Subject: [PATCH 115/132] Add fundamental ADSR and VCA-1 Signed-off-by: falkTX --- plugins/Fundamental | 2 +- plugins/plugins.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index d9bd1a6..5415148 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit d9bd1a6c35c3908ead341320d5fb75a52313fa1d +Subproject commit 54151485177f078c550a1f52f25b2c14a9cd3838 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 707c95a..22635f8 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -893,13 +893,12 @@ static void initStatic__Fundamental() if (spl.ok()) { p->addModel(model_8vert); + p->addModel(modelADSR); p->addModel(modelScope); + p->addModel(modelVCA_1); p->addModel(modelVCF); p->addModel(modelVCO); - spl.removeModule("ADSR"); - // p->addModel(modelADSR); - spl.removeModule("Delay"); // p->addModel(modelDelay); @@ -957,9 +956,6 @@ static void initStatic__Fundamental() spl.removeModule("VCA"); // p->addModel(modelVCA); - spl.removeModule("VCA-1"); - // p->addModel(modelVCA_1); - spl.removeModule("VCO2"); // p->addModel(modelVCO2); From 3494fd31d3054b110352bfdf6a378c3e3707a120 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 15:05:52 +0100 Subject: [PATCH 116/132] Add fundamental delay, lfo and merge Signed-off-by: falkTX --- plugins/Fundamental | 2 +- plugins/plugins.cpp | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index 5415148..87e215c 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 54151485177f078c550a1f52f25b2c14a9cd3838 +Subproject commit 87e215c017cf799032d11839ddc2b8e041bfdd7d diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 22635f8..a5bf4a6 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -894,23 +894,17 @@ static void initStatic__Fundamental() { p->addModel(model_8vert); p->addModel(modelADSR); + p->addModel(modelDelay); + p->addModel(modelLFO); + p->addModel(modelMerge); p->addModel(modelScope); p->addModel(modelVCA_1); p->addModel(modelVCF); p->addModel(modelVCO); - spl.removeModule("Delay"); - // p->addModel(modelDelay); - - spl.removeModule("LFO"); - // p->addModel(modelLFO); - spl.removeModule("LFO2"); // p->addModel(modelLFO2); - spl.removeModule("Merge"); - // p->addModel(modelMerge); - spl.removeModule("MidSide"); // p->addModel(modelMidSide); From cd26495950ca9db67125715b252b4227f9c0a232 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 18:37:47 +0100 Subject: [PATCH 117/132] Enable all fundamental, even unfinished panels; Delete Unity + Viz Signed-off-by: falkTX --- .github/workflows/build.yml | 16 +------- plugins/Fundamental | 2 +- plugins/plugins.cpp | 75 +++++++++---------------------------- 3 files changed, 19 insertions(+), 74 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c34397..98e1201 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 15 + CACHE_VERSION: 16 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -22,8 +22,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build src/Rack/dep/bin @@ -111,8 +109,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build src/Rack/dep/bin @@ -200,8 +196,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build src/Rack/dep/bin @@ -285,8 +279,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build src/Rack/dep/bin @@ -421,8 +413,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build jucewrapper/build @@ -626,8 +616,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build src/Rack/dep/bin @@ -720,8 +708,6 @@ jobs: with: path: | ~/PawPawBuilds - bin - build carla/build dpf/build src/Rack/dep/bin diff --git a/plugins/Fundamental b/plugins/Fundamental index 87e215c..19457a4 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 87e215c017cf799032d11839ddc2b8e041bfdd7d +Subproject commit 19457a411e8c662a05e83e32df4c7ffa1b2372c7 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index a5bf4a6..f6fa8c3 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -896,69 +896,28 @@ static void initStatic__Fundamental() p->addModel(modelADSR); p->addModel(modelDelay); p->addModel(modelLFO); + p->addModel(modelLFO2); p->addModel(modelMerge); + p->addModel(modelMidSide); + p->addModel(modelMixer); + p->addModel(modelMutes); + p->addModel(modelNoise); + p->addModel(modelOctave); + p->addModel(modelPulses); + p->addModel(modelQuantizer); + p->addModel(modelRandom); p->addModel(modelScope); + p->addModel(modelSEQ3); + p->addModel(modelSequentialSwitch1); + p->addModel(modelSequentialSwitch2); + p->addModel(modelSplit); + p->addModel(modelSum); + p->addModel(modelVCA); p->addModel(modelVCA_1); p->addModel(modelVCF); + p->addModel(modelVCMixer); p->addModel(modelVCO); - - spl.removeModule("LFO2"); - // p->addModel(modelLFO2); - - spl.removeModule("MidSide"); - // p->addModel(modelMidSide); - - spl.removeModule("Mixer"); - // p->addModel(modelMixer); - - spl.removeModule("Mutes"); - // p->addModel(modelMutes); - - spl.removeModule("Noise"); - // p->addModel(modelNoise); - - spl.removeModule("Octave"); - // p->addModel(modelOctave); - - spl.removeModule("Pulses"); - // p->addModel(modelPulses); - - spl.removeModule("Quantizer"); - // p->addModel(modelQuantizer); - - spl.removeModule("Random"); - // p->addModel(modelRandom); - - spl.removeModule("SEQ3"); - // p->addModel(modelSEQ3); - - spl.removeModule("SequentialSwitch1"); - // p->addModel(modelSequentialSwitch1); - - spl.removeModule("SequentialSwitch2"); - // p->addModel(modelSequentialSwitch2); - - spl.removeModule("Split"); - // p->addModel(modelSplit); - - spl.removeModule("Sum"); - // p->addModel(modelSum); - - spl.removeModule("Unity"); - // p->addModel(modelUnity); - - spl.removeModule("VCA"); - // p->addModel(modelVCA); - - spl.removeModule("VCO2"); - // p->addModel(modelVCO2); - - spl.removeModule("VCMixer"); - // p->addModel(modelVCMixer); - - spl.removeModule("Viz"); - // p->addModel(modelViz); - + p->addModel(modelVCO2); } } From fb521affd114bdf6c0f5a73187eab66cd96fe4de Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 21:56:11 +0100 Subject: [PATCH 118/132] Update fundamental, fix debug build Signed-off-by: falkTX --- plugins/Fundamental | 2 +- plugins/plugins.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index 19457a4..ce3350a 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 19457a411e8c662a05e83e32df4c7ffa1b2372c7 +Subproject commit ce3350a82f428d48ce7bc9a44d84821589603850 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index f6fa8c3..df7bafc 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -2521,7 +2521,6 @@ void initStaticPlugins() initStatic__ExpertSleepersEncoders(); initStatic__Extratone(); initStatic__FehlerFabrik(); - initStatic__Fundamental(); initStatic__GlueTheGiant(); initStatic__GoodSheperd(); initStatic__GrandeModular(); From f50af730a7b4a3244b7288a9c562c43d7e47287f Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 23 Apr 2022 23:08:51 +0100 Subject: [PATCH 119/132] Update rest of fundamental, leaving some TODOs for later Signed-off-by: falkTX --- .github/workflows/build.yml | 84 ++++++++++++++++++------------------- plugins/Fundamental | 2 +- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98e1201..3522c5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,12 +53,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux arm64 cross-compiled run: | pushd deps/PawPaw; source local.env linux-aarch64; popd @@ -140,12 +140,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux armhf cross-compiled run: | pushd deps/PawPaw; source local.env linux-armhf; popd @@ -223,12 +223,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux i686 run: | pushd deps/PawPaw; source local.env linux-i686; popd @@ -298,12 +298,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh linux - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux x86_64 run: | pushd deps/PawPaw; source local.env linux; popd @@ -433,12 +433,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos-universal - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build macOS universal (base) run: | pushd deps/PawPaw; source local.env macos-universal; popd @@ -641,12 +641,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win32 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win32 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win32; popd @@ -733,12 +733,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win64 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; + #- name: Restore build timestamp + #if: steps.cache.outputs.cache-hit == 'true' + #shell: bash + #run: | + #TS=$(cat build/timestamp) + #find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win64 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win64; popd diff --git a/plugins/Fundamental b/plugins/Fundamental index ce3350a..37ced22 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit ce3350a82f428d48ce7bc9a44d84821589603850 +Subproject commit 37ced22bdbd928234dd89182fc8061ca6b48f535 From fdaf1ec204e7dfd80340b8d8c5cfacbd9bf65e8d Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 25 Apr 2022 23:50:36 +0100 Subject: [PATCH 120/132] Update Fundamental, mention it in README and LICENSES Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- README.md | 1 + docs/FAQ.md | 13 ------------- docs/LICENSES.md | 2 ++ plugins/Fundamental | 2 +- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3522c5e..bcae802 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -448,7 +448,7 @@ jobs: run: | pushd deps/PawPaw; source local.env macos-universal; popd git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE - mkdir jucewrapper/build + mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - name: Build macOS universal (packaging) diff --git a/README.md b/README.md index 66df12a..dcee0fb 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ At the moment the following 3rd-party modules are provided: - ExpertSleepers Encoders - Extratone - Fehler Fabrik +- Fundamental - Glue the Giant - GoodSheperd - Grande diff --git a/docs/FAQ.md b/docs/FAQ.md index 5619603..abdceff 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -9,19 +9,6 @@ But basically we want an open-source plugin version of "Rack Pro", where we are free to change things as we see fit, work on new features and fix bugs. This is simply not possible with proprietary software, which is the case of "Rack Pro". -## Where is Fundamental? - -There are some artwork license issues that prevent us from using Fundamental exactly as we want. -We could in theory use it as-is, VCV logo and everything, but it looks out of place with Cardinal's general dark mode theme. -The artwork license does not allow modifications, and that VCV logo being present on the panels makes Cardinal's authors unease. -Cardinal is not a VCV product in any way, or endorsed by it. Would be quite bad to give that impression. - -Current plan is to redo Fundamental panel graphics in a more liberal license, so it then can be included in Cardinal. -In the mean time, check [this wiki page](https://github.com/DISTRHO/Cardinal/wiki/Fundamental-replacements) -for a list of module replacements for Fundamental stuff. - -PS: Don't forget to contribute back as well! ;) - ## Can I install extra modules? No, Cardinal is intentionally a fully self-contained plugin. diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 39b2ca4..c8ccce1 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -36,6 +36,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | ExpertSleepers Encoders | MIT | | | Extratone | GPL-3.0-or-later | | | Fehler Fabrik | GPL-3.0-or-later | | +| Fundamental | GPL-3.0-or-later | | | Glue the Giant | GPL-3.0-or-later | | | GoodSheperd | GPL-3.0-or-later | | | Grande | GPL-3.0-or-later | | @@ -136,6 +137,7 @@ Below is a list of artwork licenses from plugins | ExpertSleepers-Encoders/* | MIT | [Same license as source code](https://github.com/expertsleepersltd/vcvrack-encoders/issues/3) | | Extratone/* | GPL-3.0-or-later | [Same license as source code](https://github.com/EaterOfSheep/Extratone/issues/7) | | FehlerFabrik/* | GPL-3.0-or-later | No artwork specific license provided, see [FehlerFabrik#17](https://github.com/RCameron93/FehlerFabrik/issues/17) | +| Fundamental/* | GPL-3.0-or-later | Same license as source code | | GlueTheGiant/* | GPL-3.0-or-later | Same license as source code | | GlueTheGiant/fonts/DSEG7-* | OFL-1.1-RFN | | | GoodSheperd/* | GPL-3.0-or-later | No artwork specific license provided | diff --git a/plugins/Fundamental b/plugins/Fundamental index 37ced22..7903f41 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 37ced22bdbd928234dd89182fc8061ca6b48f535 +Subproject commit 7903f41e0d78614933395b8534bf20aa201f8f90 From 345f58d42685aaa631a82d1bbae24a1fb0a8f215 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Apr 2022 11:45:57 +0100 Subject: [PATCH 121/132] New attempt at build caching, try with linux builds first Signed-off-by: falkTX --- .github/workflows/build.yml | 75 +++++++++++++++++++++++++++++++++---- docs/DIFFERENCES.md | 1 - 2 files changed, 68 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcae802..6b7a117 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 16 + CACHE_VERSION: 17 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -22,6 +22,16 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + bin/*.*/*.so + bin/*.vst3/Contents/*/*.so + bin/Cardinal + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -109,6 +119,16 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + bin/*.*/*.so + bin/*.vst3/Contents/*/*.so + bin/Cardinal + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -196,6 +216,16 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + bin/*.*/*.so + bin/*.vst3/Contents/*/*.so + bin/Cardinal + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -279,6 +309,16 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + bin/*.*/*.so + bin/*.vst3/Contents/*/*.so + bin/Cardinal + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -298,12 +338,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh linux - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux x86_64 run: | pushd deps/PawPaw; source local.env linux; popd @@ -413,6 +453,13 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build jucewrapper/build @@ -616,6 +663,13 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -708,6 +762,13 @@ jobs: with: path: | ~/PawPawBuilds + bin/*.a + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp carla/build dpf/build src/Rack/dep/bin diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index 56b97a3..3b404ef 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -47,7 +47,6 @@ Additionally, Cardinal contains the following built-in modules not present in th * Mog (never updated to v2) * mscHack (never updated to v2) * rackwindows - * repelzen * Audio File * Carla Plugin Host * Ildaeil Host From 166d687c7dd66a654ac8a5c6ff88d55dfdc0800d Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Apr 2022 14:45:00 +0100 Subject: [PATCH 122/132] Try the new build cache setup Signed-off-by: falkTX --- .github/workflows/build.yml | 72 ++++++++++++++++++------------------- jucewrapper/CMakeLists.txt | 2 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b7a117..b6a3b4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,12 +63,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux arm64 cross-compiled run: | pushd deps/PawPaw; source local.env linux-aarch64; popd @@ -160,12 +160,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux armhf cross-compiled run: | pushd deps/PawPaw; source local.env linux-armhf; popd @@ -253,12 +253,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux i686 run: | pushd deps/PawPaw; source local.env linux-i686; popd @@ -480,12 +480,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos-universal - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build macOS universal (base) run: | pushd deps/PawPaw; source local.env macos-universal; popd @@ -695,12 +695,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win32 - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win32 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win32; popd @@ -794,12 +794,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win64 - #- name: Restore build timestamp - #if: steps.cache.outputs.cache-hit == 'true' - #shell: bash - #run: | - #TS=$(cat build/timestamp) - #find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win64 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win64; popd diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 1c92951..c8ab842 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -199,7 +199,7 @@ juce_add_plugin(CardinalSynth COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" DESCRIPTION "Virtual modular synthesizer plugin" EDITOR_WANTS_KEYBOARD_FOCUS TRUE - FORMATS Standalone VST3 AU + FORMATS ${PLUGIN_FORMATS} IS_MIDI_EFFECT FALSE IS_SYNTH TRUE NEEDS_MIDI_INPUT TRUE From a9b87c4cdd71bdf5e9c74984ee3b81be6e9c6a1c Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Apr 2022 16:36:43 +0100 Subject: [PATCH 123/132] Build cache tweaks, add macos-intel target Signed-off-by: falkTX --- .github/workflows/build.yml | 121 +++++++++++++++++++++++++++++++----- jucewrapper/CMakeLists.txt | 4 +- 2 files changed, 107 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6a3b4f..7ccfc6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 17 + CACHE_VERSION: 18 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -22,7 +22,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a bin/*.*/*.so bin/*.vst3/Contents/*/*.so bin/Cardinal @@ -62,7 +62,7 @@ jobs: env: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 + ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64 - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -119,7 +119,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a bin/*.*/*.so bin/*.vst3/Contents/*/*.so bin/Cardinal @@ -159,7 +159,7 @@ jobs: env: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf + ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -216,7 +216,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a bin/*.*/*.so bin/*.vst3/Contents/*/*.so bin/Cardinal @@ -252,7 +252,7 @@ jobs: env: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 + ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686 - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -309,7 +309,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a bin/*.*/*.so bin/*.vst3/Contents/*/*.so bin/Cardinal @@ -337,7 +337,7 @@ jobs: sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Build extra dependencies run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux + ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -441,6 +441,95 @@ jobs: make features make SYSDEPS=true -j $(nproc) + macos-intel: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + id: cache + uses: actions/cache@v2 + with: + path: | + ~/PawPawBuilds + */*.a + build/Cardinal + build/CardinalFX + build/CardinalSynth + build/plugins + build/rack + build/timestamp + carla/build + dpf/build + jucewrapper/build + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 + key: macos-intel-v${{ env.CACHE_VERSION }} + - name: Build extra dependencies + run: | + ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos + - name: Restore build timestamp + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: | + TS=$(cat build/timestamp) + find . -type f -exec touch -a -m -t ${TS} {} \; + - name: Build macOS intel (base) + run: | + pushd deps/PawPaw; source local.env macos; popd + make features + make CIBUILD=true NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu) + - name: Build macOS intel (AU using juce) + run: | + pushd deps/PawPaw; source local.env macos; popd + git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE + mkdir -p jucewrapper/build + pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd + mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ + - name: Build macOS intel (packaging) + run: | + pushd deps/PawPaw; source local.env macos; popd + ./utils/create-macos-installer.sh + - name: Set build timestamp + run: | + date +%Y%m%d%H%M > build/timestamp + - name: Set sha8 (non-release) + if: startsWith(github.ref, 'refs/tags/') != true + id: slug1 + run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + - name: Set sha8 (release) + if: startsWith(github.ref, 'refs/tags/') + id: slug2 + run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" + - name: Set sha8 + id: slug + run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + - name: Rename macOS bundle + run: | + mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + path: | + ${{ github.event.repository.name }}-*.pkg + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: | + ${{ github.event.repository.name }}-*.pkg + macos-universal: runs-on: macos-10.15 steps: @@ -453,7 +542,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a build/Cardinal build/CardinalFX build/CardinalSynth @@ -479,7 +568,7 @@ jobs: sudo xcode-select -s "/Applications/Xcode_12.3.app" - name: Build extra dependencies run: | - ./deps/PawPaw/bootstrap-cardinal.sh macos-universal + ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -518,7 +607,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Rename macOS bundle run: | - mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg + mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -663,7 +752,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a build/Cardinal build/CardinalFX build/CardinalSynth @@ -694,7 +783,7 @@ jobs: sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb - name: Build extra dependencies run: | - ./deps/PawPaw/bootstrap-cardinal.sh win32 + ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32 - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -762,7 +851,7 @@ jobs: with: path: | ~/PawPawBuilds - bin/*.a + */*.a build/Cardinal build/CardinalFX build/CardinalSynth @@ -793,7 +882,7 @@ jobs: sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable qttools5-dev qttools5-dev-tools xvfb - name: Build extra dependencies run: | - ./deps/PawPaw/bootstrap-cardinal.sh win64 + ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64 - name: Restore build timestamp if: steps.cache.outputs.cache-hit == 'true' shell: bash diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index c8ab842..8bab15f 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -134,7 +134,7 @@ target_compile_definitions(CardinalFX PUBLIC JucePlugin_PreferredChannelConfigurations=2,2 JUCE_CHECK_MEMORY_LEAKS=0 - JUCE_DISABLE_NATIVE_FILECHOOSERS=0 + JUCE_DISABLE_NATIVE_FILECHOOSERS=1 JUCE_DISPLAY_SPLASH_SCREEN=0 JUCE_MODAL_LOOPS_PERMITTED=0 JUCE_USE_CURL=0 @@ -221,7 +221,7 @@ target_compile_definitions(CardinalSynth PUBLIC JucePlugin_PreferredChannelConfigurations=0,2 JUCE_CHECK_MEMORY_LEAKS=0 - JUCE_DISABLE_NATIVE_FILECHOOSERS=0 + JUCE_DISABLE_NATIVE_FILECHOOSERS=1 JUCE_DISPLAY_SPLASH_SCREEN=0 JUCE_MODAL_LOOPS_PERMITTED=0 JUCE_USE_CURL=0 From f58875e0ebeb034dcaa6ed14ccffef95a844f085 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Apr 2022 19:19:15 +0100 Subject: [PATCH 124/132] Try to fix macos-intel build Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ccfc6a..b43cf87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -473,6 +473,10 @@ jobs: src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: macos-intel-v${{ env.CACHE_VERSION }} + - name: Fix up Xcode + run: | + sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* + sudo xcode-select -s "/Applications/Xcode_12.3.app" - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos From d3c6bd8a61ba6a2c74cda3c76ac96d6bd02a1b6a Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 26 Apr 2022 21:14:30 +0100 Subject: [PATCH 125/132] Really fix macOS-intel build Signed-off-by: falkTX --- .github/workflows/build.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b43cf87..5974dd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 18 + CACHE_VERSION: 19 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -454,6 +454,9 @@ jobs: path: | ~/PawPawBuilds */*.a + bin/*.*/*.dylib + bin/*.*/Contents/MacOS/* + bin/Cardinal build/Cardinal build/CardinalFX build/CardinalSynth @@ -473,10 +476,6 @@ jobs: src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: macos-intel-v${{ env.CACHE_VERSION }} - - name: Fix up Xcode - run: | - sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* - sudo xcode-select -s "/Applications/Xcode_12.3.app" - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos @@ -495,6 +494,7 @@ jobs: run: | pushd deps/PawPaw; source local.env macos; popd git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE + sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ @@ -547,6 +547,9 @@ jobs: path: | ~/PawPawBuilds */*.a + bin/*.*/*.dylib + bin/*.*/Contents/MacOS/* + bin/Cardinal build/Cardinal build/CardinalFX build/CardinalSynth @@ -757,6 +760,9 @@ jobs: path: | ~/PawPawBuilds */*.a + bin/*.*/*.dll + bin/*.vst3/Contents/*/*.vst3 + bin/Cardinal.exe build/Cardinal build/CardinalFX build/CardinalSynth @@ -856,6 +862,9 @@ jobs: path: | ~/PawPawBuilds */*.a + bin/*.*/*.dll + bin/*.vst3/Contents/*/*.vst3 + bin/Cardinal.exe build/Cardinal build/CardinalFX build/CardinalSynth From 23b23a6756543713a049d5475d2cdb015f7535bf Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Apr 2022 02:30:24 +0100 Subject: [PATCH 126/132] Return 1 to vst2 effKeysRequired Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index c2f66ac..3a74deb 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit c2f66ac3c7d62082d38cc806bd86e15cebb9c6a7 +Subproject commit 3a74debff941f86fadbc083ed10e1f82bc84de13 From b107eca98bf2e1fdc3522e1e4de4164cf1a319b5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Apr 2022 12:41:30 +0100 Subject: [PATCH 127/132] Remove CI build timestamp, does not do what we need Signed-off-by: falkTX --- .github/workflows/build.yml | 80 ------------------------------------- 1 file changed, 80 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5974dd1..a05f5ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -63,21 +62,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux arm64 cross-compiled run: | pushd deps/PawPaw; source local.env linux-aarch64; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -128,7 +118,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -160,21 +149,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux armhf cross-compiled run: | pushd deps/PawPaw; source local.env linux-armhf; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -225,7 +205,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -253,21 +232,12 @@ jobs: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux i686 run: | pushd deps/PawPaw; source local.env linux-i686; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -318,7 +288,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -338,21 +307,12 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build linux x86_64 run: | pushd deps/PawPaw; source local.env linux; popd make features make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc) make unzipfx - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -462,7 +422,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build jucewrapper/build @@ -479,12 +438,6 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build macOS intel (base) run: | pushd deps/PawPaw; source local.env macos; popd @@ -502,9 +455,6 @@ jobs: run: | pushd deps/PawPaw; source local.env macos; popd ./utils/create-macos-installer.sh - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -555,7 +505,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build jucewrapper/build @@ -576,12 +525,6 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build macOS universal (base) run: | pushd deps/PawPaw; source local.env macos-universal; popd @@ -598,9 +541,6 @@ jobs: run: | pushd deps/PawPaw; source local.env macos-universal; popd ./utils/create-macos-installer.sh - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -768,7 +708,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -794,12 +733,6 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win32 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win32; popd @@ -815,9 +748,6 @@ jobs: run: | pushd deps/PawPaw; source local.env win32; popd xvfb-run ./utils/create-windows-installer.sh 32 - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 @@ -870,7 +800,6 @@ jobs: build/CardinalSynth build/plugins build/rack - build/timestamp carla/build dpf/build src/Rack/dep/bin @@ -896,12 +825,6 @@ jobs: - name: Build extra dependencies run: | ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64 - - name: Restore build timestamp - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: | - TS=$(cat build/timestamp) - find . -type f -exec touch -a -m -t ${TS} {} \; - name: Build win64 cross-compiled (base) run: | pushd deps/PawPaw; source local.env win64; popd @@ -917,9 +840,6 @@ jobs: run: | pushd deps/PawPaw; source local.env win64; popd xvfb-run ./utils/create-windows-installer.sh 64 - - name: Set build timestamp - run: | - date +%Y%m%d%H%M > build/timestamp - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 From fb7ccb0beb25921a227e8e80df9a8132a588bffe Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Apr 2022 13:11:46 +0100 Subject: [PATCH 128/132] Update DPF Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 3a74deb..48fc694 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 3a74debff941f86fadbc083ed10e1f82bc84de13 +Subproject commit 48fc694c31f709d4a46f727795917fd3371eb0da From 310cab2d6d9da48b959d736bfc2aa8e9b68126b9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Apr 2022 18:16:15 +0100 Subject: [PATCH 129/132] Store a few more properties as plugin state, including favorites Signed-off-by: falkTX --- include/componentlibrary.hpp | 31 +++++ src/CardinalPlugin.cpp | 171 ++++++++++++++++++++++++++-- src/CardinalUI.cpp | 45 +++++++- src/WindowParameters.hpp | 6 + src/override/MenuBar.cpp | 2 + src/override/Model.cpp | 19 +++- src/override/Window.cpp | 24 ++++ src/override/diffs/MenuBar.cpp.diff | 64 ++++++----- src/override/diffs/Model.cpp.diff | 45 +------- src/override/diffs/Scene.cpp.diff | 52 ++++++--- src/override/diffs/Window.cpp.diff | 76 ++++++++----- src/override/diffs/common.cpp.diff | 5 +- 12 files changed, 407 insertions(+), 133 deletions(-) create mode 100644 include/componentlibrary.hpp diff --git a/include/componentlibrary.hpp b/include/componentlibrary.hpp new file mode 100644 index 0000000..5b0705f --- /dev/null +++ b/include/componentlibrary.hpp @@ -0,0 +1,31 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +#pragma once + +#define SCHEME_YELLOW SCHEME_YELLOW_OldVCV +#include_next "componentlibrary.hpp" +#undef SCHEME_YELLOW + +namespace rack { +namespace componentlibrary { + +// Yellow? What's that? +static const NVGcolor SCHEME_YELLOW = nvgRGBf(0.76f, 0.11f, 0.22f); + +} +} diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 060af58..8051405 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -49,12 +49,14 @@ #include "extra/Base64.hpp" #include "extra/SharedResourcePointer.hpp" +static const constexpr uint kCardinalStateBaseCount = 3; // patch, screenshot, comment + #ifndef HEADLESS # include "WindowParameters.hpp" -static const constexpr uint kCardinalStateCount = 4; // patch, screenshot, comment, windowSize +static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount + 2; // moduleInfos, windowSize #else # define kWindowParameterCount 0 -static const constexpr uint kCardinalStateCount = 3; // patch, screenshot, comment +static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount; #endif #if CARDINAL_VARIANT_FX @@ -447,9 +449,14 @@ class CardinalPlugin : public CardinalBasePlugin std::string fAutosavePath; uint64_t fPreviousFrame; - String fStateComment; - String fStateScreenshot; - String fWindowSize; + + struct { + String comment; + String screenshot; + #ifndef HEADLESS + String windowSize; + #endif + } fState; // bypass handling bool fWasBypassed; @@ -481,6 +488,9 @@ public: fWindowParameters[kWindowParameterWheelSensitivity] = 1.0f; fWindowParameters[kWindowParameterLockModulePositions] = 0.0f; fWindowParameters[kWindowParameterUpdateRateLimit] = 0.0f; + fWindowParameters[kWindowParameterBrowserSort] = 3.0f; + fWindowParameters[kWindowParameterBrowserZoom] = 50.0f; + fWindowParameters[kWindowParameterInvertZoom] = 0.0f; #endif // create unique temporary path for this instance @@ -758,6 +768,63 @@ protected: parameter.enumValues.values[2].label = "4x"; parameter.enumValues.values[2].value = 2.0f; break; + case kWindowParameterBrowserSort: + parameter.name = "Browser sort"; + parameter.symbol = "browserSort"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + parameter.ranges.def = 3.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 5.0f; + parameter.enumValues.count = 6; + parameter.enumValues.restrictedMode = true; + parameter.enumValues.values = new ParameterEnumerationValue[6]; + parameter.enumValues.values[0].label = "Updated"; + parameter.enumValues.values[0].value = 0.0f; + parameter.enumValues.values[1].label = "Last used"; + parameter.enumValues.values[1].value = 1.0f; + parameter.enumValues.values[2].label = "Most used"; + parameter.enumValues.values[2].value = 2.0f; + parameter.enumValues.values[3].label = "Brand"; + parameter.enumValues.values[3].value = 3.0f; + parameter.enumValues.values[4].label = "Name"; + parameter.enumValues.values[4].value = 4.0f; + parameter.enumValues.values[5].label = "Random"; + parameter.enumValues.values[5].value = 5.0f; + break; + case kWindowParameterBrowserZoom: + parameter.name = "Browser zoom"; + parameter.symbol = "browserZoom"; + parameter.hints = kParameterIsAutomatable; + parameter.unit = "%"; + parameter.ranges.def = 50.0f; + parameter.ranges.min = 25.0f; + parameter.ranges.max = 200.0f; + parameter.enumValues.count = 7; + parameter.enumValues.restrictedMode = true; + parameter.enumValues.values = new ParameterEnumerationValue[7]; + parameter.enumValues.values[0].label = "25"; + parameter.enumValues.values[0].value = 25.0f; + parameter.enumValues.values[1].label = "35"; + parameter.enumValues.values[1].value = 35.0f; + parameter.enumValues.values[2].label = "50"; + parameter.enumValues.values[2].value = 50.0f; + parameter.enumValues.values[3].label = "71"; + parameter.enumValues.values[3].value = 71.0f; + parameter.enumValues.values[4].label = "100"; + parameter.enumValues.values[4].value = 100.0f; + parameter.enumValues.values[5].label = "141"; + parameter.enumValues.values[5].value = 141.0f; + parameter.enumValues.values[6].label = "200"; + parameter.enumValues.values[6].value = 200.0f; + break; + case kWindowParameterInvertZoom: + parameter.name = "Invert zoom"; + parameter.symbol = "invertZoom"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + parameter.ranges.def = 0.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 1.0f; + break; } #endif } @@ -782,6 +849,11 @@ protected: state.label = "Comment"; break; case 3: + state.hints = kStateIsOnlyForUI; + state.key = "moduleInfos"; + state.label = "moduleInfos"; + break; + case 4: state.hints = kStateIsOnlyForUI; state.key = "windowSize"; state.label = "Window size"; @@ -844,14 +916,57 @@ protected: String getState(const char* const key) const override { #ifndef HEADLESS + if (std::strcmp(key, "moduleInfos") == 0) + { + json_t* const rootJ = json_object(); + DISTRHO_SAFE_ASSERT_RETURN(rootJ != nullptr, String()); + + for (const auto& pluginPair : rack::settings::moduleInfos) + { + json_t* const pluginJ = json_object(); + DISTRHO_SAFE_ASSERT_CONTINUE(pluginJ != nullptr); + + for (const auto& modulePair : pluginPair.second) + { + json_t* const moduleJ = json_object(); + DISTRHO_SAFE_ASSERT_CONTINUE(moduleJ != nullptr); + + const rack::settings::ModuleInfo& m(modulePair.second); + + // To make setting.json smaller, only set properties if not default values. + if (m.favorite) + json_object_set_new(moduleJ, "favorite", json_boolean(m.favorite)); + if (m.added > 0) + json_object_set_new(moduleJ, "added", json_integer(m.added)); + if (std::isfinite(m.lastAdded)) + json_object_set_new(moduleJ, "lastAdded", json_real(m.lastAdded)); + + if (json_object_size(moduleJ)) + json_object_set_new(pluginJ, modulePair.first.c_str(), moduleJ); + else + json_decref(moduleJ); + } + + if (json_object_size(pluginJ)) + json_object_set_new(rootJ, pluginPair.first.c_str(), pluginJ); + else + json_decref(pluginJ); + } + + const String info(json_dumps(rootJ, JSON_COMPACT), false); + json_decref(rootJ); + + return info; + } + if (std::strcmp(key, "windowSize") == 0) - return fWindowSize; + return fState.windowSize; #endif if (std::strcmp(key, "comment") == 0) - return fStateComment; + return fState.comment; if (std::strcmp(key, "screenshot") == 0) - return fStateScreenshot; + return fState.screenshot; if (std::strcmp(key, "patch") != 0) return String(); @@ -879,22 +994,56 @@ protected: void setState(const char* const key, const char* const value) override { #ifndef HEADLESS + if (std::strcmp(key, "moduleInfos") == 0) + { + json_error_t error; + json_t* const rootJ = json_loads(value, 0, &error); + DISTRHO_SAFE_ASSERT_RETURN(rootJ != nullptr,); + + const char* pluginSlug; + json_t* pluginJ; + + json_object_foreach(rootJ, pluginSlug, pluginJ) + { + const char* moduleSlug; + json_t* moduleJ; + + json_object_foreach(pluginJ, moduleSlug, moduleJ) + { + rack::settings::ModuleInfo m; + + if (json_t* const favoriteJ = json_object_get(moduleJ, "favorite")) + m.favorite = json_boolean_value(favoriteJ); + + if (json_t* const addedJ = json_object_get(moduleJ, "added")) + m.added = json_integer_value(addedJ); + + if (json_t* const lastAddedJ = json_object_get(moduleJ, "lastAdded")) + m.lastAdded = json_number_value(lastAddedJ); + + rack::settings::moduleInfos[pluginSlug][moduleSlug] = m; + } + } + + json_decref(rootJ); + return; + } if (std::strcmp(key, "windowSize") == 0) { - fWindowSize = value; + fState.windowSize = value; return; } #endif if (std::strcmp(key, "comment") == 0) { - fStateComment = value; + fState.comment = value; return; } if (std::strcmp(key, "screenshot") == 0) { - fStateScreenshot = value; + fState.screenshot = value; #if defined(HAVE_LIBLO) && !defined(HEADLESS) patchUtils::sendScreenshotToRemote(value); #endif diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 37f4d6a..c787555 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -304,9 +304,7 @@ public: // hide "Browse VCV Library" button rack::widget::Widget* const browser = context->scene->browser->children.back(); rack::widget::Widget* const headerLayout = browser->children.front(); - rack::widget::Widget* const favoriteButton = *std::next(headerLayout->children.begin(), 3); rack::widget::Widget* const libraryButton = headerLayout->children.back(); - favoriteButton->hide(); libraryButton->hide(); // Report to user if something is wrong with the installation @@ -453,6 +451,16 @@ public: windowParameters.rateLimit = static_cast(value + 0.5f); rateLimitStep = 0; break; + case kWindowParameterBrowserSort: + windowParameters.browserSort = static_cast(value + 0.5f); + break; + case kWindowParameterBrowserZoom: + windowParameters.browserZoom = value; + value = std::pow(2.f, value) * 100.0f; + break; + case kWindowParameterInvertZoom: + windowParameters.invertZoom = value > 0.5f; + break; default: return; } @@ -518,6 +526,37 @@ protected: windowParameters.rateLimit = static_cast(value + 0.5f); rateLimitStep = 0; break; + case kWindowParameterBrowserSort: + windowParameters.browserSort = static_cast(value + 0.5f); + break; + case kWindowParameterBrowserZoom: + // round up to nearest valid value + { + float rvalue = value - 1.0f; + + if (rvalue <= 25.0f) + rvalue = -2.0f; + else if (rvalue <= 35.0f) + rvalue = -1.5f; + else if (rvalue <= 50.0f) + rvalue = -1.0f; + else if (rvalue <= 71.0f) + rvalue = -0.5f; + else if (rvalue <= 100.0f) + rvalue = 0.0f; + else if (rvalue <= 141.0f) + rvalue = 0.5f; + else if (rvalue <= 200.0f) + rvalue = 1.0f; + else + rvalue = 0.0f; + + windowParameters.browserZoom = rvalue; + } + break; + case kWindowParameterInvertZoom: + windowParameters.invertZoom = value > 0.5f; + break; default: return; } @@ -525,7 +564,7 @@ protected: WindowParametersSetValues(context->window, windowParameters); } - void stateChanged(const char* key, const char* value) override + void stateChanged(const char* const key, const char* const value) override { if (std::strcmp(key, "windowSize") != 0) return; diff --git a/src/WindowParameters.hpp b/src/WindowParameters.hpp index b41f16a..58bd83e 100644 --- a/src/WindowParameters.hpp +++ b/src/WindowParameters.hpp @@ -44,6 +44,9 @@ enum WindowParameterList { kWindowParameterWheelSensitivity, kWindowParameterLockModulePositions, kWindowParameterUpdateRateLimit, + kWindowParameterBrowserSort, + kWindowParameterBrowserZoom, + kWindowParameterInvertZoom, kWindowParameterCount, }; @@ -53,10 +56,13 @@ struct WindowParameters { float rackBrightness = 1.0f; float haloBrightness = 0.25f; float knobScrollSensitivity = 0.001f; + float browserZoom = -1.0f; int knobMode = 0; + int browserSort = 3; bool tooltips = true; bool knobScroll = false; bool lockModules = false; + bool invertZoom = false; // cardinal specific int rateLimit = 0; }; diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index b1ad4d5..ae98ddf 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -479,6 +479,8 @@ struct ViewButton : MenuButton { menu->addChild(createBoolPtrMenuItem("Lock module positions", "", &settings::lockModules)); + menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); + menu->addChild(new ui::MenuSeparator); static const std::vector rateLimitLabels = { diff --git a/src/override/Model.cpp b/src/override/Model.cpp index e548454..7ddafb0 100644 --- a/src/override/Model.cpp +++ b/src/override/Model.cpp @@ -117,7 +117,7 @@ std::string Model::getManualUrl() { } -void Model::appendContextMenu(ui::Menu* menu, bool) { +void Model::appendContextMenu(ui::Menu* menu, bool inBrowser) { // plugin menu->addChild(createMenuItem("Plugin: " + plugin->name, "", [=]() { system::openBrowser(plugin->pluginUrl); @@ -182,15 +182,28 @@ void Model::appendContextMenu(ui::Menu* menu, bool) { system::openBrowser(plugin->changelogUrl); })); } + + // Favorite + std::string favoriteRightText = inBrowser ? (RACK_MOD_CTRL_NAME "+click") : ""; + if (isFavorite()) + favoriteRightText += " " CHECKMARK_STRING; + menu->addChild(createMenuItem("Favorite", favoriteRightText, + [=]() { + setFavorite(!isFavorite()); + } + )); } bool Model::isFavorite() { - return false; + const settings::ModuleInfo* mi = settings::getModuleInfo(plugin->slug, slug); + return mi && mi->favorite; } -void Model::setFavorite(bool) { +void Model::setFavorite(bool favorite) { + settings::ModuleInfo& mi = settings::moduleInfos[plugin->slug][slug]; + mi.favorite = favorite; } diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 1f11ca0..ff8f969 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -718,6 +718,13 @@ void WindowParametersSave(rack::window::Window* const window) window->internal->callback->WindowParametersChanged(kWindowParameterWheelSensitivity, rack::settings::knobScrollSensitivity); } + if (d_isNotEqual(window->internal->params.browserZoom, rack::settings::browserZoom)) + { + window->internal->params.browserZoom = rack::settings::browserZoom; + if (window->internal->callback != nullptr) + window->internal->callback->WindowParametersChanged(kWindowParameterBrowserZoom, + rack::settings::browserZoom); + } if (window->internal->params.knobMode != rack::settings::knobMode) { window->internal->params.knobMode = rack::settings::knobMode; @@ -725,6 +732,13 @@ void WindowParametersSave(rack::window::Window* const window) window->internal->callback->WindowParametersChanged(kWindowParameterKnobMode, rack::settings::knobMode); } + if (window->internal->params.browserSort != rack::settings::browserSort) + { + window->internal->params.browserSort = rack::settings::browserSort; + if (window->internal->callback != nullptr) + window->internal->callback->WindowParametersChanged(kWindowParameterBrowserSort, + rack::settings::browserSort); + } if (window->internal->params.tooltips != rack::settings::tooltips) { window->internal->params.tooltips = rack::settings::tooltips; @@ -746,6 +760,13 @@ void WindowParametersSave(rack::window::Window* const window) window->internal->callback->WindowParametersChanged(kWindowParameterLockModulePositions, rack::settings::lockModules); } + if (window->internal->params.invertZoom != rack::settings::invertZoom) + { + window->internal->params.invertZoom = rack::settings::invertZoom; + if (window->internal->callback != nullptr) + window->internal->callback->WindowParametersChanged(kWindowParameterInvertZoom, + rack::settings::invertZoom); + } if (window->internal->params.rateLimit != rack::settings::rateLimit) { window->internal->params.rateLimit = rack::settings::rateLimit; @@ -762,10 +783,13 @@ void WindowParametersRestore(rack::window::Window* const window) rack::settings::rackBrightness = window->internal->params.rackBrightness; rack::settings::haloBrightness = window->internal->params.haloBrightness; rack::settings::knobScrollSensitivity = window->internal->params.knobScrollSensitivity; + rack::settings::browserZoom = window->internal->params.browserZoom; rack::settings::knobMode = static_cast(window->internal->params.knobMode); + rack::settings::browserSort = static_cast(window->internal->params.browserSort); rack::settings::tooltips = window->internal->params.tooltips; rack::settings::knobScroll = window->internal->params.knobScroll; rack::settings::lockModules = window->internal->params.lockModules; + rack::settings::invertZoom = window->internal->params.invertZoom; rack::settings::rateLimit = window->internal->params.rateLimit; } diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index 97e7180..d4b9535 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,5 +1,5 @@ --- ../Rack/src/app/MenuBar.cpp 2022-02-26 23:08:06.697192725 +0000 -+++ MenuBar.cpp 2022-02-26 23:19:38.779828613 +0000 ++++ MenuBar.cpp 2022-04-27 17:30:16.653341980 +0100 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin @@ -218,35 +218,20 @@ static const std::vector knobModeLabels = { "Linear", -@@ -467,6 +478,25 @@ +@@ -467,56 +478,34 @@ menu->addChild(knobScrollSensitivitySlider); menu->addChild(createBoolPtrMenuItem("Lock module positions", "", &settings::lockModules)); -+ -+#ifndef DISTRHO_OS_MAC -+ menu->addChild(new ui::MenuSeparator); -+ -+ static const std::vector rateLimitLabels = { -+ "None", -+ "2x", -+ "4x", -+ }; -+ static const std::vector rateLimits = {0, 1, 2}; -+ menu->addChild(createSubmenuItem("Update rate limit", rateLimitLabels[settings::rateLimit], [=](ui::Menu* menu) { -+ for (int rateLimit : rateLimits) { -+ menu->addChild(createCheckMenuItem(rateLimitLabels[rateLimit], "", -+ [=]() {return settings::rateLimit == rateLimit;}, -+ [=]() {settings::rateLimit = rateLimit;} -+ )); -+ } -+ })); -+#endif - } - }; +- } +-}; +- -@@ -476,47 +506,6 @@ - //////////////////// +-//////////////////// +-// Engine +-//////////////////// ++ menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); ++ menu->addChild(new ui::MenuSeparator); -struct SampleRateItem : ui::MenuItem { - ui::Menu* createChildMenu() override { @@ -281,14 +266,31 @@ - menu->addChild(createCheckMenuItem(text, rightText, - [=]() {return settings::sampleRate == sampleRate;}, - [=]() {settings::sampleRate = sampleRate;} -- )); -- } ++ static const std::vector rateLimitLabels = { ++ "None", ++ "2x", ++ "4x", ++ }; ++ static const std::vector rateLimits = {0, 1, 2}; ++ menu->addChild(createSubmenuItem("Update rate limit", rateLimitLabels[settings::rateLimit], [=](ui::Menu* menu) { ++ for (int rateLimit : rateLimits) { ++ menu->addChild(createCheckMenuItem(rateLimitLabels[rateLimit], "", ++ [=]() {return settings::rateLimit == rateLimit;}, ++ [=]() {settings::rateLimit = rateLimit;} + )); + } - } - return menu; -- } --}; -- -- ++ })); + } + }; + + ++//////////////////// ++// Engine ++//////////////////// ++ ++ struct EngineButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index db373a9..50c8817 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,5 +1,5 @@ --- ../Rack/src/plugin/Model.cpp 2021-10-17 13:57:23.257633662 +0100 -+++ Model.cpp 2022-01-23 17:13:22.080013846 +0000 ++++ Model.cpp 2022-04-27 17:55:57.362107553 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -61,15 +61,6 @@ return plugin->getBrand() + " " + name; } -@@ -95,7 +117,7 @@ - } - - --void Model::appendContextMenu(ui::Menu* menu, bool inBrowser) { -+void Model::appendContextMenu(ui::Menu* menu, bool) { - // plugin - menu->addChild(createMenuItem("Plugin: " + plugin->name, "", [=]() { - system::openBrowser(plugin->pluginUrl); @@ -132,18 +154,6 @@ menu->addChild(new ui::MenuSeparator); @@ -89,11 +80,10 @@ // manual std::string manualUrl = getManualUrl(); if (manualUrl != "") { -@@ -172,35 +182,15 @@ - system::openBrowser(plugin->changelogUrl); +@@ -173,13 +183,6 @@ })); } -- + - // plugin folder - if (plugin->path != "") { - menu->addChild(createMenuItem("Open plugin folder", "", [=]() { @@ -101,29 +91,6 @@ - })); - } - -- // Favorite -- std::string favoriteRightText = inBrowser ? (RACK_MOD_CTRL_NAME "+click") : ""; -- if (isFavorite()) -- favoriteRightText += " " CHECKMARK_STRING; -- menu->addChild(createMenuItem("Favorite", favoriteRightText, -- [=]() { -- setFavorite(!isFavorite()); -- } -- )); - } - - - bool Model::isFavorite() { -- const settings::ModuleInfo* mi = settings::getModuleInfo(plugin->slug, slug); -- return mi && mi->favorite; -+ return false; - } - - --void Model::setFavorite(bool favorite) { -- settings::ModuleInfo& mi = settings::moduleInfos[plugin->slug][slug]; -- mi.favorite = favorite; -+void Model::setFavorite(bool) { - } - - + // Favorite + std::string favoriteRightText = inBrowser ? (RACK_MOD_CTRL_NAME "+click") : ""; + if (isFavorite()) diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index 0cd748a..cb11e92 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,5 +1,5 @@ --- ../Rack/src/app/Scene.cpp 2022-02-26 23:08:06.701192797 +0000 -+++ Scene.cpp 2022-02-17 23:13:46.013018500 +0000 ++++ Scene.cpp 2022-04-02 03:13:14.856813800 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -39,7 +39,7 @@ #include #include #include -@@ -14,6 +42,18 @@ +@@ -14,6 +42,22 @@ #include #include @@ -47,6 +47,10 @@ +# undef DEBUG +#endif + ++#ifdef STATIC_BUILD ++# undef HAVE_LIBLO ++#endif ++ +#ifdef HAVE_LIBLO +# include +#endif @@ -58,7 +62,7 @@ namespace rack { namespace app { -@@ -23,21 +63,60 @@ +@@ -23,32 +67,94 @@ math::Vec size; void draw(const DrawArgs& args) override { @@ -126,12 +130,14 @@ APP->window->setSize(size.round()); } }; -@@ -46,9 +125,32 @@ - struct Scene::Internal { - ResizeHandle* resizeHandle; -- double lastAutosaveTime = 0.0; + + struct Scene::Internal { +- ResizeHandle* resizeHandle; - +- double lastAutosaveTime = 0.0; ++ ResizeHandle* resizeHandle = nullptr; + bool heldArrowKeys[4] = {}; + +#ifdef HAVE_LIBLO @@ -161,14 +167,16 @@ }; -@@ -67,13 +169,8 @@ +@@ -67,13 +173,11 @@ browser->hide(); addChild(browser); - if (settings::showTipsOnLaunch) { - addChild(tipWindowCreate()); - } -- ++ if (isStandalone()) ++ return; + internal->resizeHandle = new ResizeHandle; - internal->resizeHandle->box.size = math::Vec(15, 15); - internal->resizeHandle->hide(); @@ -176,7 +184,15 @@ addChild(internal->resizeHandle); } -@@ -105,16 +202,6 @@ +@@ -99,22 +203,13 @@ + rackScroll->box.pos.y = menuBar->box.size.y; + } + +- internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size); ++ if (internal->resizeHandle != nullptr) ++ internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size); + + // Resize owned descendants menuBar->box.size.x = box.size.x; rackScroll->box.size = box.size.minus(rackScroll->box.pos); @@ -193,7 +209,7 @@ // Scroll RackScrollWidget with arrow keys math::Vec arrowDelta; if (internal->heldArrowKeys[0]) { -@@ -143,6 +230,23 @@ +@@ -143,6 +238,23 @@ rackScroll->offset += arrowDelta * arrowSpeed; } @@ -217,7 +233,7 @@ Widget::step(); } -@@ -172,7 +276,7 @@ +@@ -172,7 +284,7 @@ if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { // DEBUG("key '%d '%c' scancode %d '%c' keyName '%s'", e.key, e.key, e.scancode, e.scancode, e.keyName.c_str()); if (e.keyName == "n" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { @@ -226,7 +242,7 @@ e.consume(this); } if (e.keyName == "q" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -180,19 +284,20 @@ +@@ -180,19 +292,20 @@ e.consume(this); } if (e.keyName == "o" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { @@ -251,7 +267,7 @@ e.consume(this); } if (e.keyName == "z" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -220,10 +325,14 @@ +@@ -220,10 +333,14 @@ APP->scene->rackScroll->setZoom(std::pow(2.f, zoom)); e.consume(this); } @@ -267,7 +283,7 @@ if (e.key == GLFW_KEY_F1 && (e.mods & RACK_MOD_MASK) == 0) { system::openBrowser("https://vcvrack.com/manual/"); e.consume(this); -@@ -232,10 +341,13 @@ +@@ -232,10 +349,13 @@ settings::cpuMeter ^= true; e.consume(this); } @@ -285,7 +301,7 @@ e.consume(this); } -@@ -326,13 +438,6 @@ +@@ -326,13 +446,6 @@ // Key commands that can be overridden by children if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { @@ -299,7 +315,7 @@ if (e.keyName == "v" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { rack->pasteClipboardAction(); e.consume(this); -@@ -351,7 +456,7 @@ +@@ -351,7 +464,7 @@ std::string extension = system::getExtension(path); if (extension == ".vcv") { @@ -308,7 +324,7 @@ e.consume(this); return; } -@@ -368,3 +473,94 @@ +@@ -368,3 +481,94 @@ } // namespace app } // namespace rack diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index 5127b8d..0f6d5bf 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,5 +1,5 @@ --- ../Rack/src/window/Window.cpp 2022-02-09 15:35:19.238863170 +0000 -+++ Window.cpp 2022-02-13 21:19:37.799091196 +0000 ++++ Window.cpp 2022-04-27 16:53:59.743671091 +0100 @@ -1,33 +1,83 @@ +/* + * DISTRHO Cardinal Plugin @@ -162,8 +162,12 @@ bool fbDirtyOnSubpixelChange = true; int fbCount = 0; --}; -- ++ ++ Internal() ++ : hiddenApp(false), ++ hiddenWindow(hiddenApp) { hiddenApp.idle(); } + }; + -static void windowPosCallback(GLFWwindow* win, int x, int y) { - if (glfwGetWindowAttrib(win, GLFW_MAXIMIZED)) @@ -175,11 +179,14 @@ - settings::windowPos = math::Vec(x, y); - // DEBUG("windowPosCallback %d %d", x, y); -} -+ Internal() -+ : hiddenApp(false), -+ hiddenWindow(hiddenApp) { hiddenApp.idle(); } -+}; ++#ifndef DGL_NO_SHARED_RESOURCES ++static int loadFallbackFont(NVGcontext* const vg) ++{ ++ const int font = nvgFindFont(vg, NANOVG_DEJAVU_SANS_TTF); ++ if (font >= 0) ++ return font; ++ using namespace dpf_resources; -static void windowSizeCallback(GLFWwindow* win, int width, int height) { - if (glfwGetWindowAttrib(win, GLFW_MAXIMIZED)) @@ -190,24 +197,17 @@ - return; - settings::windowSize = math::Vec(width, height); - // DEBUG("windowSizeCallback %d %d", width, height); --} -+#ifndef DGL_NO_SHARED_RESOURCES -+static int loadFallbackFont(NVGcontext* const vg) -+{ -+ const int font = nvgFindFont(vg, NANOVG_DEJAVU_SANS_TTF); -+ if (font >= 0) -+ return font; - -+ using namespace dpf_resources; - --static void windowMaximizeCallback(GLFWwindow* win, int maximized) { -- settings::windowMaximized = maximized; -- // DEBUG("windowMaximizeCallback %d", maximized); + return nvgCreateFontMem(vg, NANOVG_DEJAVU_SANS_TTF, + (uchar*)dejavusans_ttf, dejavusans_ttf_size, 0); } - - +-static void windowMaximizeCallback(GLFWwindow* win, int maximized) { +- settings::windowMaximized = maximized; +- // DEBUG("windowMaximizeCallback %d", maximized); +-} +- +- -static void mouseButtonCallback(GLFWwindow* win, int button, int action, int mods) { - contextSet((Context*) glfwGetWindowUserPointer(win)); -#if defined ARCH_MAC @@ -225,15 +225,15 @@ - APP->event->handleButton(APP->window->internal->lastMousePos, button, action, mods); -} - -+Window::Window() { -+ internal = new Internal; +- -static void cursorPosCallback(GLFWwindow* win, double xpos, double ypos) { - contextSet((Context*) glfwGetWindowUserPointer(win)); - math::Vec mousePos = math::Vec(xpos, ypos).div(APP->window->pixelRatio / APP->window->windowRatio).round(); - math::Vec mouseDelta = mousePos.minus(APP->window->internal->lastMousePos); -- ++Window::Window() { ++ internal = new Internal; + - // Workaround for GLFW warping mouse to a different position when the cursor is locked or unlocked. - if (APP->window->internal->ignoreNextMouseDelta) { - APP->window->internal->ignoreNextMouseDelta = false; @@ -435,8 +435,8 @@ +#endif } -} - - + -static void dropCallback(GLFWwindow* win, int count, const char** paths) { - contextSet((Context*) glfwGetWindowUserPointer(win)); - std::vector pathsVec; @@ -1069,7 +1069,7 @@ } internal->imageCache[filename] = image; return image; -@@ -766,28 +662,122 @@ +@@ -766,28 +662,146 @@ } @@ -1143,6 +1143,13 @@ + window->internal->callback->WindowParametersChanged(kWindowParameterWheelSensitivity, + rack::settings::knobScrollSensitivity); + } ++ if (d_isNotEqual(window->internal->params.browserZoom, rack::settings::browserZoom)) ++ { ++ window->internal->params.browserZoom = rack::settings::browserZoom; ++ if (window->internal->callback != nullptr) ++ window->internal->callback->WindowParametersChanged(kWindowParameterBrowserZoom, ++ rack::settings::browserZoom); ++ } + if (window->internal->params.knobMode != rack::settings::knobMode) + { + window->internal->params.knobMode = rack::settings::knobMode; @@ -1150,6 +1157,13 @@ + window->internal->callback->WindowParametersChanged(kWindowParameterKnobMode, + rack::settings::knobMode); + } ++ if (window->internal->params.browserSort != rack::settings::browserSort) ++ { ++ window->internal->params.browserSort = rack::settings::browserSort; ++ if (window->internal->callback != nullptr) ++ window->internal->callback->WindowParametersChanged(kWindowParameterBrowserSort, ++ rack::settings::browserSort); ++ } + if (window->internal->params.tooltips != rack::settings::tooltips) + { + window->internal->params.tooltips = rack::settings::tooltips; @@ -1171,6 +1185,13 @@ + window->internal->callback->WindowParametersChanged(kWindowParameterLockModulePositions, + rack::settings::lockModules); + } ++ if (window->internal->params.invertZoom != rack::settings::invertZoom) ++ { ++ window->internal->params.invertZoom = rack::settings::invertZoom; ++ if (window->internal->callback != nullptr) ++ window->internal->callback->WindowParametersChanged(kWindowParameterInvertZoom, ++ rack::settings::invertZoom); ++ } + if (window->internal->params.rateLimit != rack::settings::rateLimit) + { + window->internal->params.rateLimit = rack::settings::rateLimit; @@ -1187,10 +1208,13 @@ + rack::settings::rackBrightness = window->internal->params.rackBrightness; + rack::settings::haloBrightness = window->internal->params.haloBrightness; + rack::settings::knobScrollSensitivity = window->internal->params.knobScrollSensitivity; ++ rack::settings::browserZoom = window->internal->params.browserZoom; + rack::settings::knobMode = static_cast(window->internal->params.knobMode); ++ rack::settings::browserSort = static_cast(window->internal->params.browserSort); + rack::settings::tooltips = window->internal->params.tooltips; + rack::settings::knobScroll = window->internal->params.knobScroll; + rack::settings::lockModules = window->internal->params.lockModules; ++ rack::settings::invertZoom = window->internal->params.invertZoom; + rack::settings::rateLimit = window->internal->params.rateLimit; +} + diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index b141ed2..ac85f16 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,5 +1,5 @@ --- ../Rack/src/common.cpp 2021-11-23 19:57:23.719015894 +0000 -+++ common.cpp 2022-02-27 00:17:50.908149000 +0000 ++++ common.cpp 2022-03-14 23:25:17.492322806 +0000 @@ -1,6 +1,38 @@ +/* + * DISTRHO Cardinal Plugin @@ -55,7 +55,8 @@ +const std::string APP_VERSION = "2.1"; #if defined ARCH_WIN const std::string APP_OS = "win"; - #elif ARCH_MAC +-#elif ARCH_MAC ++#elif defined ARCH_MAC const std::string APP_OS = "mac"; #elif defined ARCH_LIN const std::string APP_OS = "lin"; From d9309bebed012d50f5b45dcaa755078e077ec925 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 27 Apr 2022 18:17:35 +0100 Subject: [PATCH 130/132] Update DPF Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 48fc694..68de732 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 48fc694c31f709d4a46f727795917fd3371eb0da +Subproject commit 68de732eecbd1d8febf94e15558c5adaa45dfa9b From 41d62f19648a2bd9f1859070e10b9e4745552933 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 28 Apr 2022 00:18:42 +0100 Subject: [PATCH 131/132] Update fundamental (implement seq-switch buttons) Signed-off-by: falkTX --- plugins/Fundamental | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index 7903f41..48bf3c8 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 7903f41e0d78614933395b8534bf20aa201f8f90 +Subproject commit 48bf3c84ebafc9effe7e565d8cdbf8a46b9d503c From b2fcde5f2edb39789e1f2403768a084b6ace04be Mon Sep 17 00:00:00 2001 From: dreamer Date: Fri, 29 Apr 2022 02:06:51 +0200 Subject: [PATCH 132/132] adding PinkTrombone --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/Makefile | 13 +++++++++++++ plugins/PinkTrombone | 1 + plugins/plugins.cpp | 17 +++++++++++++++++ 6 files changed, 37 insertions(+) create mode 160000 plugins/PinkTrombone diff --git a/.gitmodules b/.gitmodules index 6ecf1ba..bde711c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -190,3 +190,6 @@ [submodule "plugins/unless_modules"] path = plugins/unless_modules url = https://gitlab.com/unlessgames/unless_modules.git +[submodule "plugins/PinkTrombone"] + path = plugins/PinkTrombone + url = https://github.com/VegaDeftwing/PinkTromboneVCV.git diff --git a/README.md b/README.md index dcee0fb..21c9fda 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ At the moment the following 3rd-party modules are provided: - Orbits - Parable Instruments - Path Set +- PinkTrombone - Prism - rackwindows - repelzen diff --git a/docs/LICENSES.md b/docs/LICENSES.md index c8ccce1..bcbf781 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -61,6 +61,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Orbits | GPL-3.0-or-later | | | Parable Instruments | GPL-3.0-or-later | | | Path Set | GPL-3.0-or-later | | +| PinkTrombone | GPL-3.0-or-later | | | Prism | BSD-3-Clause | | | Rackwindows | MIT | | | repelzen | GPL-3.0-or-later | | @@ -180,6 +181,7 @@ Below is a list of artwork licenses from plugins | Orbits/fonts/ShareTechMono-Regular.ttf | OFL-1.1-RFN | | | ParableInstruments/* | Custom | Copyright © Alex Brandt, [used and distributed with permission](https://github.com/adbrant/ArableInstruments/issues/21) | | PathSet/* | GPL-3.0-or-later | No artwork specific license provided | +| PinkTrombone/* | GPL-3.0-or-later | No artwork specific license provided | | Prism/* | CC-BY-SA-4.0 | | | Prism/RobotoCondensed-Regular.ttf | Apache-2.0 | | | Rackwindows/* | MIT | [Same license as source code](https://github.com/n0jo/rackwindows/issues/15) | diff --git a/plugins/Makefile b/plugins/Makefile index f398e45..5ddce85 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -730,6 +730,12 @@ PARABLE_CUSTOM = Clouds CustomPanel CloudsWidget FreezeLight clouds stmlib PLUGIN_FILES += $(filter-out PathSet/src/plugin.cpp,$(wildcard PathSet/src/*.cpp)) +# -------------------------------------------------------------- +# PinkTrombone + +PLUGIN_FILES += $(filter-out PinkTrombone/src/plugin.cpp,$(wildcard PinkTrombone/src/*.cpp)) +PLUGIN_FILES += $(wildcard PinkTrombone/src/PinkTrombone/*.cpp) + # -------------------------------------------------------------- # Prism @@ -1664,6 +1670,13 @@ $(BUILD_DIR)/PathSet/%.cpp.o: PathSet/%.cpp $(foreach m,$(PATHSET_CUSTOM),$(call custom_module_names,$(m),PathSet)) \ -DpluginInstance=pluginInstance__PathSet +$(BUILD_DIR)/PinkTrombone/%.cpp.o: PinkTrombone/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(PINKTROMBONE_CUSTOM),$(call custom_module_names,$(m),PinkTrombone)) \ + -DpluginInstance=pluginInstance__PinkTrombone + $(BUILD_DIR)/Prism/%.cpp.o: Prism/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/PinkTrombone b/plugins/PinkTrombone new file mode 160000 index 0000000..ea6ab0c --- /dev/null +++ b/plugins/PinkTrombone @@ -0,0 +1 @@ +Subproject commit ea6ab0c6887102ebbf6e3534e0e891b867b130cc diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index df7bafc..b71f89c 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -624,6 +624,9 @@ extern Model* modelBlankPanel; // Path Set #include "PathSet/src/plugin.hpp" +// PinkTrombone +#include "PinkTrombone/src/plugin.hpp" + // Prism #include "Prism/src/plugin.hpp" @@ -733,6 +736,7 @@ Plugin* pluginInstance__nonlinearcircuits; Plugin* pluginInstance__Orbits; Plugin* pluginInstance__ParableInstruments; Plugin* pluginInstance__PathSet; +Plugin* pluginInstance__PinkTrombone; Plugin* pluginInstance__Prism; Plugin* pluginInstance__rackwindows; Plugin* pluginInstance__repelzen; @@ -2257,6 +2261,18 @@ static void initStatic__PathSet() } } +static void initStatic__PinkTrombone() +{ + Plugin* const p = new Plugin; + pluginInstance__PinkTrombone = p; + + const StaticPluginLoader spl(p, "PinkTrombone"); + if (spl.ok()) + { + p->addModel(modelPinkTrombone); + } +} + static void initStatic__Prism() { Plugin* const p = new Plugin; @@ -2545,6 +2561,7 @@ void initStaticPlugins() initStatic__Orbits(); initStatic__ParableInstruments(); initStatic__PathSet(); + initStatic__PinkTrombone(); initStatic__Prism(); initStatic__rackwindows(); initStatic__repelzen();