Skip to content

Commit

Permalink
Merge branch 'main' into update/DrumKit
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Sep 22, 2024
2 parents 867a2ac + 7302208 commit 208d79f
Show file tree
Hide file tree
Showing 21 changed files with 104 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body:
id: version
attributes:
label: Version
value: "24.05"
value: "24.09"
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include $(ROOT)/Makefile.base.mk
# src/CardinalPlugin.cpp `getVersion`
# utils/macOS/Info_{JACK,Native}.plist
# .github/ISSUE_TEMPLATE/bug.yaml src/CardinalCommon.cpp src/CardinalPlugin.cpp utils/macOS/Info_{JACK,Native}.plist
VERSION = 24.05
VERSION = 24.09

# --------------------------------------------------------------
# Build targets
Expand Down
2 changes: 1 addition & 1 deletion carla
Submodule carla updated 68 files
+2 −2 .github/workflows/build.yml
+3 −6 .github/workflows/cmake.yml
+3 −3 .github/workflows/dpf.yml
+1 −1 .github/workflows/release.yml
+1 −0 .gitignore
+9 −0 Makefile
+1 −1 Makefile.print.mk
+1 −1 README.md
+98 −25 source/Makefile.deps.mk
+1 −1 source/backend/engine/CarlaEngineOsc.hpp
+18 −7 source/backend/engine/CarlaEngineOscHandlers.cpp
+2 −1 source/backend/utils/Makefile
+1 −0 source/bridges-plugin/Makefile
+18 −26 source/frontend/Makefile
+8 −17 source/frontend/bigmeter-ui
+4 −16 source/frontend/carla
+4 −16 source/frontend/carla-control
+4 −16 source/frontend/carla-jack-multi
+4 −16 source/frontend/carla-jack-single
+4 −16 source/frontend/carla-patchbay
+12 −18 source/frontend/carla-plugin
+4 −16 source/frontend/carla-rack
+18 −25 source/frontend/carla_app.py
+8 −17 source/frontend/carla_backend_qt.py
+7 −17 source/frontend/carla_frontend.py
+73 −32 source/frontend/carla_host.py
+8 −17 source/frontend/carla_host_control.py
+16 −20 source/frontend/carla_settings.py
+19 −25 source/frontend/carla_shared.py
+12 −19 source/frontend/carla_skin.py
+32 −21 source/frontend/carla_widgets.py
+31 −28 source/frontend/midipattern-ui
+10 −18 source/frontend/notes-ui
+10 −18 source/frontend/patchcanvas/__init__.py
+12 −19 source/frontend/patchcanvas/canvasbezierline.py
+12 −19 source/frontend/patchcanvas/canvasbezierlinemov.py
+14 −19 source/frontend/patchcanvas/canvasbox.py
+10 −18 source/frontend/patchcanvas/canvasboxshadow.py
+10 −18 source/frontend/patchcanvas/canvasfadeanimation.py
+15 −20 source/frontend/patchcanvas/canvasicon.py
+12 −19 source/frontend/patchcanvas/canvasline.py
+12 −19 source/frontend/patchcanvas/canvaslinemov.py
+26 −20 source/frontend/patchcanvas/canvasport.py
+8 −17 source/frontend/patchcanvas/canvasportglow.py
+12 −19 source/frontend/patchcanvas/patchcanvas.py
+13 −20 source/frontend/patchcanvas/scene.py
+10 −18 source/frontend/patchcanvas/theme.py
+8 −17 source/frontend/patchcanvas/utils.py
+263 −0 source/frontend/qt_compat.py
+8 −17 source/frontend/utils/qsafesettings.py
+32 −25 source/frontend/widgets/canvaspreviewframe.py
+10 −18 source/frontend/widgets/collapsablewidget.py
+12 −19 source/frontend/widgets/commondial.py
+12 −19 source/frontend/widgets/digitalpeakmeter.py
+30 −34 source/frontend/widgets/draggablegraphicsview.py
+14 −20 source/frontend/widgets/ledbutton.py
+17 −21 source/frontend/widgets/paramspinbox.py
+33 −22 source/frontend/widgets/pianoroll.py
+16 −21 source/frontend/widgets/pixmapdial.py
+12 −19 source/frontend/widgets/pixmapkeyboard.py
+14 −21 source/frontend/widgets/racklistwidget.py
+14 −20 source/frontend/widgets/scalablebutton.py
+17 −23 source/frontend/widgets/scalabledial.py
+18 −21 source/frontend/xycontroller-ui
+2 −12 source/plugin/Makefile
+36 −6 source/theme/CarlaStyle.cpp
+73 −63 source/theme/Makefile
+4 −0 source/utils/CarlaUtils.hpp
3 changes: 3 additions & 0 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export MACOSX_DEPLOYMENT_TARGET = $(subst -mmacosx-version-min=,,$(filter -mmaco
CMAKE += -DCMAKE_OSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
else ifeq ($(CIBUILD),true)
$(error CI build requires -mmacosx-version-min flag on macOS)
else
export MACOSX_DEPLOYMENT_TARGET = 10.15
CMAKE += -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
endif
CMAKE += -DCMAKE_OSX_SYSROOT="macosx"
endif
Expand Down
4 changes: 2 additions & 2 deletions docs/LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ While Cardinal itself is licensed under GPLv3+, some modules/plugins used by it
And since Cardinal builds the entire Rack and modules as a static library,
the more restrictive of the **code licenses** will apply to the final binary.

Bellow follows a list of all code licenses used in Cardinal and linked submodules.
Below follows a list of all code licenses used in Cardinal and linked submodules.

| Name | License(s) | Additional notes |
|-------------------------|--------------------------|------------------|
| Carla | GPL-2.0-or-later | Used as plugin host within Cardinal |
| DPF | ISC, GPL-2.0-or-later | Used as the plugin framework, VST2 binary GPLv2+ licensed |
| DPF | ISC | Used as the plugin framework |
| Rack | GPL-3.0-or-later | The actual Rack code, internal dependencies are compatible with GPLv3+ |
| 21kHz | MIT | |
| 8Mode | BSD-3-Clause | |
Expand Down
2 changes: 1 addition & 1 deletion dpf
Submodule dpf updated 1 files
+568 −156 distrho/extra/WebViewImpl.cpp
2 changes: 1 addition & 1 deletion plugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ MINIPLUGIN_FILES += BaconPlugs/src/Style.cpp
# --------------------------------------------------------------
# Befaco

PLUGIN_FILES += $(filter-out Befaco/src/plugin.cpp,$(wildcard Befaco/src/*.cpp))
PLUGIN_FILES += $(filter-out Befaco/src/plugin.cpp Befaco/src/MidiThing.cpp,$(wildcard Befaco/src/*.cpp))
PLUGIN_FILES += $(wildcard Befaco/src/noise-plethora/*/*.cpp)

# modules/types which are present in other plugins
Expand Down
2 changes: 1 addition & 1 deletion plugins/Sapphire
Submodule Sapphire updated 59 files
+29 −3 CHANGELOG.md
+1 −0 Frolic.md
+1 −0 Glee.md
+13 −0 Moots.md
+1 −1 Pivot.md
+104 −0 Pop.md
+24 −0 README.md
+2 −0 Rotini.md
+71 −0 SplitAddMerge.md
+33 −0 VoltageFlipping.md
+ images/frolic.png
+ images/glee.png
+ images/moots_button_menu.png
+ images/moots_button_ramp.png
+ images/pop.png
+ images/pop_menu.png
+ images/rotini.png
+ images/sam_add_example.png
+ images/sam_merge_example.png
+ images/sam_split_example.png
+ images/splitAddMerge.png
+ images/tin.png
+ images/tout.png
+ images/voltage_flip.png
+35 −1 plugin.json
+1 −0 res/frolic.svg
+1 −0 res/glee.svg
+1 −0 res/pivot.svg
+50 −0 res/pop.svg
+1 −0 res/rotini.svg
+22 −0 res/sam.svg
+1 −0 res/tin.svg
+1 −0 res/tout.svg
+1 −1 src/elastika_vcv.cpp
+1 −1 src/galaxy_vcv.cpp
+2 −32 src/hiss_vcv.cpp
+100 −13 src/moots_vcv.cpp
+1 −1 src/nucleus_vcv.cpp
+33 −11 src/pivot_vcv.cpp
+2 −0 src/plugin.cpp
+2 −0 src/plugin.hpp
+1 −1 src/polynucleus_vcv.cpp
+184 −0 src/pop_engine.hpp
+249 −0 src/pop_vcv.cpp
+37 −11 src/rotini_vcv.cpp
+176 −0 src/sam_vcv.cpp
+35 −11 src/sapphire_chaos_module.hpp
+136 −19 src/sapphire_vcvrack.hpp
+14 −4 src/sapphire_widget.hpp
+1 −1 src/tin_vcv.cpp
+1 −1 src/tout_vcv.cpp
+1 −1 src/tricorder_vcv.cpp
+1 −1 src/tubeunit_vcv.cpp
+151 −1 util/make_sapphire_svg.py
+2 −0 util/modules.txt
+2 −19 util/sapphire.py
+22 −3 util/svgpanel.py
+1 −1 util/tubeunit_svg.py
+64 −0 util/unittest/unittest.cpp
6 changes: 6 additions & 0 deletions plugins/plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1590,9 +1590,13 @@ static void initStatic__Befaco()
p->addModel(modelMotionMTR);
p->addModel(modelBurst);
p->addModel(modelVoltio);
p->addModel(modelOctaves);
#undef modelADSR
#undef modelMixer
#undef modelBurst

// NOTE disabled in Cardinal due to MIDI usage
spl.removeModule("MidiThingV2");
}
}

Expand Down Expand Up @@ -3083,7 +3087,9 @@ static void initStatic__Sapphire()
p->addModel(modelSapphireNucleus);
p->addModel(modelSapphirePivot);
p->addModel(modelSapphirePolynucleus);
p->addModel(modelSapphirePop);
p->addModel(modelSapphireRotini);
p->addModel(modelSapphireSam);
p->addModel(modelSapphireTin);
p->addModel(modelSapphireTout);
p->addModel(modelSapphireTricorder);
Expand Down
25 changes: 24 additions & 1 deletion src/CardinalCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void destroyStaticPlugins();
}
}

const std::string CARDINAL_VERSION = "24.05";
const std::string CARDINAL_VERSION = "24.09";

// -----------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -362,6 +362,15 @@ static int osc_hello_handler(const char*, const char*, lo_arg**, int, const lo_m
d_stdout("Hello received from OSC, saying hello back to them o/");
const lo_address source = lo_message_get_source(m);
const lo_server server = static_cast<Initializer*>(self)->oscServer;

// send list of features first
#ifdef CARDINAL_INIT_OSC_THREAD
lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "features", ":screenshot:");
#else
lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "features", "");
#endif

// then finally hello reply
lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "hello", "ok");
return 0;
}
Expand All @@ -386,7 +395,10 @@ static int osc_load_handler(const char*, const char* types, lo_arg** argv, int a
std::vector<uint8_t> data(size);
std::memcpy(data.data(), blob, size);

#ifdef CARDINAL_INIT_OSC_THREAD
rack::contextSet(context);
#endif

rack::system::removeRecursively(context->patch->autosavePath);
rack::system::createDirectories(context->patch->autosavePath);
try {
Expand All @@ -397,7 +409,10 @@ static int osc_load_handler(const char*, const char* types, lo_arg** argv, int a
catch (rack::Exception& e) {
WARN("%s", e.what());
}

#ifdef CARDINAL_INIT_OSC_THREAD
rack::contextSet(nullptr);
#endif
}

const lo_address source = lo_message_get_source(m);
Expand All @@ -423,10 +438,18 @@ static int osc_param_handler(const char*, const char* types, lo_arg** argv, int
const int paramId = argv[1]->i;
const float paramValue = argv[2]->f;

#ifdef CARDINAL_INIT_OSC_THREAD
rack::contextSet(context);
#endif

rack::engine::Module* const module = context->engine->getModule(moduleId);
DISTRHO_SAFE_ASSERT_RETURN(module != nullptr, 0);

context->engine->setParamValue(module, paramId, paramValue);

#ifdef CARDINAL_INIT_OSC_THREAD
rack::contextSet(nullptr);
#endif
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/CardinalPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class CardinalPlugin : public CardinalBasePlugin

uint32_t getVersion() const override
{
return d_version(0, 24, 5);
return d_version(0, 24, 9);
}

int64_t getUniqueId() const override
Expand Down
42 changes: 26 additions & 16 deletions src/CardinalRemote.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]>
*
* 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.
* SPDX-License-Identifier: GPL-3.0-or-later
*/

#include <engine/Engine.hpp>
Expand Down Expand Up @@ -40,6 +29,12 @@
# include <lo/lo.h>
#endif

namespace rack {
namespace engine {
void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*);
}
}

// -----------------------------------------------------------------------------------------------------------

namespace remoteUtils {
Expand All @@ -53,8 +48,15 @@ static int osc_handler(const char* const path, const char* const types, lo_arg**
{
d_stdout("osc_handler(\"%s\", ...) - got resp | '%s' '%s'", path, &argv[0]->s, &argv[1]->s);

if (std::strcmp(&argv[0]->s, "hello") == 0 && std::strcmp(&argv[1]->s, "ok") == 0)
static_cast<RemoteDetails*>(self)->connected = true;
if (std::strcmp(&argv[0]->s, "hello") == 0)
{
if (std::strcmp(&argv[1]->s, "ok") == 0)
static_cast<RemoteDetails*>(self)->connected = true;
}
else if (std::strcmp(&argv[0]->s, "features") == 0)
{
static_cast<RemoteDetails*>(self)->screenshot = std::strstr(&argv[1]->s, ":screenshot:") != nullptr;
}
}
return 0;
}
Expand Down Expand Up @@ -92,8 +94,10 @@ bool connectToRemote(const char* const url)
ui->remoteDetails = remoteDetails = new RemoteDetails;
remoteDetails->handle = ui;
remoteDetails->url = strdup(url);
remoteDetails->connected = true;
remoteDetails->autoDeploy = true;
remoteDetails->connected = true;
remoteDetails->first = false;
remoteDetails->screenshot = false;
}
#elif defined(HAVE_LIBLO)
const lo_address addr = lo_address_new_from_url(url);
Expand All @@ -107,10 +111,16 @@ bool connectToRemote(const char* const url)
ui->remoteDetails = remoteDetails = new RemoteDetails;
remoteDetails->handle = oscServer;
remoteDetails->url = strdup(url);
remoteDetails->autoDeploy = true;
remoteDetails->first = true;
remoteDetails->connected = false;
remoteDetails->autoDeploy = false;
remoteDetails->screenshot = false;

lo_server_add_method(oscServer, "/resp", nullptr, osc_handler, remoteDetails);

sendFullPatchToRemote(remoteDetails);

Engine_setRemoteDetails(context->engine, remoteDetails);
}
else if (std::strcmp(remoteDetails->url, url) != 0)
{
Expand Down
19 changes: 5 additions & 14 deletions src/CardinalRemote.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2023 Filipe Coelho <[email protected]>
*
* 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.
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

#pragma once
Expand All @@ -27,8 +16,10 @@ namespace remoteUtils {
struct RemoteDetails {
void* handle;
const char* url;
bool connected;
bool autoDeploy;
bool first;
bool connected;
bool screenshot;
};

RemoteDetails* getRemote();
Expand Down
2 changes: 1 addition & 1 deletion src/CardinalUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ class CardinalUI : public CardinalBaseUI,
if (inSelfTest) return false;
#endif

const rack::math::Vec scrollDelta = rack::math::Vec(-ev.delta.getX(), ev.delta.getY());
const rack::math::Vec scrollDelta = rack::math::Vec(-ev.delta.getX(), ev.delta.getY()) * 50 ;

const int mods = glfwMods(ev.mod);
const ScopedContext sc(this, mods);
Expand Down
1 change: 1 addition & 0 deletions src/custom/dep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ static const struct {
{ kModeBefaco, "/Befaco/res/panels/SpringReverb.svg" },
{ kModeBefaco, "/Befaco/res/panels/StereoStrip.svg" },
{ kModeBefaco, "/Befaco/res/panels/Voltio.svg" },
{ kModeBefaco, "/Befaco/res/panels/Octaves.svg" },
// GPLv3+
{ kModeCardinal, "/Cardinal/res/AudioFile.svg" },
{ kModeCardinal, "/Cardinal/res/AudioToCVPitch.svg" },
Expand Down
19 changes: 4 additions & 15 deletions src/override/Engine.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2023 Filipe Coelho <[email protected]>
*
* 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.
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

/**
Expand Down Expand Up @@ -295,7 +284,7 @@ static void Engine_stepFrame(Engine* that) {
Param* smoothParam = &smoothModule->params[smoothParamId];
float value = smoothParam->value;
float newValue;
if (internal->remoteDetails != nullptr) {
if (internal->remoteDetails != nullptr && internal->remoteDetails->connected) {
newValue = value;
sendParamChangeToRemote(internal->remoteDetails, smoothModule->id, smoothParamId, value);
} else {
Expand Down Expand Up @@ -1094,7 +1083,7 @@ void Engine::setParamValue(Module* module, int paramId, float value) {
internal->smoothModule = NULL;
internal->smoothParamId = 0;
}
if (internal->remoteDetails != nullptr) {
if (internal->remoteDetails != nullptr && internal->remoteDetails->connected) {
sendParamChangeToRemote(internal->remoteDetails, module->id, paramId, value);
}
module->params[paramId].setValue(value);
Expand Down
Loading

0 comments on commit 208d79f

Please sign in to comment.