From 976d59005adff08eae1249d7c32b3cd5f31c73f6 Mon Sep 17 00:00:00 2001 From: lambda Date: Tue, 22 Jul 2025 16:15:15 +0300 Subject: [PATCH] Add automatic Quarks installation and Quark initialization --- DSP/BmDspAlgs.sc | 14 ++++++++++++++ DSP/BmDspAlgs.quark => bmSClib.quark | 8 ++++---- quarks/BmQuarks.sc | 20 ++++++++++++++++++++ quarks/readme.org | 17 +++-------------- readme.org | 7 +++++-- 5 files changed, 46 insertions(+), 20 deletions(-) rename DSP/BmDspAlgs.quark => bmSClib.quark (50%) create mode 100644 quarks/BmQuarks.sc diff --git a/DSP/BmDspAlgs.sc b/DSP/BmDspAlgs.sc index 77df50b..f310d99 100644 --- a/DSP/BmDspAlgs.sc +++ b/DSP/BmDspAlgs.sc @@ -1,8 +1,22 @@ BmDspAlgs { + *initClass { + Class.initClassTree(NodeDictionary); + } + *getDict { | relPath | + /* + * TODO: + * ~d1 = BmDspAlgs.getDict("/synths/bass/saw_bass.scd"); + * will cause an error because of / at start + * should check file that exists first + */ var path = PathName(relPath.resolveRelative); var file = path.fullPath.load; + /* + * TODO: + * load dictionary specs here + */ ^NodeDictionary.newFrom(file); } } \ No newline at end of file diff --git a/DSP/BmDspAlgs.quark b/bmSClib.quark similarity index 50% rename from DSP/BmDspAlgs.quark rename to bmSClib.quark index 58e40d2..01c16dc 100644 --- a/DSP/BmDspAlgs.quark +++ b/bmSClib.quark @@ -1,9 +1,9 @@ ( -name: "BmDspAlgs", +name: "bmSClib", summary: "WIP! Collection of dictionaries, describing synth nodes.", version: "0.1.0", -schelp: "BmDspalgs", -dependencies: ["NodeDictionary"], +schelp: "bmSClib", +dependencies: [], license: "GPL", -copyright: "Bjornmossa 2023" +copyright: "Bjornmossa 2025" ) \ No newline at end of file diff --git a/quarks/BmQuarks.sc b/quarks/BmQuarks.sc new file mode 100644 index 0000000..c12f15c --- /dev/null +++ b/quarks/BmQuarks.sc @@ -0,0 +1,20 @@ +BmQuarks { + *initClass { + StartUp.add { + var quarks = [ + "BatLib", + "Bjorklund", + "crucial-library", + "JITLibExtensions", + "miSCellaneous_lib", + ]; + + quarks.do({ + |quarkName| + if(Quarks.isInstalled(quarkName).not, { + Quarks.install(quarkName); + }); + }); + } + } +} \ No newline at end of file diff --git a/quarks/readme.org b/quarks/readme.org index 72b5062..cee23f1 100644 --- a/quarks/readme.org +++ b/quarks/readme.org @@ -1,15 +1,4 @@ - BatLib - Bjorklund - crucial-library - ddwCommon - ddwGUIEnhancements - ddwMixerChannel - Dirt-Samples - JITLibExtensions - miSCellaneous_lib - quarks - SuperDirt - Vowel +Install all needed Quarks at startup. - ChordSymbol - mi-UGens +TODO: +- find way to install extentions (ChordSymbol, mi-UGens) diff --git a/readme.org b/readme.org index 916c69e..9a12f01 100644 --- a/readme.org +++ b/readme.org @@ -1,7 +1,10 @@ * About -* Structure +This repo contains reusable code I often share +between my SuperCollider projects +* Structure - NodeDictionary - Set of Dictionary class extentions for generating nodes from declarative definitions +- quarks + Quarks and Extentions I usally use for projects