Skip to content

Commit

Permalink
Add custom ttl for Freezer, require hvcc from system
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Oct 11, 2024
1 parent 2eb4d78 commit 8951053
Show file tree
Hide file tree
Showing 16 changed files with 337 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: distrho/dpf-makefile-action@v1
with:
target: ${{ matrix.target }}
hvcc: true

macos:
strategy:
Expand All @@ -34,6 +35,7 @@ jobs:
- uses: distrho/dpf-makefile-action@v1
with:
target: ${{ matrix.target }}
hvcc: true

windows:
strategy:
Expand All @@ -47,6 +49,7 @@ jobs:
- uses: distrho/dpf-makefile-action@v1
with:
target: ${{ matrix.target }}
hvcc: true

pluginval:
runs-on: ubuntu-22.04
Expand All @@ -57,3 +60,4 @@ jobs:
- uses: distrho/dpf-makefile-action@v1
with:
target: pluginval
hvcc: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/bin/
/build/
*.dll
*.dylib
*.so
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ include dpf/Makefile.base.mk

PLUGINS = $(subst plugins/,,$(wildcard plugins/*))

# CUSTOM_TTL = $(subst custom-ttl/,,$(wildcard custom-ttl/*))
# MODGUIS = $(subst custom-ttl/,,$(subst /modgui,,$(wildcard custom-ttl/*/modgui)))
CUSTOM_TTL = $(subst custom-ttl/,,$(wildcard custom-ttl/*))
MODGUIS = $(subst custom-ttl/,,$(subst /modgui,,$(wildcard custom-ttl/*/modgui)))

# ---------------------------------------------------------------------------------------------------------------------
# build rules

all: pregen
# $(foreach p,$(CUSTOM_TTL),cp custom-ttl/${p}/*.ttl bin/${p}.lv2/;)
# $(foreach p,$(MODGUIS),cp -r custom-ttl/${p}/modgui bin/${p}.lv2/;)
$(foreach p,$(CUSTOM_TTL),cp custom-ttl/${p}/*.ttl bin/$(lastword $(subst -, ,${p})).lv2/;)
$(foreach p,$(MODGUIS),cp -r custom-ttl/${p}/modgui bin/$(lastword $(subst -, ,${p})).lv2/;)

pregen: plugins dpf/utils/lv2_ttl_generator$(APP_EXT)
@$(CURDIR)/dpf/utils/generate-ttl.sh
Expand All @@ -35,9 +35,8 @@ build/%/dpf-widgets: dpf-widgets
-@mkdir -p build/$*
ln -s $(abspath $<) $@

build/%/Makefile: hvcc/build/lib/hvcc/__init__.py plugins/%/plugin.json plugins/%/plugin.pd
env PYTHONPATH=$(CURDIR)/hvcc/build/lib \
python3 ./hvcc/build/lib/hvcc/__init__.py \
build/%/Makefile: plugins/%/plugin.json plugins/%/plugin.pd
hvcc \
plugins/$*/plugin.pd \
-m plugins/$*/plugin.json \
-n "$(lastword $(subst -, ,$*))" \
Expand All @@ -47,11 +46,6 @@ build/%/Makefile: hvcc/build/lib/hvcc/__init__.py plugins/%/plugin.json plugins/
dpf/utils/lv2_ttl_generator$(APP_EXT):
$(MAKE) -C dpf/utils/lv2-ttl-generator

hvcc/build/lib/hvcc/__init__.py:
cd hvcc && \
python3 -m pip install --isolated --no-cache-dir --no-input -q -r requirements.txt && \
[ -e build ] || python3 setup.py build

# ---------------------------------------------------------------------------------------------------------------------
# cleanup

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ And finally a readme just to give some details on the plugin and any relevant in

### BUILDING

For building you will need a POSIX-compliant compiler (GCC or Clang) plus GNU Make.
For building you will need a POSIX-compliant compiler (GCC or Clang), plus [hvcc](https://wasted-audio.github.io/hvcc/) and GNU Make.
Building is a simple as running `make` after cloning this repository, assuming you have the needed tools installed.

Note that this repository uses git submodules, so cloning with `git clone --recursive` is required.
Expand All @@ -55,7 +55,7 @@ make moddwarf

Change `moddwarf` to `modduo` or `modduox` if applicable.

After building, you can directly push the bundle into a MOD unit over USB by running:
After building, you can directly push the plugin bundles into a MOD unit over USB by running:

```sh
make modpush
Expand Down
188 changes: 188 additions & 0 deletions custom-ttl/BatteryNotIncluded-Freezer/Freezer_dsp.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix midi: <http://lv2plug.in/ns/ext/midi#> .
@prefix mod: <http://moddevices.com/ns/mod#> .
@prefix opts: <http://lv2plug.in/ns/ext/options#> .
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
@prefix patch: <http://lv2plug.in/ns/ext/patch#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rsz: <http://lv2plug.in/ns/ext/resize-port#> .
@prefix spdx: <http://spdx.org/rdf/terms#> .
@prefix unit: <http://lv2plug.in/ns/extensions/units#> .

<urn:hvcc:Freezer>
a lv2:UtilityPlugin, lv2:Plugin, doap:Project ;

lv2:extensionData opts:interface ;

lv2:optionalFeature <http://lv2plug.in/ns/lv2core#hardRTCapable> ,
<http://lv2plug.in/ns/ext/buf-size#boundedBlockLength> ;

lv2:requiredFeature opts:options ,
<http://lv2plug.in/ns/ext/urid#map> ;

opts:supportedOption <http://lv2plug.in/ns/ext/buf-size#nominalBlockLength> ,
<http://lv2plug.in/ns/ext/buf-size#maxBlockLength> ,
<http://lv2plug.in/ns/ext/parameters#sampleRate> ;

lv2:port [
a lv2:InputPort, lv2:AudioPort ;
lv2:index 0 ;
lv2:symbol "lv2_audio_in_1" ;
lv2:name "Audio Input 1" ;
] ;

lv2:port [
a lv2:OutputPort, lv2:AudioPort ;
lv2:index 1 ;
lv2:symbol "lv2_audio_out_1" ;
lv2:name "Audio Output 1" ;
] ;

lv2:port [
a lv2:InputPort, atom:AtomPort ;
lv2:index 2 ;
lv2:name "Events Input" ;
lv2:symbol "lv2_events_in" ;
rsz:minimumSize 2048 ;
atom:bufferType atom:Sequence ;
atom:supports <http://lv2plug.in/ns/ext/time#Position> ;
] ;

lv2:port [
a lv2:InputPort, lv2:ControlPort ;
lv2:index 3 ;
lv2:name "attack" ;
lv2:symbol "attack" ;
lv2:default 100 ;
lv2:minimum 0 ;
lv2:maximum 2000 ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 4 ;
lv2:name "current step" ;
lv2:symbol "current_step" ;
lv2:default 1 ;
lv2:minimum 1 ;
lv2:maximum 6 ;
lv2:portProperty lv2:integer ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 5 ;
lv2:name "decay" ;
lv2:symbol "decay" ;
lv2:default 100 ;
lv2:minimum 0 ;
lv2:maximum 2000 ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 6 ;
lv2:name "decay x10" ;
lv2:symbol "decay_x10" ;
lv2:default 1 ;
lv2:minimum 1 ;
lv2:maximum 10 ;
lv2:portProperty lv2:toggled ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 7 ;
lv2:name "dry" ;
lv2:symbol "dry" ;
lv2:default 1 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 8 ;
lv2:name "freeze" ;
lv2:symbol "freeze" ;
lv2:default 0 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
lv2:portProperty lv2:toggled , mod:preferMomentaryOnByDefault ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 9 ;
lv2:name "layers number" ;
lv2:symbol "layers_number" ;
lv2:default 1 ;
lv2:minimum 1 ;
lv2:maximum 6 ;
lv2:portProperty lv2:integer ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 10 ;
lv2:name "layers volume" ;
lv2:symbol "layers_volume" ;
lv2:default 0.8 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 11 ;
lv2:name "mode" ;
lv2:symbol "mode" ;
lv2:default 0 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
lv2:portProperty lv2:enumeration , lv2:integer ;
lv2:scalePoint
[
rdfs:label "MOMENT" ;
rdf:value 1
] , [
rdfs:label "LATCH" ;
rdf:value 0
]
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 12 ;
lv2:name "sample length" ;
lv2:symbol "sample_length" ;
lv2:default 1 ;
lv2:minimum 0.2 ;
lv2:maximum 1 ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 13 ;
lv2:name "speed" ;
lv2:symbol "speed" ;
lv2:default 1 ;
lv2:minimum 0 ;
lv2:maximum 2 ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 14 ;
lv2:name "wet" ;
lv2:symbol "wet" ;
lv2:default 1 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
] ;

rdfs:comment "Freezer sample and hold notes or chords with infinite sustain" ;

doap:name "Freezer" ;
mod:brand "BattNotIncluded" ;
mod:label "Freezer" ;

doap:maintainer [
foaf:name "[email protected]" ;
] ;

lv2:microVersion 0 ;
lv2:minorVersion 0 .
15 changes: 15 additions & 0 deletions custom-ttl/BatteryNotIncluded-Freezer/modgui.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@prefix modgui: <http://moddevices.com/ns/modgui#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .

<urn:hvcc:Freezer>
modgui:gui [
modgui:resourcesDirectory <modgui> ;
modgui:iconTemplate <modgui/icon.html> ;
modgui:stylesheet <modgui/stylesheet.css> ;
modgui:screenshot <modgui/screen.png> ;
modgui:thumbnail <modgui/thumbnail.png> ;




] .
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions custom-ttl/BatteryNotIncluded-Freezer/modgui/icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="mod-pedal mod-pedal-freezer mod-no-shadow">

<div mod-role="drag-handle" class="mod-drag-handle"></div>

<div class="mod-toggle" mod-role="input-control-port" mod-port-symbol="freeze"></div>

<div class="mod-switch mode" mod-role="input-control-port" mod-port-symbol="mode"></div>


<div class="mod-pedal-knob dry_knob" mod-role="input-control-port" mod-port-symbol="dry"></div>
<div class="mod-pedal-knob wet_knob" mod-role="input-control-port" mod-port-symbol="wet"></div>
<div class="mod-pedal-knob_small layer_knob" mod-role="input-control-port" mod-port-symbol="layers_number"></div>
<div class="mod-pedal-knob_small vol_knob" mod-role="input-control-port" mod-port-symbol="layers_volume"></div>
<div class="mod-pedal-knob attack_knob" mod-role="input-control-port" mod-port-symbol="attack"></div>
<div class="mod-pedal-knob decay_knob" mod-role="input-control-port" mod-port-symbol="decay"></div>

<div class="mod-pedal-input">
<div class="mod-input" title="Audio Input 1" mod-role="input-audio-port" mod-port-symbol="lv2_audio_in_1"></div>
</div>
<div class="mod-pedal-output">
<div class="mod-output" title="Audio Output 1" mod-role="output-audio-port" mod-port-symbol="lv2_audio_out_1"></div>
</div>

</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8951053

Please sign in to comment.