Browse Source

More work for native audio variant, add to win and mac installers

tags/22.09
falkTX 2 years ago
parent
commit
340e927ae3
23 changed files with 148 additions and 51 deletions
  1. +11
    -5
      .gitignore
  2. +1
    -1
      Makefile
  3. +1
    -1
      dpf
  4. +1
    -1
      jucewrapper/CMakeLists.txt
  5. +1
    -1
      patches/init/native.vcv
  6. +1
    -0
      plugins/Cardinal/src/plugincontext.hpp
  7. +4
    -3
      src/Cardinal/DistrhoPluginInfo.h
  8. +1
    -1
      src/CardinalCommon.cpp
  9. +4
    -3
      src/CardinalFX/DistrhoPluginInfo.h
  10. +4
    -3
      src/CardinalNative/DistrhoPluginInfo.h
  11. +8
    -7
      src/CardinalPlugin.cpp
  12. +4
    -3
      src/CardinalSynth/DistrhoPluginInfo.h
  13. +15
    -0
      src/Makefile.cardinal.mk
  14. +3
    -0
      src/PluginContext.hpp
  15. +3
    -5
      src/override/MenuBar.cpp
  16. +17
    -6
      utils/create-macos-installer.sh
  17. BIN
      utils/distrho.icns
  18. +7
    -3
      utils/inno/win32.iss
  19. +7
    -3
      utils/inno/win64.iss
  20. +20
    -0
      utils/macOS/Info_JACK.plist
  21. +22
    -0
      utils/macOS/Info_Native.plist
  22. +8
    -0
      utils/macOS/package.xml.in
  23. +5
    -5
      utils/macOS/welcome.txt

+ 11
- 5
.gitignore View File

@@ -5,6 +5,7 @@
*.exe
*.dll
*.dylib
*.pkg
*.so
*.zip

@@ -12,8 +13,13 @@
.kdev_include_paths
.kdev4/

bin/
build/
documentation.pdf
utils/inno/resources.iss
utils/inno/version.iss
.cache
compile_commands.json

/bin/
/build/
/documentation.pdf
/jucewrapper/build/
/jucewrapper/JUCE/
/utils/inno/resources.iss
/utils/inno/version.iss

+ 1
- 1
Makefile View File

@@ -8,7 +8,7 @@
# jucewrapper/CMakeList.txt `project`
# src/CardinalCommon.cpp `CARDINAL_VERSION`
# src/CardinalPlugin.cpp `getVersion`
VERSION = 22.07
VERSION = 22.08

# --------------------------------------------------------------
# Import base definitions


+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 1cc5641ba765dcb22da32c66faf3a09f808bfb27
Subproject commit c9ce3383797f398bb091d37525fd00ef7047afc7

+ 1
- 1
jucewrapper/CMakeLists.txt View File

@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.15)
project(Cardinal VERSION 22.07)
project(Cardinal VERSION 22.08)

add_subdirectory(JUCE)



patches/init/wasm.vcv → patches/init/native.vcv View File

@@ -12,7 +12,7 @@
"data": {
"filepath": "",
"lang": "None",
"etext": "Welcome to Cardinal!\n\nThis is the Web/Wasm variant\nIt has 2 audio outputs, enabled by default.\nUse Engine menu to enable input and/or MIDI.\n\nA basic VCO + ADSR + VCA is the default patch\n\n",
"etext": "Welcome to Cardinal!\n\nThis is the Native Audio/MIDI variant.\nIt has 2 audio outputs, enabled by default.\nUse Engine menu to enable input and/or MIDI.\n\nA basic VCO + ADSR + VCA is the default patch\n\n",
"width": 23
},
"pos": [

+ 1
- 0
plugins/Cardinal/src/plugincontext.hpp View File

@@ -36,6 +36,7 @@ static constexpr const uint32_t kModuleParameters = 24;
enum CardinalVariant {
kCardinalVariantMain,
kCardinalVariantFX,
kCardinalVariantNative,
kCardinalVariantSynth,
};



+ 4
- 3
src/Cardinal/DistrhoPluginInfo.h View File

@@ -18,9 +18,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define CARDINAL_VARIANT_MAIN 1
#define CARDINAL_VARIANT_FX 0
#define CARDINAL_VARIANT_SYNTH 0
#define CARDINAL_VARIANT_MAIN 1
#define CARDINAL_VARIANT_FX 0
#define CARDINAL_VARIANT_NATIVE 0
#define CARDINAL_VARIANT_SYNTH 0

#define CARDINAL_NUM_AUDIO_INPUTS 8
#define CARDINAL_NUM_AUDIO_OUTPUTS 8


+ 1
- 1
src/CardinalCommon.cpp View File

@@ -57,7 +57,7 @@
# include <emscripten/emscripten.h>
#endif

const std::string CARDINAL_VERSION = "22.07";
const std::string CARDINAL_VERSION = "22.08";

namespace rack {



+ 4
- 3
src/CardinalFX/DistrhoPluginInfo.h View File

@@ -18,9 +18,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define CARDINAL_VARIANT_MAIN 0
#define CARDINAL_VARIANT_FX 1
#define CARDINAL_VARIANT_SYNTH 0
#define CARDINAL_VARIANT_MAIN 0
#define CARDINAL_VARIANT_FX 1
#define CARDINAL_VARIANT_NATIVE 0
#define CARDINAL_VARIANT_SYNTH 0

#define CARDINAL_NUM_AUDIO_INPUTS 2
#define CARDINAL_NUM_AUDIO_OUTPUTS 2


+ 4
- 3
src/CardinalNative/DistrhoPluginInfo.h View File

@@ -18,9 +18,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define CARDINAL_VARIANT_MAIN 0
#define CARDINAL_VARIANT_FX 1
#define CARDINAL_VARIANT_SYNTH 0
#define CARDINAL_VARIANT_MAIN 0
#define CARDINAL_VARIANT_FX 0
#define CARDINAL_VARIANT_NATIVE 1
#define CARDINAL_VARIANT_SYNTH 0

#define CARDINAL_NUM_AUDIO_INPUTS 2
#define CARDINAL_NUM_AUDIO_OUTPUTS 2


+ 8
- 7
src/CardinalPlugin.cpp View File

@@ -52,10 +52,10 @@
# include "extra/SharedResourcePointer.hpp"
#endif
#ifdef DISTRHO_OS_WASM
# define CARDINAL_TEMPLATE_NAME "init/wasm.vcv"
#elif CARDINAL_VARIANT_FX
#if CARDINAL_VARIANT_FX
# define CARDINAL_TEMPLATE_NAME "init/fx.vcv"
#elif CARDINAL_VARIANT_NATIVE
# define CARDINAL_TEMPLATE_NAME "init/native.vcv"
#elif CARDINAL_VARIANT_SYNTH
# define CARDINAL_TEMPLATE_NAME "init/synth.vcv"
#else
@@ -188,11 +188,12 @@ struct Initializer
}
}
if (asset::systemDir.empty() || ! system::exists(asset::systemDir))
if (asset::systemDir.empty() || ! system::exists(asset::systemDir) || ! system::exists(asset::bundlePath))
{
#ifdef CARDINAL_PLUGIN_SOURCE_DIR
// Make system dir point to source code location as fallback
asset::systemDir = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "Rack";
asset::bundlePath.clear();
// If source code dir does not exist use install target prefix as system dir
if (!system::exists(system::join(asset::systemDir, "res")))
@@ -683,12 +684,12 @@ protected:
uint32_t getVersion() const override
{
return d_version(0, 22, 7);
return d_version(0, 22, 8);
}
int64_t getUniqueId() const override
{
#if CARDINAL_VARIANT_MAIN
#if CARDINAL_VARIANT_MAIN || CARDINAL_VARIANT_NATIVE
return d_cconst('d', 'C', 'd', 'n');
#elif CARDINAL_VARIANT_FX
return d_cconst('d', 'C', 'n', 'F');
@@ -704,7 +705,7 @@ protected:
void initAudioPort(const bool input, uint32_t index, AudioPort& port) override
{
#if CARDINAL_VARIANT_FX || CARDINAL_VARIANT_SYNTH
#if CARDINAL_VARIANT_FX || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_SYNTH
if (index < 2)
port.groupId = kPortGroupStereo;
#endif


+ 4
- 3
src/CardinalSynth/DistrhoPluginInfo.h View File

@@ -18,9 +18,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define CARDINAL_VARIANT_MAIN 0
#define CARDINAL_VARIANT_FX 0
#define CARDINAL_VARIANT_SYNTH 1
#define CARDINAL_VARIANT_MAIN 0
#define CARDINAL_VARIANT_FX 0
#define CARDINAL_VARIANT_NATIVE 0
#define CARDINAL_VARIANT_SYNTH 1

#define CARDINAL_NUM_AUDIO_INPUTS 0
#define CARDINAL_NUM_AUDIO_OUTPUTS 2


+ 15
- 0
src/Makefile.cardinal.mk View File

@@ -346,6 +346,21 @@ lv2: $(LV2_RESOURCES)
vst2: $(VST2_RESOURCES)
vst3: $(VST3_RESOURCES)

# --------------------------------------------------------------
# Extra rules for macOS app bundle

$(TARGET_DIR)/Cardinal.app/Contents/Info.plist: ../../utils/macOS/Info_JACK.plist $(TARGET_DIR)/Cardinal.app/Contents/Resources/distrho.icns
-@mkdir -p $(shell dirname $@)
cp $< $@

$(TARGET_DIR)/CardinalNative.app/Contents/Info.plist: ../../utils/macOS/Info_Native.plist $(TARGET_DIR)/CardinalNative.app/Contents/Resources/distrho.icns
-@mkdir -p $(shell dirname $@)
cp $< $@

$(TARGET_DIR)/%.app/Contents/Resources/distrho.icns: ../../utils/distrho.icns
-@mkdir -p $(shell dirname $@)
cp $< $@

# --------------------------------------------------------------
# Extra rules for wasm resources



+ 3
- 0
src/PluginContext.hpp View File

@@ -41,6 +41,7 @@ static constexpr const uint kModuleParameters = 24;
enum CardinalVariant {
kCardinalVariantMain,
kCardinalVariantFX,
kCardinalVariantNative,
kCardinalVariantSynth,
};

@@ -74,6 +75,8 @@ struct CardinalPluginContext : rack::Context {
variant(kCardinalVariantMain),
#elif CARDINAL_VARIANT_FX
variant(kCardinalVariantFX),
#elif CARDINAL_VARIANT_NATIVE
variant(kCardinalVariantNative),
#elif CARDINAL_VARIANT_SYNTH
variant(kCardinalVariantSynth),
#else


+ 3
- 5
src/override/MenuBar.cpp View File

@@ -661,13 +661,11 @@ struct EngineButton : MenuButton {
}

if (supportsMIDI()) {
const bool enabled = isMIDIEnabled();
std::string rightText;
if (enabled)
if (isMIDIEnabled())
rightText = CHECKMARK_STRING;
menu->addChild(createMenuItem("Enable MIDI", rightText, [enabled]() {
if (!enabled)
requestMIDI();
menu->addChild(createMenuItem("Enable/Reconnect MIDI", rightText, []() {
requestMIDI();
}));
}



+ 17
- 6
utils/create-macos-installer.sh View File

@@ -9,13 +9,12 @@ else
exit
fi

rm -rf res
rm -rf au
rm -rf lv2
rm -rf vst2
rm -rf vst3
rm -rf res jack native au lv2 vst2 vst3
mkdir jack native au lv2 vst2 vst3
mv Cardinal.app jack/CardinalJACK.app
mv CardinalNative.app native/CardinalNative.app

mkdir au lv2 vst2 vst3
mv *.component au/
mv *.lv2 lv2/
mv *.vst vst2/
@@ -31,6 +30,18 @@ pkgbuild \
--root "${PWD}/res/" \
../dpf-cardinal-resources.pkg

pkgbuild \
--identifier "studio.kx.distrho.plugins.cardinal.jack" \
--install-location "/Applications/" \
--root "${PWD}/jack/" \
../dpf-cardinal-jack.pkg

pkgbuild \
--identifier "studio.kx.distrho.plugins.cardinal.native" \
--install-location "/Applications/" \
--root "${PWD}/native/" \
../dpf-cardinal-native.pkg

pkgbuild \
--identifier "studio.kx.distrho.plugins.cardinal.components" \
--install-location "/Library/Audio/Plug-Ins/Components/" \


BIN
utils/distrho.icns View File


+ 7
- 3
utils/inno/win32.iss View File

@@ -16,13 +16,14 @@ OutputDir=.
UsePreviousAppDir=no

[Types]
Name: "normal"; Description: "Normal installation (recommended)";
Name: "full"; Description: "Full installation";
Name: "custom"; Description: "Custom installation"; Flags: iscustom;

[Components]
Name: resources; Description: "Resources"; Types: normal custom; Flags: fixed;
Name: carla; Description: "Carla/Ildaeil host tools"; Types: normal;
Name: jack; Description: "Standalone (requires JACK)"; Types: custom;
Name: jack; Description: "Standalone (JACK)"; Types: custom;
Name: native; Description: "Standalone (Native)"; Types: custom;
Name: lv2; Description: "LV2 plugin"; Types: normal;
Name: vst2; Description: "VST2 plugin"; Types: normal;
Name: vst3; Description: "VST3 plugin"; Types: normal;
@@ -46,6 +47,8 @@ Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf32}\Card
Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf32}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion;
; jack
Source: "..\..\bin\Cardinal.exe"; DestDir: "{app}"; Components: jack; Flags: ignoreversion;
; native
Source: "..\..\bin\CardinalNative.exe"; DestDir: "{app}"; Components: native; 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;
@@ -58,4 +61,5 @@ Source: "..\..\bin\CardinalFX.vst3\Contents\x86-win\CardinalFX.vst3"; DestDir: "
Source: "..\..\bin\CardinalSynth.vst3\Contents\x86-win\CardinalSynth.vst3"; DestDir: "{commoncf32}\VST3\CardinalSynth.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion;

[Icons]
Name: "{commonprograms}\Cardinal"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin"; Components: jack;
Name: "{commonprograms}\Cardinal (JACK)"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (JACK variant)"; Components: jack;
Name: "{commonprograms}\Cardinal (Native)"; Filename: "{app}\CardinalNative.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (Native variant)"; Components: native;

+ 7
- 3
utils/inno/win64.iss View File

@@ -17,13 +17,14 @@ OutputDir=.
UsePreviousAppDir=no

[Types]
Name: "normal"; Description: "Normal installation (recommended)";
Name: "full"; Description: "Full installation";
Name: "custom"; Description: "Custom installation"; Flags: iscustom;

[Components]
Name: resources; Description: "Resources"; Types: normal custom; Flags: fixed;
Name: carla; Description: "Carla/Ildaeil host tools"; Types: normal;
Name: jack; Description: "Standalone (requires JACK)"; Types: custom;
Name: jack; Description: "Standalone (JACK)"; Types: custom;
Name: native; Description: "Standalone (Native)"; Types: custom;
Name: lv2; Description: "LV2 plugin"; Types: normal;
Name: vst2; Description: "VST2 plugin"; Types: normal;
Name: vst3; Description: "VST3 plugin"; Types: normal;
@@ -47,6 +48,8 @@ Source: "..\..\carla\build\Carla\resources\lib\*.*"; DestDir: "{commoncf64}\Card
Source: "..\..\carla\build\Carla\resources\lib\PyQt5\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources\lib\PyQt5"; Components: carla; Flags: ignoreversion;
; jack
Source: "..\..\bin\Cardinal.exe"; DestDir: "{app}"; Components: jack; Flags: ignoreversion;
; native
Source: "..\..\bin\CardinalNative.exe"; DestDir: "{app}"; Components: native; 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;
@@ -59,4 +62,5 @@ Source: "..\..\bin\CardinalFX.vst3\Contents\x86_64-win\CardinalFX.vst3"; DestDir
Source: "..\..\bin\CardinalSynth.vst3\Contents\x86_64-win\CardinalSynth.vst3"; DestDir: "{commoncf64}\VST3\CardinalSynth.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion;

[Icons]
Name: "{commonprograms}\Cardinal"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin"; Components: jack;
Name: "{commonprograms}\Cardinal (JACK)"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (JACK variant)"; Components: jack;
Name: "{commonprograms}\Cardinal (Native)"; Filename: "{app}\CardinalNative.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (Native variant)"; Components: native;

+ 20
- 0
utils/macOS/Info_JACK.plist View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Cardinal</string>
<key>CFBundleIconFile</key>
<string>distrho.icns</string>
<key>CFBundleIdentifier</key>
<string>Cardinal</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSLocalNetworkUsageDescription</key>
<string>Cardinal requires network permissions for remote OSC control.</string>
</dict>
</plist>

+ 22
- 0
utils/macOS/Info_Native.plist View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>CardinalNative</string>
<key>CFBundleIconFile</key>
<string>distrho.icns</string>
<key>CFBundleIdentifier</key>
<string>CardinalNative</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSLocalNetworkUsageDescription</key>
<string>Cardinal requires network permissions for remote OSC control.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Cardinal requires microphone permissions for audio input.</string>
</dict>
</plist>

+ 8
- 0
utils/macOS/package.xml.in View File

@@ -9,6 +9,12 @@
<choice id="studio.kx.distrho.cardinal-res" title="Resources" description="Install resources" visible="false">
<pkg-ref id="studio.kx.distrho.cardinal-resources" version="0">dpf-cardinal-resources.pkg</pkg-ref>
</choice>
<choice id="studio.kx.distrho.cardinal-jack" title="Standalone (JACK)" description="Install Standalone for usage with JACK. See https://jackaudio.org/ for details." visible="true">
<pkg-ref id="studio.kx.distrho.cardinal-jack" version="0">dpf-cardinal-jack.pkg</pkg-ref>
</choice>
<choice id="studio.kx.distrho.cardinal-native" title="Standalone (Native)" description="Install Standalone that uses native Audio and MIDI" visible="true">
<pkg-ref id="studio.kx.distrho.cardinal-native" version="0">dpf-cardinal-native.pkg</pkg-ref>
</choice>
<choice id="studio.kx.distrho.cardinal-au" title="AU" description="Install AU plugins" visible="true">
<pkg-ref id="studio.kx.distrho.cardinal-components" version="0">dpf-cardinal-components.pkg</pkg-ref>
</choice>
@@ -23,6 +29,8 @@
</choice>
<choices-outline>
<line choice="studio.kx.distrho.cardinal-res"/>
<line choice="studio.kx.distrho.cardinal-jack"/>
<line choice="studio.kx.distrho.cardinal-native"/>
<line choice="studio.kx.distrho.cardinal-au"/>
<line choice="studio.kx.distrho.cardinal-lv2"/>
<line choice="studio.kx.distrho.cardinal-vst2"/>


+ 5
- 5
utils/macOS/welcome.txt View File

@@ -2,13 +2,13 @@ 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.

They are all equivalent in performance and behaviour.
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.
This package provides the AU, LV2, VST2 and VST3 audio plugins, plus standalones for both JACK and native audio/MIDI.

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.
- Due to AU and VST2 not supporting CV ports, the main variant is not available for these formats
- The VST3 version is in progress, Synth and FX variants work well, main variant is known to have issues
- The standalones are intentionally very barebones in terms of system integration, prefer to use the plugin versions if you can

Loading…
Cancel
Save