# ∞Open Rack changes against Cardinal 0a530b73273afc914ec71a78e9165cd28c53b599 # Content diffs are shown for modified text files only. Files that were deleted, or replaced # wholesale with new artwork, are listed by name below rather than diffed, so the original # non-commercial artwork is not reproduced here. See apply-openrack-patches.py, which makes every change. # # Deleted (top level): # patches/examples/DRMR_-_BassGrowl.vcv # patches/examples/DRMR_-_Etherpad.vcv # patches/examples/DRMR_-_Gabberswing.vcv # patches/examples/DRMR_-_Interverb.vcv # patches/examples/JTB_-_Waves.vcv # patches/examples/SpotlightKid_-_Classic-Polysynth.vcv # patches/examples/SpotlightKid_-_Cringe-Synth.vcv # patches/examples/VT_-_Jupiter_Ascent.vcv # patches/examples/falkTX_-_Divide-no-Conquer.vcv # patches/examples/falkTX_-_Mini-Arp-Seq.vcv # patches/examples/falkTX_-_Random-Progress-Pluck-Rev.vcv # patches/examples/falkTX_-_Salomonis-MonoRegen.vcv # patches/examples/nooneknowspeter_-_Catalyst.vcv # patches/examples/nooneknowspeter_-_Velour.vcv # patches/examples/nooneknowspeter_-_Xmas.vcv # patches/mini/falkTX_-_Moogy.vcv # patches/mini/falkTX_-_Saw_For_One.vcv # patches/touchosc/24-direct-fader-params.tosc # patches/welcome-wasm.vcv # plugins/Cardinal/res/Miku/Miku.png # Deleted/replaced in src/Rack: # M res/ComponentLibrary/ADAT.svg # M res/ComponentLibrary/BefacoBigKnob.svg # M res/ComponentLibrary/BefacoBigKnob_bg.svg # M res/ComponentLibrary/BefacoPush_0.svg # M res/ComponentLibrary/BefacoPush_1.svg # M res/ComponentLibrary/BefacoSlidePot.svg # M res/ComponentLibrary/BefacoSlidePotHandle.svg # M res/ComponentLibrary/BefacoSwitch.svg # M res/ComponentLibrary/BefacoSwitch_0.svg # M res/ComponentLibrary/BefacoSwitch_1.svg # M res/ComponentLibrary/BefacoSwitch_2.svg # M res/ComponentLibrary/BefacoTinyKnobWhite_bg.svg # M res/ComponentLibrary/BefacoTinyPointBlack.svg # M res/ComponentLibrary/CKD6_0.svg # M res/ComponentLibrary/CKD6_1.svg # M res/ComponentLibrary/CKSSThreeHorizontal_0.svg # M res/ComponentLibrary/CKSSThreeHorizontal_1.svg # M res/ComponentLibrary/CKSSThreeHorizontal_2.svg # M res/ComponentLibrary/CKSSThree_0.svg # M res/ComponentLibrary/CKSSThree_1.svg # M res/ComponentLibrary/CKSSThree_2.svg # M res/ComponentLibrary/CKSS_0.svg # M res/ComponentLibrary/CKSS_1.svg # M res/ComponentLibrary/CL1362.svg # M res/ComponentLibrary/Davies1900hBlack.svg # M res/ComponentLibrary/Davies1900hBlack_bg.svg # M res/ComponentLibrary/Davies1900hLargeBlack.svg # M res/ComponentLibrary/Davies1900hLargeBlack_bg.svg # M res/ComponentLibrary/Davies1900hLargeRed.svg # M res/ComponentLibrary/Davies1900hLargeRed_bg.svg # M res/ComponentLibrary/Davies1900hLargeWhite.svg # M res/ComponentLibrary/Davies1900hLargeWhite_bg.svg # M res/ComponentLibrary/Davies1900hRed.svg # M res/ComponentLibrary/Davies1900hRed_bg.svg # M res/ComponentLibrary/Davies1900hWhite.svg # M res/ComponentLibrary/Davies1900hWhite_bg.svg # M res/ComponentLibrary/LargeLight.svg # M res/ComponentLibrary/MIDI_DIN.svg # M res/ComponentLibrary/MediumLight.svg # M res/ComponentLibrary/NKK_0.svg # M res/ComponentLibrary/NKK_1.svg # M res/ComponentLibrary/NKK_2.svg # M res/ComponentLibrary/PB61303.svg # M res/ComponentLibrary/PJ301M-dark.svg # M res/ComponentLibrary/PJ301M.svg # M res/ComponentLibrary/PJ3410.svg # M res/ComponentLibrary/Plug.svg # M res/ComponentLibrary/PlugPort.svg # M res/ComponentLibrary/Rail-hcdark.svg # M res/ComponentLibrary/Rail-light.svg # M res/ComponentLibrary/Rail.svg # M res/ComponentLibrary/Rogan1PBlue.svg # M res/ComponentLibrary/Rogan1PBlue_fg.svg # M res/ComponentLibrary/Rogan1PGreen.svg # M res/ComponentLibrary/Rogan1PGreen_fg.svg # M res/ComponentLibrary/Rogan1PRed.svg # M res/ComponentLibrary/Rogan1PRed_fg.svg # M res/ComponentLibrary/Rogan1PSBlue.svg # M res/ComponentLibrary/Rogan1PSBlue_fg.svg # M res/ComponentLibrary/Rogan1PSGreen.svg # M res/ComponentLibrary/Rogan1PSGreen_fg.svg # M res/ComponentLibrary/Rogan1PSRed.svg # M res/ComponentLibrary/Rogan1PSRed_fg.svg # M res/ComponentLibrary/Rogan1PSWhite.svg # M res/ComponentLibrary/Rogan1PSWhite_fg.svg # M res/ComponentLibrary/Rogan1PS_bg.svg # M res/ComponentLibrary/Rogan1PWhite.svg # M res/ComponentLibrary/Rogan1PWhite_fg.svg # M res/ComponentLibrary/Rogan1P_bg.svg # M res/ComponentLibrary/Rogan2PBlue.svg # M res/ComponentLibrary/Rogan2PBlue_fg.svg # M res/ComponentLibrary/Rogan2PGreen.svg # M res/ComponentLibrary/Rogan2PGreen_fg.svg # M res/ComponentLibrary/Rogan2PRed.svg # M res/ComponentLibrary/Rogan2PRed_fg.svg # M res/ComponentLibrary/Rogan2PSBlue.svg # M res/ComponentLibrary/Rogan2PSBlue_fg.svg # M res/ComponentLibrary/Rogan2PSGreen.svg # M res/ComponentLibrary/Rogan2PSGreen_fg.svg # M res/ComponentLibrary/Rogan2PSRed.svg # M res/ComponentLibrary/Rogan2PSRed_fg.svg # M res/ComponentLibrary/Rogan2PSWhite.svg # M res/ComponentLibrary/Rogan2PSWhite_fg.svg # M res/ComponentLibrary/Rogan2PS_bg.svg # M res/ComponentLibrary/Rogan2PWhite.svg # M res/ComponentLibrary/Rogan2PWhite_fg.svg # M res/ComponentLibrary/Rogan2P_bg.svg # M res/ComponentLibrary/Rogan2SGray.svg # M res/ComponentLibrary/Rogan2SGray_fg.svg # M res/ComponentLibrary/Rogan2S_bg.svg # M res/ComponentLibrary/Rogan3PBlue.svg # M res/ComponentLibrary/Rogan3PBlue_fg.svg # M res/ComponentLibrary/Rogan3PGreen.svg # M res/ComponentLibrary/Rogan3PGreen_fg.svg # M res/ComponentLibrary/Rogan3PRed.svg # M res/ComponentLibrary/Rogan3PRed_fg.svg # M res/ComponentLibrary/Rogan3PSBlue.svg # M res/ComponentLibrary/Rogan3PSBlue_fg.svg # M res/ComponentLibrary/Rogan3PSGreen.svg # M res/ComponentLibrary/Rogan3PSGreen_fg.svg # M res/ComponentLibrary/Rogan3PSRed.svg # M res/ComponentLibrary/Rogan3PSRed_fg.svg # M res/ComponentLibrary/Rogan3PSWhite.svg # M res/ComponentLibrary/Rogan3PSWhite_fg.svg # M res/ComponentLibrary/Rogan3PS_bg.svg # M res/ComponentLibrary/Rogan3PWhite.svg # M res/ComponentLibrary/Rogan3PWhite_fg.svg # M res/ComponentLibrary/Rogan3P_bg.svg # M res/ComponentLibrary/Rogan5PSGray.svg # M res/ComponentLibrary/Rogan5PSGray_fg.svg # M res/ComponentLibrary/Rogan5PS_bg.svg # M res/ComponentLibrary/Rogan6PSWhite.svg # M res/ComponentLibrary/Rogan6PSWhite_fg.svg # M res/ComponentLibrary/Rogan6PS_bg.svg # M res/ComponentLibrary/RoundBigBlackKnob.svg # M res/ComponentLibrary/RoundBigBlackKnob_bg.svg # M res/ComponentLibrary/RoundBlackKnob.svg # M res/ComponentLibrary/RoundBlackKnob_bg.svg # M res/ComponentLibrary/RoundHugeBlackKnob.svg # M res/ComponentLibrary/RoundHugeBlackKnob_bg.svg # M res/ComponentLibrary/RoundLargeBlackKnob.svg # M res/ComponentLibrary/RoundLargeBlackKnob_bg.svg # M res/ComponentLibrary/RoundSmallBlackKnob.svg # M res/ComponentLibrary/RoundSmallBlackKnob_bg.svg # M res/ComponentLibrary/ScrewBlack.svg # M res/ComponentLibrary/ScrewSilver.svg # M res/ComponentLibrary/SmallLight.svg # M res/ComponentLibrary/SynthTechAlco.svg # M res/ComponentLibrary/SynthTechAlco_bg.svg # M res/ComponentLibrary/TL1105_0.svg # M res/ComponentLibrary/TL1105_1.svg # M res/ComponentLibrary/TinyLight.svg # M res/ComponentLibrary/Trimpot.svg # M res/ComponentLibrary/Trimpot_bg.svg # M res/ComponentLibrary/USB_B.svg # M res/ComponentLibrary/VCVBezel.svg # M res/ComponentLibrary/VCVButton_0.svg # M res/ComponentLibrary/VCVButton_1.svg # M res/ComponentLibrary/VCVSlider.svg # M res/ComponentLibrary/VCVSliderHandle.svg # M res/ComponentLibrary/VCVSliderLight.svg # Added (untracked) files: # patches/mini/The-Groovemaster_-_Open-Rack-Demo.vcv # patches/mini/falkTX_-_Mini-Bass.vcv # plugins/InfiniteNoise/ (new folder: Infinite-Noise 2.0.5, GPL-3.0-or-later, (c) Pelle Liljendal, # https://github.com/pellelil/InfNoiseRack commit 44859c8; res/ holds new CC0 art in place of the # CC-BY-NC-4.0 originals; our code changes to it are diffed at the end of this file) diff --git a/Makefile b/Makefile index 7ed0e41..efb4a80 100644 --- a/Makefile +++ b/Makefile @@ -238,6 +238,11 @@ native: carla deps dgl plugins resources mini: carla deps dgl mini-plugins mini-resources $(MAKE) mini -C src $(CARLA_EXTRA_ARGS) +# Open Rack: browser build of Cardinal Mini only (no LV2 'Sep' variant) +openrack: carla deps dgl mini-plugins mini-resources + $(MAKE) rack.a rack-headless.a -C src $(CARLA_EXTRA_ARGS) + $(MAKE) jack -C src/CardinalMini $(CARLA_EXTRA_ARGS) + au: carla deps dgl plugins resources $(MAKE) au -C src $(CARLA_EXTRA_ARGS) diff --git a/deps/Makefile b/deps/Makefile index c53e998..acfc60c 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -310,8 +310,10 @@ $(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt # Build targets ifneq ($(NOPLUGINS),true) +ifneq ($(OPENRACK),true) TARGETS += $(SURGE_LIB) endif +endif TARGETS += $(RACK_DEP_PATH)/lib/libjansson.a TARGETS += $(RACK_DEP_PATH)/lib/libquickjs.a diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 1a024a2..bbe57e1 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -55,6 +55,7 @@ Below follows a list of all code licenses used in Cardinal and linked submodules | HetrickCV | CC0-1.0 | | | ihtsyn | GPL-3.0-or-later | | | Impromptu | GPL-3.0-or-later | | +| Infinite-Noise | GPL-3.0-or-later | Added by Open Rack; (c) Pelle Liljendal | | JW-Modules | BSD-3-Clause | | | kocmoc | GPL-3.0-or-later | | | LifeFormModular | MIT | | @@ -202,6 +203,7 @@ Below is a list of artwork licenses from plugins | ihtsyn/* | GPL-3.0-or-later | [Same license as source code](https://github.com/nysthi/nysthi/issues/379#issuecomment-1027873902) | | ImpromptuModular/* | CC-BY-NC-ND-4.0 | | | ImpromptuModular/res/comp/complib/* | CC-BY-NC-4.0 | | +| InfiniteNoise/res/* | CC0-1.0 | Open Rack replacement art (gen-infnoise-art.py); Infinite-Noise's own CC-BY-NC-4.0 art and logo are not included | | JW-Modules/* | BSD-3-Clause | No artwork specific license provided | | JW-Modules/DejaVuSansMono.ttf | Bitstream-Vera | Unused in Cardinal | | JW-Modules/res/fonts/ShareTechMono-Regular.ttf | OFL-1.1 | | diff --git a/patches/welcome-wasm-mini.vcv b/patches/welcome-wasm-mini.vcv index 0187bbe..9019465 100644 --- a/patches/welcome-wasm-mini.vcv +++ b/patches/welcome-wasm-mini.vcv @@ -1,283 +1,448 @@ { - "version": "2.1.1", - "zoom": 1.0, - "modules": [ - { - "id": 8712245256622475, - "plugin": "Cardinal", - "model": "TextEditor", - "version": "2.0", - "params": [], - "leftModuleId": 1202678850202654, - "data": { - "filepath": "", - "lang": "None", - "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio outputs, with optional audio input and MIDI (enabled via Engine menu)\n\nA basic VCO + ADSR + VCA is the default patch\n\nHave fun!\n\n", - "width": 19 - }, - "pos": [ - 58, - 0 - ] - }, - { - "id": 5726895899473528, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.5, - "id": 0 - }, - { - "value": 0.5, - "id": 1 - }, - { - "value": 0.5, - "id": 2 - }, - { - "value": 0.5, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 8601159184541723, - "rightModuleId": 4828178296911509, - "pos": [ - 18, - 0 - ] - }, - { - "id": 4828178296911509, - "plugin": "Fundamental", - "model": "VCA-1", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - } - ], - "leftModuleId": 5726895899473528, - "rightModuleId": 1, - "pos": [ - 27, - 0 - ] - }, - { - "id": 8601159184541723, - "plugin": "Fundamental", - "model": "VCO", - "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": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - } - ], - "leftModuleId": 2, - "rightModuleId": 5726895899473528, - "pos": [ - 9, - 0 - ] - }, - { - "id": 1, - "plugin": "Cardinal", - "model": "HostAudio2", - "version": "2.0", - "params": [ - { - "value": 0.79432821273803711, - "id": 0 - } - ], - "leftModuleId": 4828178296911509, - "rightModuleId": 4, - "data": { - "dcFilter": true - }, - "pos": [ - 30, - 0 - ] - }, - { - "id": 2, - "plugin": "Cardinal", - "model": "HostMIDI", - "version": "2.0", - "params": [], - "rightModuleId": 8601159184541723, - "data": { - "pwRange": 0.0, - "smooth": false, - "channels": 1, - "polyMode": 0, - "lastPitch": 8192, - "lastMod": 0, - "inputChannel": 0, - "outputChannel": 0 - }, - "pos": [ - 0, - 0 - ] - }, - { - "id": 4, - "plugin": "Cardinal", - "model": "HostParameters", - "version": "2.0", - "params": [], - "leftModuleId": 1, - "rightModuleId": 1202678850202654, - "data": { - "smooth": true - }, - "pos": [ - 38, - 0 - ] - }, - { - "id": 1202678850202654, - "plugin": "Cardinal", - "model": "HostParametersMap", - "version": "2.0", - "params": [], - "leftModuleId": 4, - "rightModuleId": 8712245256622475, - "data": { - "maps": [ - { - "hostParamId": 255, - "inverted": false, - "smooth": true, - "moduleId": -1, - "paramId": 0 - } - ] - }, - "pos": [ - 47, - 0 - ] + "version": "2.1.1", + "zoom": 1.0, + "modules": [ + { + "id": 101, + "plugin": "Fundamental", + "model": "LFO", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 1.0 + }, + { + "id": 1, + "value": 0.0 + }, + { + "id": 2, + "value": 2.0 + }, + { + "id": 3, + "value": 0.0 + }, + { + "id": 4, + "value": 0.0 + }, + { + "id": 5, + "value": 0.5 + }, + { + "id": 6, + "value": 0.0 + } + ], + "pos": [ + 0, + 0 + ] + }, + { + "id": 102, + "plugin": "Fundamental", + "model": "Random", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 1.0 + }, + { + "id": 1, + "value": 0.0 + }, + { + "id": 2, + "value": 0.0 + }, + { + "id": 3, + "value": 0.0 + }, + { + "id": 4, + "value": 1.0 + }, + { + "id": 5, + "value": 0.18 + }, + { + "id": 6, + "value": 0.0 + }, + { + "id": 7, + "value": 0.0 + }, + { + "id": 8, + "value": 0.0 + }, + { + "id": 9, + "value": 0.0 + } + ], + "pos": [ + 9, + 0 + ] + }, + { + "id": 103, + "plugin": "Fundamental", + "model": "Quantizer", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 0.0 + } + ], + "pos": [ + 18, + 0 + ], + "data": { + "enabledNotes": [ + true, + false, + true, + false, + true, + false, + false, + true, + false, + true, + false, + false + ] + } + }, + { + "id": 104, + "plugin": "Fundamental", + "model": "VCO", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 0.0 + }, + { + "id": 1, + "value": 1.0 + }, + { + "id": 2, + "value": -12.0 + }, + { + "id": 3, + "value": 0.0 + }, + { + "id": 4, + "value": 0.0 + }, + { + "id": 5, + "value": 0.5 + }, + { + "id": 6, + "value": 0.0 + }, + { + "id": 7, + "value": 0.0 } - ], - "cables": [ - { - "id": 5155876120487880, - "outputModuleId": 2, - "outputId": 1, - "inputModuleId": 5726895899473528, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 781753834216137, - "outputModuleId": 2, - "outputId": 6, - "inputModuleId": 5726895899473528, - "inputId": 5, - "color": "#ffd452" - }, - { - "id": 3464471860196875, - "outputModuleId": 5726895899473528, - "outputId": 0, - "inputModuleId": 4828178296911509, - "inputId": 0, - "color": "#e8ff52" - }, - { - "id": 739552540616113, - "outputModuleId": 4828178296911509, - "outputId": 0, - "inputModuleId": 1, - "inputId": 0, - "color": "#52beff" - }, - { - "id": 6701970185765111, - "outputModuleId": 2, - "outputId": 0, - "inputModuleId": 8601159184541723, - "inputId": 0, - "color": "#ff5252" - }, - { - "id": 6959800657121782, - "outputModuleId": 2, - "outputId": 2, - "inputModuleId": 8601159184541723, - "inputId": 1, - "color": "#52ff7d" - }, - { - "id": 1598271319373837, - "outputModuleId": 8601159184541723, - "outputId": 0, - "inputModuleId": 4828178296911509, - "inputId": 1, - "color": "#a8ff52" + ], + "pos": [ + 25, + 0 + ] + }, + { + "id": 105, + "plugin": "Fundamental", + "model": "ADSR", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 0.12 + }, + { + "id": 1, + "value": 0.45 + }, + { + "id": 2, + "value": 0.25 + }, + { + "id": 3, + "value": 0.35 + }, + { + "id": 4, + "value": 0.0 + }, + { + "id": 5, + "value": 0.0 + }, + { + "id": 6, + "value": 0.0 + }, + { + "id": 7, + "value": 0.0 + }, + { + "id": 8, + "value": 0.0 + } + ], + "pos": [ + 34, + 0 + ] + }, + { + "id": 106, + "plugin": "Fundamental", + "model": "VCF", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 0.5 + }, + { + "id": 1, + "value": 0.0 + }, + { + "id": 2, + "value": 0.35 + }, + { + "id": 3, + "value": 0.5 + }, + { + "id": 4, + "value": 0.0 + }, + { + "id": 5, + "value": 0.0 + }, + { + "id": 6, + "value": 0.0 + } + ], + "pos": [ + 43, + 0 + ] + }, + { + "id": 107, + "plugin": "Fundamental", + "model": "VCA-1", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 0.8 + }, + { + "id": 1, + "value": 1.0 + } + ], + "pos": [ + 52, + 0 + ] + }, + { + "id": 110, + "plugin": "InfiniteNoise", + "model": "StereoBalancePan", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 1.0 + }, + { + "id": 1, + "value": 0.0 + }, + { + "id": 2, + "value": 0.4 + }, + { + "id": 3, + "value": 1.0 + }, + { + "id": 4, + "value": 0.0 + } + ], + "pos": [ + 56, + 0 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "id": 0, + "value": 0.7943282127380371 } - ] -} + ], + "pos": [ + 63, + 0 + ], + "data": { + "dcFilter": true + } + }, + { + "id": 109, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "pos": [ + 73, + 0 + ], + "data": { + "filepath": "", + "lang": "None", + "etext": "Infinity Open Rack demo patch\n\nA clocked random melody:\nLFO (clock) -> RANDOM -> QUANTIZER\n-> VCO -> VCF -> VCA -> PAN -> audio out.\nRANDOM's smooth output also moves the\nstereo pan (Infinite-Noise Stereo Balance/Pan).\nThe LFO square wave also gates the ADSR.\n\nTurn any knob to change the sound.\nRight-click empty rack space to add modules.\n\nBuilt from Cardinal (GPL-3.0-or-later).\nSource: see the Infinity Open Rack page footer.", + "width": 22 + } + } + ], + "cables": [ + { + "id": 1000, + "outputModuleId": 101, + "outputId": 3, + "inputModuleId": 102, + "inputId": 2, + "color": "#f2c14e" + }, + { + "id": 1001, + "outputModuleId": 101, + "outputId": 3, + "inputModuleId": 105, + "inputId": 4, + "color": "#f2c14e" + }, + { + "id": 1002, + "outputModuleId": 102, + "outputId": 0, + "inputModuleId": 103, + "inputId": 0, + "color": "#3dbf7a" + }, + { + "id": 1003, + "outputModuleId": 103, + "outputId": 0, + "inputModuleId": 104, + "inputId": 0, + "color": "#3dbf7a" + }, + { + "id": 1004, + "outputModuleId": 104, + "outputId": 2, + "inputModuleId": 106, + "inputId": 3, + "color": "#3d8be0" + }, + { + "id": 1005, + "outputModuleId": 105, + "outputId": 0, + "inputModuleId": 106, + "inputId": 0, + "color": "#e0533d" + }, + { + "id": 1006, + "outputModuleId": 105, + "outputId": 0, + "inputModuleId": 107, + "inputId": 0, + "color": "#e0533d" + }, + { + "id": 1007, + "outputModuleId": 106, + "outputId": 0, + "inputModuleId": 107, + "inputId": 1, + "color": "#3d8be0" + }, + { + "id": 1008, + "outputModuleId": 107, + "outputId": 0, + "inputModuleId": 110, + "inputId": 2, + "color": "#e9e6df" + }, + { + "id": 1009, + "outputModuleId": 102, + "outputId": 2, + "inputModuleId": 110, + "inputId": 0, + "color": "#9b6be0" + }, + { + "id": 1010, + "outputModuleId": 110, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#e9e6df" + }, + { + "id": 1011, + "outputModuleId": 110, + "outputId": 1, + "inputModuleId": 1, + "inputId": 1, + "color": "#e9e6df" + } + ] +} \ No newline at end of file diff --git a/plugins/Makefile b/plugins/Makefile index 2f00fa3..2cde342 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -511,20 +511,11 @@ PLUGIN_FILES += AudibleInstruments/eurorack/streams/svf.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/vactrol.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/compressor.cc -MINIPLUGIN_FILES += AudibleInstruments/src/Plaits.cpp # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/macro_oscillator.cc # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/analog_oscillator.cc # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/digital_oscillator.cc # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/quantizer.cc # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/resources.cc -MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/*.cc) -MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/engine/*.cc) -MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/speech/*.cc) -MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/physical_modelling/*.cc) -MINIPLUGIN_FILES += AudibleInstruments/eurorack/plaits/resources.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/stmlib/dsp/atan.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/stmlib/dsp/units.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/stmlib/utils/random.cc # -------------------------------------------------------------- # Autinn @@ -911,6 +902,12 @@ MINIPLUGIN_FILES += MockbaModular/src/Pannah.cpp MINIPLUGIN_FILES += MockbaModular/src/ReVoltah.cpp MINIPLUGIN_FILES += MockbaModular/src/Shapah.cpp +# -------------------------------------------------------------- +# InfiniteNoise (added by Open Rack) + +INFINITENOISE_CUSTOM = FlipFlop +MINIPLUGIN_FILES += $(wildcard InfiniteNoise/src/*.cpp) + # -------------------------------------------------------------- # Mog @@ -1151,23 +1148,6 @@ SURGEXT_FLAGS += -DSURGE_RACK_SURGE_VERSION=Cardinal SURGEXT_FLAGS += -I$(abspath ../carla/source/modules) -MINIPLUGIN_FILES += surgext/src/Delay.cpp -MINIPLUGIN_FILES += surgext/src/DelayLineByFreq.cpp -MINIPLUGIN_FILES += surgext/src/DelayLineByFreqExpanded.cpp -MINIPLUGIN_FILES += surgext/src/EGxVCA.cpp -MINIPLUGIN_FILES += surgext/src/FX.cpp -MINIPLUGIN_FILES += surgext/src/LFO.cpp -MINIPLUGIN_FILES += surgext/src/Mixer.cpp -MINIPLUGIN_FILES += surgext/src/ModMatrix.cpp -MINIPLUGIN_FILES += surgext/src/QuadAD.cpp -MINIPLUGIN_FILES += surgext/src/QuadLFO.cpp -MINIPLUGIN_FILES += surgext/src/VCO.cpp -MINIPLUGIN_FILES += surgext/src/VCF.cpp -MINIPLUGIN_FILES += surgext/src/Waveshaper.cpp -MINIPLUGIN_FILES += surgext/src/XTModule.cpp -MINIPLUGIN_FILES += surgext/src/XTModuleWidget.cpp -MINIPLUGIN_FILES += surgext/src/XTStyle.cpp -MINIPLUGIN_FILES += surgext-helper/surgext-helper.cpp # -------------------------------------------------------------- # unless_modules @@ -1520,11 +1500,12 @@ RESOURCE_FILES += Cardinal/res/Miku/Miku.png MINIPLUGIN_LIST = Cardinal MINIPLUGIN_LIST += AriaModules -MINIPLUGIN_LIST += AudibleInstruments +# Open Rack: removed AudibleInstruments MINIPLUGIN_LIST += BogaudioModules MINIPLUGIN_LIST += Fundamental MINIPLUGIN_LIST += MockbaModular -MINIPLUGIN_LIST += surgext +MINIPLUGIN_LIST += InfiniteNoise +# Open Rack: removed surgext # MINIPLUGIN_LIST += ValleyAudio MINIRESOURCE_FILES = AriaModules/res/components/jack-transparent.svg @@ -1536,7 +1517,6 @@ MINIRESOURCE_FILES += AriaModules/res/faceplates/Spleet.svg MINIRESOURCE_FILES += AriaModules/res/faceplates/Swerge.svg MINIRESOURCE_FILES += AriaModules/res/signature/signature.svg -MINIRESOURCE_FILES += AudibleInstruments/res/Plaits.svg # MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg @@ -1719,37 +1699,10 @@ MINIRESOURCE_FILES += MockbaModular/res/ReVoltah.svg MINIRESOURCE_FILES += MockbaModular/res/screw.svg MINIRESOURCE_FILES += MockbaModular/res/selector.svg MINIRESOURCE_FILES += MockbaModular/res/Shapah.svg +MINIRESOURCE_FILES += $(wildcard InfiniteNoise/res/*.svg) +MINIRESOURCE_FILES += $(wildcard InfiniteNoise/res/components/*.svg) +MINIRESOURCE_FILES += $(wildcard InfiniteNoise/res/logos/*.svg) -MINIRESOURCE_FILES += surgext/build/surge-data/configuration.xml -MINIRESOURCE_FILES += surgext/build/surge-data/windows.wt -MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Regular.ttf -MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Bold.ttf -MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg_25.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_handle.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-9.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-12.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-14.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-16.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-9.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-12.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-14.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-16.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/mod-button.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/components/port.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/panels/fx/BlankNoDisplay.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/EGLFO.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Matrix.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Mixer.svg -MINIRESOURCE_FILES += surgext/res/xt/dark/panels/vco/BlankVCO.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_0.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_1.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_2.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_3.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_4.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_5.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_6.svg -MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_7.svg # MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg # MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg @@ -2630,6 +2583,14 @@ $(BUILD_DIR)/ML_modules/%.cpp.o: ML_modules/%.cpp $(foreach m,$(ML_CUSTOM),$(call custom_module_names,$(m),ML)) \ -DpluginInstance=pluginInstance__ML +$(BUILD_DIR)/InfiniteNoise/%.cpp.o: InfiniteNoise/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + -IInfiniteNoise/src/ctrl \ + $(foreach m,$(INFINITENOISE_CUSTOM),$(call custom_module_names,$(m),InfiniteNoise)) \ + -DpluginInstance=pluginInstance__InfiniteNoise + $(BUILD_DIR)/MockbaModular/%.cpp.o: MockbaModular/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index fadda3c..e965d23 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -31,7 +31,7 @@ extern Model* modelSpleet; extern Model* modelSwerge; // AudibleInstruments -#include "AudibleInstruments/src/plugin.hpp" +// Open Rack: AudibleInstruments removed // BogaudioModules - integrate theme/skin support #include @@ -68,9 +68,7 @@ extern Model* modelUnison; std::string loadBack(int) { return "res/Empty_gray.svg"; } // surgext -#include "surgext/src/SurgeXT.h" -void surgext_rack_initialize(); -void surgext_rack_update_theme(); +// Open Rack: surgext removed // ValleyAudio #include "ValleyAudio/src/Valley.hpp" @@ -85,6 +83,9 @@ Plugin* pluginInstance__Aria; Plugin* pluginInstance__AudibleInstruments; Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__MockbaModular; +// InfiniteNoise (added by Open Rack); pluginInstance__InfiniteNoise is defined in its plugin.cpp +extern Plugin* pluginInstance__InfiniteNoise; +void init__InfiniteNoise(Plugin* p); Plugin* pluginInstance__surgext; Plugin* pluginInstance__ValleyAudio; @@ -311,6 +312,7 @@ static void initStatic__Aria() } } +#if 0 // Open Rack: removed static void initStatic__AudibleInstruments() { Plugin* const p = new Plugin; @@ -343,6 +345,8 @@ static void initStatic__AudibleInstruments() } } +#endif + static void initStatic__BogaudioModules() { Plugin* const p = new Plugin; @@ -471,6 +475,14 @@ static void initStatic__BogaudioModules() } } +static void initStatic__InfiniteNoise() +{ + Plugin* const p = new Plugin; + const StaticPluginLoader spl(p, "InfiniteNoise"); + if (spl.ok()) + init__InfiniteNoise(p); +} + static void initStatic__MockbaModular() { Plugin* const p = new Plugin; @@ -525,6 +537,7 @@ static void initStatic__MockbaModular() } } +#if 0 // Open Rack: removed static void initStatic__surgext() { Plugin* const p = new Plugin; @@ -614,6 +627,8 @@ static void initStatic__surgext() } } +#endif + /* static void initStatic__ValleyAudio() { @@ -641,10 +656,9 @@ void initStaticPlugins() initStatic__Cardinal(); initStatic__Fundamental(); initStatic__Aria(); - initStatic__AudibleInstruments(); initStatic__BogaudioModules(); initStatic__MockbaModular(); - initStatic__surgext(); + initStatic__InfiniteNoise(); /* initStatic__ValleyAudio(); */ @@ -670,10 +684,6 @@ void updateStaticPluginsDarkMode() listener->defaultSkinChanged(skins._default); } } - // surgext - { - surgext_rack_update_theme(); - } } } diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index a8c81c6..e6d0368 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -120,6 +120,7 @@ endif # surgext libraries SURGE_DEP_PATH = $(abspath ../../deps/surge-build) +ifneq ($(OPENRACK),true) RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libsurge-common.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libjuce_dsp_rack_sub.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/airwindows/libairwindows.a @@ -136,6 +137,7 @@ RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/filesystem/li endif RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a +endif # OPENRACK # -------------------------------------------------------------- # Extra libraries to link against @@ -211,9 +213,11 @@ endif endif ifeq ($(CARDINAL_VARIANT),mini) +ifneq ($(OPENRACK),true) LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui/screenshot.png LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui/thumbnail.png endif +endif # Cardinal main variant is not available as VST2 due to lack of CV ports ifneq ($(CARDINAL_VARIANT),main) diff --git a/src/override/ModuleWidget.cpp b/src/override/ModuleWidget.cpp index 36423e3..f2124fa 100644 --- a/src/override/ModuleWidget.cpp +++ b/src/override/ModuleWidget.cpp @@ -50,7 +50,7 @@ namespace rack { namespace app { -static const char PRESET_FILTERS[] = "VCV Rack module preset (.vcvm):vcvm"; +static const char PRESET_FILTERS[] = "Rack module preset (.vcvm):vcvm"; struct ModuleWidget::Internal { # --- deps/PawPaw (submodule) --- diff --git a/setup/versions.sh b/setup/versions.sh index 54ea4fe..267bd3d 100644 --- a/setup/versions.sh +++ b/setup/versions.sh @@ -50,7 +50,7 @@ ZLIB_URL=https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION} # bootstrap plugins LIBPNG_VERSION=1.6.43 -LIBPNG_URL=http://download.sourceforge.net/libpng +LIBPNG_URL=https://download.sourceforge.net/libpng LIBXML2_VERSION=2.12.4 LIBXML2_URL=https://download.gnome.org/sources/libxml2/2.12 @@ -59,7 +59,7 @@ PIXMAN_VERSION=0.42.2 PIXMAN_URL=https://cairographics.org/releases FREETYPE_VERSION=2.13.2 -FREETYPE_URL=http://download.sourceforge.net/freetype +FREETYPE_URL=https://download.sourceforge.net/freetype FONTCONFIG_VERSION=2.15.0 FONTCONFIG_URL=https://www.freedesktop.org/software/fontconfig/release @@ -69,10 +69,10 @@ CAIRO_VERSION=1.16.0 CAIRO_URL=https://cairographics.org/releases FFTW_VERSION=3.3.10 -FFTW_URL=http://www.fftw.org +FFTW_URL=https://www.fftw.org PCRE_VERSION=8.45 -PCRE_URL=http://download.sourceforge.net/pcre +PCRE_URL=https://download.sourceforge.net/pcre if [ "${WIN32}" -eq 1 ]; then LIBFFI_VERSION=3.4.2 @@ -94,7 +94,7 @@ LIBFFI_URL=https://github.com/libffi/libffi/releases/download/v${LIBFFI_VERSION} GLIB_URL=${KXSTUDIO_FILES_URL} LIBLO_VERSION=0.32 -LIBLO_URL=http://download.sourceforge.net/liblo +LIBLO_URL=https://download.sourceforge.net/liblo LV2_VERSION=0bcde338db1c63bbc503b4d1f6d7b55ed43154af # 1.18.10 LV2_URL=https://gitlab.com/lv2/lv2.git @@ -201,13 +201,13 @@ fi # bootstrap jack stuff AFTEN_VERSION=0.0.8 -AFTEN_URL=http://downloads.sourceforge.net/aften +AFTEN_URL=https://downloads.sourceforge.net/aften DB_VERSION=5.3.28 DB_URL=https://download.oracle.com/berkeley-db PORTAUDIO_VERSION=19.6.0 -PORTAUDIO_URL=http://deb.debian.org/debian/pool/main/p/portaudio19 +PORTAUDIO_URL=https://deb.debian.org/debian/pool/main/p/portaudio19 RTAUDIO_VERSION=e03448bd15c1c34e842459939d755f5f89e880ed RTAUDIO_URL=https://github.com/falkTX/rtaudio.git # --- src/Rack (submodule), excluding replaced artwork --- # --- plugins/InfiniteNoise/src against InfNoiseRack/src (our changes) --- diff -ruN (InfNoiseRack/src vs plugins/InfiniteNoise/src) --- a/InfNoiseRack/src/EnvelopePhaseExpander.cpp +++ b/plugins/InfiniteNoise/src/EnvelopePhaseExpander.cpp @@ -376,16 +376,16 @@ return module->idleOutputMode.req != EnvelopePhaseExpanderModule::iom_phasePos; }; - DynamicDisabledMenuItem* sustainVoltItem = createIndexSubmenuItem( + DynamicDisabledMenuItem* sustainVoltItem = static_cast(createIndexSubmenuItem( "Sustain voltage", voltNames, [=]() { return (size_t)module->sustainPosVolt.req; }, - [=](size_t index) { module->sustainPosVolt.req = (voltValue)index; }); + [=](size_t index) { module->sustainPosVolt.req = (voltValue)index; })) /* Open Rack */; sustainVoltItem->disabledWhen = idleVoltDisabled; menu->addChild(sustainVoltItem); - DynamicDisabledMenuItem* idleVoltItem = createIndexSubmenuItem( + DynamicDisabledMenuItem* idleVoltItem = static_cast(createIndexSubmenuItem( "Idle voltage", voltNames, [=]() { return (size_t)module->idlePosVolt.req; }, - [=](size_t index) { module->idlePosVolt.req = (voltValue)index; }); + [=](size_t index) { module->idlePosVolt.req = (voltValue)index; })) /* Open Rack */; idleVoltItem->disabledWhen = idleVoltDisabled; menu->addChild(idleVoltItem); diff -ruN (InfNoiseRack/src vs plugins/InfiniteNoise/src) --- a/InfNoiseRack/src/OpenRackLabels.hpp +++ b/plugins/InfiniteNoise/src/OpenRackLabels.hpp @@ -0,0 +1,154 @@ +// OpenRackLabels.hpp - run-time panel labels for the Infinite-Noise modules in Open Rack. +// Copyright (C) 2026 The Groovemaster. GPL-3.0-or-later (same licence as Infinite-Noise). +// +// Open Rack does not ship Infinite-Noise's own panel graphics (CC BY-NC 4.0), so its +// replacement panels are plain. This widget writes each module's name at the top of +// the panel and a short label next to each knob, button and port, using the names the +// module itself declares (the same text as the hover tooltips). Labels are placed +// automatically in free space around each control and are skipped when nothing fits. +#pragma once +#include +#include +#include +#include + +namespace openrack { + +struct AutoLabels : rack::widget::TransparentWidget { + struct Item { std::string text; float x, y, size; }; + rack::app::ModuleWidget* mw; + std::function isDark; + std::vector items; + size_t laidOutChildren = (size_t)-1; + bool laidOutWithModule = false; + + AutoLabels(rack::app::ModuleWidget* m, std::function dark) : mw(m), isDark(dark) {} + + static std::string clean(std::string s) { + // drop the upstream "(m) " / "(p) " mono/poly prefixes and trailing " input"/" output" + for (const char* p : {"(m) ", "(p) "}) + if (s.rfind(p, 0) == 0) s = s.substr(4); + for (const char* t : {" input", " output", " Input", " Output"}) { + size_t n = strlen(t); + if (s.size() > n + 1 && s.compare(s.size() - n, n, t) == 0) s = s.substr(0, s.size() - n); + } + return s; + } + + static bool overlaps(const rack::math::Rect& a, const std::vector& rs) { + for (const auto& r : rs) + if (a.pos.x < r.pos.x + r.size.x && r.pos.x < a.pos.x + a.size.x && + a.pos.y < r.pos.y + r.size.y && r.pos.y < a.pos.y + a.size.y) + return true; + return false; + } + + void layout(NVGcontext* vg, int font) { + items.clear(); + const float W = mw->box.size.x, H = mw->box.size.y; + std::vector used; + struct Target { rack::math::Rect r; std::string name; }; + std::vector targets; + for (rack::widget::Widget* w : mw->children) { + if (w == this || !w->isVisible()) continue; + if (w->box.size.x * w->box.size.y > 0.4f * W * H) continue; // panel, overlays + used.push_back(w->box.grow(rack::math::Vec(0.4f, 0.4f))); + std::string name; + if (auto* pw = dynamic_cast(w)) { + if (auto* pq = pw->getParamQuantity()) name = pq->name; + } else if (auto* po = dynamic_cast(w)) { + if (auto* pi = po->getPortInfo()) name = pi->name; + } + name = clean(name); + if (!name.empty()) targets.push_back({w->box, name}); + } + const rack::math::Rect area(rack::math::Vec(1.5f, 16.f), rack::math::Vec(W - 3.f, H - 32.f)); + // the accent bar drawn under the title in the panel art (gen-infnoise-art.py: y 31, 40% wide) + used.push_back(rack::math::Rect(rack::math::Vec(W * 0.3f - 0.4f, 30.6f), rack::math::Vec(W * 0.4f + 0.8f, 2.2f))); + auto fits = [&](const rack::math::Rect& r) { + return area.contains(r) && !overlaps(r, used); + }; + nvgFontFaceId(vg, font); + auto measure = [&](const std::string& s, float size) { + nvgFontSize(vg, size); + float b[4]; nvgTextBounds(vg, 0, 0, s.c_str(), nullptr, b); + return b[2] - b[0]; + }; + + // module name in the header band + if (mw->model) { + std::vector titles = {mw->model->name, mw->model->slug}; + // shorter fallbacks for narrow panels: the last word ("Stereo Balance/Pan" -> + // "Balance/Pan"), then each word or '/'-part cut to 3 letters ("Bal/Pan") + { + const std::string& n = mw->model->name; + size_t sp = n.rfind(' '); + std::string last = (sp == std::string::npos) ? n : n.substr(sp + 1); + if (last != n) titles.push_back(last); + std::string abbr, part; + auto flush = [&](char sep) { if (!part.empty()) abbr += part.substr(0, 3); part.clear(); if (sep) abbr += sep; }; + for (char ch : last) { if (ch == '/' || ch == '-') flush(ch); else part += ch; } + flush(0); + if (abbr != last) titles.push_back(abbr); + } + bool done = false; + for (float size : {8.f, 7.f, 6.f, 5.f}) { + for (const auto& t : titles) { + float tw = measure(t, size); + rack::math::Rect r(rack::math::Vec(W / 2 - tw / 2, 29.5f - size), rack::math::Vec(tw, size)); + if (tw <= W - 4.f && fits(r)) { items.push_back({t, r.pos.x, r.pos.y, size}); used.push_back(r); done = true; break; } + } + if (done) break; + } + } + + for (const auto& t : targets) { + std::vector texts = {t.name}; + size_t sp = t.name.find(' '); + if (sp != std::string::npos && sp > 0) texts.push_back(t.name.substr(0, sp)); + if (t.name.size() > 4) texts.push_back(t.name.substr(0, 4)); + bool placed = false; + for (float size : {6.f, 5.f, 4.4f}) { + for (const auto& s : texts) { + float tw = measure(s, size), th = size; + const rack::math::Rect& b = t.r; + float cx = b.pos.x + b.size.x / 2, cy = b.pos.y + b.size.y / 2; + rack::math::Rect cand[4] = { + rack::math::Rect(rack::math::Vec(cx - tw / 2, b.pos.y + b.size.y + 0.6f), rack::math::Vec(tw, th)), + rack::math::Rect(rack::math::Vec(cx - tw / 2, b.pos.y - th - 0.6f), rack::math::Vec(tw, th)), + rack::math::Rect(rack::math::Vec(b.pos.x + b.size.x + 1.f, cy - th / 2), rack::math::Vec(tw, th)), + rack::math::Rect(rack::math::Vec(b.pos.x - tw - 1.f, cy - th / 2), rack::math::Vec(tw, th)), + }; + for (auto& c : cand) { + // keep a centred label inside the panel by sliding it sideways + if (c.pos.x < area.pos.x) c.pos.x = area.pos.x; + if (c.pos.x + c.size.x > area.pos.x + area.size.x) c.pos.x = area.pos.x + area.size.x - c.size.x; + if (fits(c)) { items.push_back({s, c.pos.x, c.pos.y, size}); used.push_back(c); placed = true; break; } + } + if (placed) break; + } + if (placed) break; + } + } + } + + void draw(const DrawArgs& args) override { + std::shared_ptr font = APP->window->uiFont; + if (!font || font->handle < 0) return; + bool hasModule = mw->module != nullptr; + if (mw->children.size() != laidOutChildren || hasModule != laidOutWithModule) { + layout(args.vg, font->handle); + laidOutChildren = mw->children.size(); + laidOutWithModule = hasModule; + } + nvgFontFaceId(args.vg, font->handle); + nvgTextAlign(args.vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP); + nvgFillColor(args.vg, (isDark && isDark()) ? nvgRGB(0xd8, 0xd6, 0xd0) : nvgRGB(0x2a, 0x2c, 0x30)); + for (const auto& it : items) { + nvgFontSize(args.vg, it.size); + nvgText(args.vg, it.x, it.y, it.text.c_str(), nullptr); + } + } +}; + +} // namespace openrack diff -ruN (InfNoiseRack/src vs plugins/InfiniteNoise/src) --- a/InfNoiseRack/src/RingMod3.cpp +++ b/plugins/InfiniteNoise/src/RingMod3.cpp @@ -85,11 +85,11 @@ for (int i = 0; i < 3; i++) { std::string aNorm = (i > 0) ? " (normalized to to prev AB-output)" : " (normalized to 0V)"; - configInput(A1_INPUT + i, string::f("A%d"+aNorm, i + 1)); + configInput(A1_INPUT + i, string::f("A%d", i + 1) + aNorm /* Open Rack */); std::string bNorm = (i > 0) ? " (normalized to prev B-input)" : " (normalized to A1)"; - configInput(B1_INPUT + i, string::f("B%d"+bNorm, i + 1)); + configInput(B1_INPUT + i, string::f("B%d", i + 1) + bNorm /* Open Rack */); std::string abNorm = (i < 2) ? " (next A-input will normalized to this AB-output)" : ""; - configOutput(AB1_OUTPUT + i, string::f("AB%d"+abNorm, i + 1)); + configOutput(AB1_OUTPUT + i, string::f("AB%d", i + 1) + abNorm /* Open Rack */); int scaleLightIdx = i * 2; configLight(A1_SCALE_LIGHT + scaleLightIdx, string::f("A%d Scale (unlit=1x, yellow=/5, green=/10)", i + 1)); diff -ruN (InfNoiseRack/src vs plugins/InfiniteNoise/src) --- a/InfNoiseRack/src/plugin.cpp +++ b/plugins/InfiniteNoise/src/plugin.cpp @@ -66,6 +66,12 @@ } void InfNoiseModuleWidget::step() { + // Open Rack: add the label layer once the panel and controls exist + if (!openRackLabels) { + openRackLabels = new openrack::AutoLabels(this, [this]() { return effectivePanelIsDark(); }); + addChild(openRackLabels); + } + openRackLabels->box = math::Rect(math::Vec(0, 0), box.size); syncInfNoiseGlobalSettings(); tickDisableOverlayThemeFromRack(); ModuleWidget::step(); @@ -229,7 +235,7 @@ inSaveSettings(); } -void init(Plugin *p) { +void init__InfiniteNoise(Plugin *p) { // Open Rack: renamed from init() pluginInstance = p; // Add modules here diff -ruN (InfNoiseRack/src vs plugins/InfiniteNoise/src) --- a/InfNoiseRack/src/plugin.hpp +++ b/plugins/InfiniteNoise/src/plugin.hpp @@ -3,6 +3,7 @@ #pragma once #include +#include "OpenRackLabels.hpp" // Open Rack #include using namespace ::rack; #include "inUtil.hpp" @@ -469,6 +470,7 @@ // Common Infinite-Noise ModuleWidget functionality //----------------------------------------------------------------------------- struct InfNoiseModuleWidget : ModuleWidget { + openrack::AutoLabels* openRackLabels = nullptr; // Open Rack: names drawn on the plain panels std::string lightSkinPath = ""; std::string darkSkinPath = ""; InfNoiseDisableOverlayManager* disableOverlayManager = nullptr; @@ -795,10 +797,10 @@ } if (module->haveProcQuality) { std::vector procQualNames = getProcessQualityNames(); - DynamicDisabledMenuItem* procQualItem = createIndexSubmenuItem( + DynamicDisabledMenuItem* procQualItem = static_cast(createIndexSubmenuItem( "Process quality", procQualNames, [=]() { return (size_t)module->procQuality.req; }, - [=](size_t index) { module->procQuality.req = (processQuality)index; }); + [=](size_t index) { module->procQuality.req = (processQuality)index; })) /* Open Rack */; // Disable manual selection while Auto process-quality is on (refreshed each frame for Ctrl/Cmd-open menu) procQualItem->disabledWhen = [=]() { return module->haveAutoProcQuality && module->autoProcQuality.req;