Browse Source

Merge branch 'main' into feature/alefsbits

pull/348/head
dreamer 3 years ago
parent
commit
8af81ebf52
10 changed files with 145 additions and 28 deletions
  1. +7
    -4
      .github/workflows/build.yml
  2. +2
    -7
      deps/Makefile
  3. +22
    -0
      docs/LICENSE-PERMISSIONS.md
  4. +1
    -1
      dpf
  5. +1
    -1
      include/helpers.hpp
  6. +12
    -12
      jucewrapper/CMakeLists.txt
  7. +6
    -0
      jucewrapper/CardinalWrapper.cpp
  8. +1
    -1
      plugins/Bidoo
  9. +2
    -0
      plugins/plugins.cpp
  10. +91
    -2
      src/CardinalUI.cpp

+ 7
- 4
.github/workflows/build.yml View File

@@ -438,7 +438,7 @@ jobs:
git clone --depth=1 -b 6.1.6 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_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path) -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
- name: Build macOS intel (packaging)
env:
@@ -521,7 +521,7 @@ jobs:
pushd deps/PawPaw; source local.env macos-universal; popd
git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
mkdir -p jucewrapper/build
pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path) -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
- name: Build macOS universal (packaging)
env:
@@ -1050,15 +1050,18 @@ jobs:
# build-deps
sudo apt-get install -yqq liblo-dev
# runtime testing
sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind xvfb
- name: Build Cardinal
env:
CFLAGS: -g
CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make HEADLESS=true features
make HEADLESS=true NOOPT=true NOPLUGINS=true SKIP_STRIPPING=true -j $(nproc)
- name: Run Cardinal self-tests
run: |
xvfb-run ./bin/Cardinal selftest
- name: Validate LV2 ttl syntax
run: |
lv2_validate \


+ 2
- 7
deps/Makefile View File

@@ -120,7 +120,7 @@ ifeq ($(MACOS),true)
ifneq (,$(findstring -arch$(SPACE),$(CXXFLAGS)))
CMAKE += -DCMAKE_OSX_ARCHITECTURES='$(subst $(SPACE),;,$(subst -arch=,,$(filter -arch=%,$(subst -arch$(SPACE),-arch=,$(CXXFLAGS)))))'
else ifeq ($(CIBUILD),true)
$(error CI build requires -march flag on macOS)
$(error CI build requires -arch flag on macOS)
endif
ifneq (,$(findstring -mmacosx-version-min=,$(CXXFLAGS)))
export MACOSX_DEPLOYMENT_TARGET = $(subst -mmacosx-version-min=,,$(filter -mmacosx-version-min=%,$(CXXFLAGS)))
@@ -128,7 +128,7 @@ CMAKE += -DCMAKE_OSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
else ifeq ($(CIBUILD),true)
$(error CI build requires -mmacosx-version-min flag on macOS)
endif
CMAKE += -DCMAKE_OSX_SYSROOT=$(shell xcrun --sdk macosx --show-sdk-path)
CMAKE += -DCMAKE_OSX_SYSROOT="macosx"
endif

# fix emar and emranlib usage
@@ -147,11 +147,6 @@ CMAKE += -DCMAKE_SYSTEM_NAME=Generic
endif
endif

# fix cmake forcing SDK for us
ifeq ($(MACOS),true)
CMAKE += -DCMAKE_OSX_SYSROOT="macosx"
endif

# fix cross-compilation for windows
ifeq ($(WINDOWS),true)
CMAKE += -G 'Unix Makefiles'


+ 22
- 0
docs/LICENSE-PERMISSIONS.md View File

@@ -55,6 +55,28 @@ Below follows a direct copy and paste of each individual request.
> All the best,
> Manu

### Light Panels

*On Monday, July 25, 2022, 4:31 PM CET, Alexander Chalikiopoulos wrote:*

> I have another panel-question for you. Filipe has been working on a (silly) feature for Cardinal that brings "real light mode" to all the panels. This is something we have been doing for "dark mode" already. This was not applicable to Befaco panels of course, since they are already dark. However now it will be possible to also flip a switch and turn all panels to "light".
>
> What we are wondering is if you are OK with us changing the panels in this way. We do not modify the source files, but this is done in real time in the rendering itself. If you have any remarks or suggestions we'll be happy to take those into consideration as well of course.
>
> A picture says more than just some words -> https://i.imgur.com/fKBhHCn.png
>
> cheers,
> Alexander

*On Monday, August 15, 2022, 11:21 AM CET, Manu Retamuro wrote:*

> I do not see too much trouble on this mod, for the light version!
>
> Thanks a bunch for this!!
>
> All the best,
> Manu

## ESeries (Paul Schreiber @ SynthTech)

*On Wednesday, January 19, 2022, 04:53:44 AM CST, Filipe Coelho wrote:*


+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 923c4fbca043b5a0a69226b738dbf9fac1c087f2
Subproject commit 71b17971f63dc9def67faea500dcbaced979efb4

+ 1
- 1
include/helpers.hpp View File

@@ -68,7 +68,7 @@ struct CardinalPluginModel : CardinalPluginModelHelper
tm = dynamic_cast<TModule*>(m);
}
app::ModuleWidget* const tmw = new TModuleWidget(tm);
DISTRHO_SAFE_ASSERT_RETURN(tmw->module == m, nullptr);
DISTRHO_CUSTOM_SAFE_ASSERT_RETURN(m != nullptr ? m->model->name.c_str() : "null", tmw->module == m, nullptr);
tmw->setModel(this);
return tmw;
}


+ 12
- 12
jucewrapper/CMakeLists.txt View File

@@ -14,40 +14,40 @@ 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")
set_property(TARGET carla_host_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/plugin/${CMAKE_BUILD_TYPE}/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")
set_property(TARGET carla_engine_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/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")
set_property(TARGET carla_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/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")
set_property(TARGET native_plugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/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")
set_property(TARGET audio_decoder PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/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")
set_property(TARGET jackbridge PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/jackbridge.min.a")

add_library(lilv STATIC IMPORTED)
set_property(TARGET lilv PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/lilv.a")
set_property(TARGET lilv PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/lilv.a")

add_library(rtmempool STATIC IMPORTED)
set_property(TARGET rtmempool PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/rtmempool.a")
set_property(TARGET rtmempool PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/rtmempool.a")

add_library(sfzero STATIC IMPORTED)
set_property(TARGET sfzero PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/sfzero.a")
set_property(TARGET sfzero PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/sfzero.a")

add_library(water STATIC IMPORTED)
set_property(TARGET water PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/water.a")
set_property(TARGET water PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/water.a")

add_library(ysfx STATIC IMPORTED)
set_property(TARGET ysfx PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/ysfx.a")
set_property(TARGET ysfx PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/ysfx.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")
set_property(TARGET zita_resampler PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/zita-resampler.a")

add_library(sCardinal STATIC IMPORTED)
set_property(TARGET sCardinal PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/Cardinal.a")


+ 6
- 0
jucewrapper/CardinalWrapper.cpp View File

@@ -368,6 +368,12 @@ protected:
else
timePosition.frame = 0;

// use 4/4 as fallback time signature if not provided by the host
if (posInfo.timeSigNumerator == 0)
posInfo.timeSigNumerator = 4;
if (posInfo.timeSigDenominator == 0)
posInfo.timeSigDenominator = 4;

timePosition.bbt.beatsPerMinute = posInfo.bpm;

const double ppqPos = std::abs(posInfo.ppqPosition);


+ 1
- 1
plugins/Bidoo

@@ -1 +1 @@
Subproject commit 7579f13bffc11548c857393408f3c2e030ee2483
Subproject commit 5d2f5721e2701f747d0410fc407e6b1e782f16dc

+ 2
- 0
plugins/plugins.cpp View File

@@ -1423,6 +1423,8 @@ static void initStatic__Bidoo()
p->addModel(modelBORDL);
p->addModel(modelZOUMAI);
p->addModel(modelZOUMAIExpander);
p->addModel(modelENCORE);
p->addModel(modelENCOREExpander);
p->addModel(modelMU);
p->addModel(modelCHUTE);
p->addModel(modelLOURDE);


+ 91
- 2
src/CardinalUI.cpp View File

@@ -30,6 +30,10 @@
#include <ui/MenuSeparator.hpp>
#include <window/Window.hpp>

#ifdef DPF_RUNTIME_TESTING
# include <plugin.hpp>
#endif

#ifdef DISTRHO_OS_WASM
# include <ui/Button.hpp>
# include <ui/Label.hpp>
@@ -301,7 +305,12 @@ class CardinalUI : public CardinalBaseUI,
rack::math::Vec lastMousePos;
WindowParameters windowParameters;
int rateLimitStep = 0;
#ifdef DISTRHO_OS_WASM
int8_t counterForFirstIdlePoint = 0;
#endif
#ifdef DPF_RUNTIME_TESTING
bool inSelfTest = false;
#endif

struct ScopedContext {
CardinalPluginContext* const context;
@@ -444,11 +453,67 @@ public:

void uiIdle() override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest)
{
context->window->step();
return;
}

if (context->plugin->isSelfTestInstance())
{
inSelfTest = true;

Application& app(getApp());

const ScopedContext sc(this);

context->patch->clear();
context->window->step();
app.idle();

const rack::math::Vec mousePos(getWidth()/2,getHeight()/2);
context->event->handleButton(mousePos, GLFW_MOUSE_BUTTON_LEFT, GLFW_RELEASE, 0x0);
context->event->handleHover(mousePos, rack::math::Vec(0,0));
context->window->step();
app.idle();

for (rack::plugin::Plugin* p : rack::plugin::plugins)
{
for (rack::plugin::Model* m : p->models)
{
rack::engine::Module* const module = m->createModule();
DISTRHO_SAFE_ASSERT_CONTINUE(module != nullptr);

rack::CardinalPluginModelHelper* const helper = dynamic_cast<rack::CardinalPluginModelHelper*>(m);
DISTRHO_SAFE_ASSERT_CONTINUE(helper != nullptr);

rack::app::ModuleWidget* const moduleWidget = helper->createModuleWidget(module);
DISTRHO_SAFE_ASSERT_CONTINUE(moduleWidget != nullptr);

context->engine->addModule(module);
context->scene->rack->addModuleAtMouse(moduleWidget);

for (int i=5; --i>=0;)
app.idle();

context->scene->rack->removeModule(moduleWidget);
context->engine->removeModule(module);
context->window->step();
delete module;
app.idle();
}
}

inSelfTest = false;
}
#endif

#ifdef DISTRHO_OS_WASM
if (counterForFirstIdlePoint >= 0 && ++counterForFirstIdlePoint == 30)
{
counterForFirstIdlePoint = -1;

#ifdef DISTRHO_OS_WASM
if (rack::patchStorageSlug != nullptr)
{
std::string url("/patchstorage.php?slug=");
@@ -469,8 +534,8 @@ public:
emscripten_async_wget(url.c_str(), context->patch->templatePath.c_str(),
downloadRemotePatchSucceeded, downloadRemotePatchFailed);
}
#endif
}
#endif

if (filebrowserhandle != nullptr && fileBrowserIdle(filebrowserhandle))
{
@@ -715,6 +780,10 @@ protected:

bool onMouse(const MouseEvent& ev) override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest) return false;
#endif

if (ev.press)
getWindow().focus();

@@ -752,6 +821,10 @@ protected:

bool onMotion(const MotionEvent& ev) override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest) return false;
#endif

const rack::math::Vec mousePos = rack::math::Vec(ev.pos.getX(), ev.pos.getY()).div(getScaleFactor()).round();
const rack::math::Vec mouseDelta = mousePos.minus(lastMousePos);

@@ -763,6 +836,10 @@ protected:

bool onScroll(const ScrollEvent& ev) override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest) return false;
#endif

rack::math::Vec scrollDelta = rack::math::Vec(ev.delta.getX(), ev.delta.getY());
#ifndef DISTRHO_OS_MAC
scrollDelta = scrollDelta.mult(50.0);
@@ -775,6 +852,10 @@ protected:

bool onCharacterInput(const CharacterInputEvent& ev) override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest) return false;
#endif

if (ev.character < ' ' || ev.character >= kKeyDelete)
return false;

@@ -785,6 +866,10 @@ protected:

bool onKeyboard(const KeyboardEvent& ev) override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest) return false;
#endif

const int action = ev.press ? GLFW_PRESS : GLFW_RELEASE;
const int mods = glfwMods(ev.mod);

@@ -880,6 +965,10 @@ protected:

void uiFocus(const bool focus, CrossingMode) override
{
#ifdef DPF_RUNTIME_TESTING
if (inSelfTest) return;
#endif

if (!focus)
{
const ScopedContext sc(this, 0);


Loading…
Cancel
Save