Skip to content

Commit e6e8da6

Browse files
committed
Allow use of custom lv2 ttl
Signed-off-by: falkTX <[email protected]>
1 parent 5fc05d6 commit e6e8da6

File tree

5 files changed

+178
-21
lines changed

5 files changed

+178
-21
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ include dpf/Makefile.base.mk
1111

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

14+
CUSTOM_TTL = $(subst custom-ttl/,,$(wildcard custom-ttl/*))
15+
1416
# ---------------------------------------------------------------------------------------------------------------------
1517
# build rules
1618

@@ -19,14 +21,17 @@ all: plugins gen
1921
plugins:
2022
$(foreach p,$(PLUGINS),$(MAKE) all -f max-gen/Makefile.common.mk NAME=${p})
2123

24+
gen: plugins pregen
25+
$(foreach p,$(CUSTOM_TTL),cp custom-ttl/${p}/*.ttl bin/${p}.lv2/)
26+
2227
ifneq ($(CROSS_COMPILING),true)
23-
gen: plugins dpf/utils/lv2_ttl_generator
28+
pregen: plugins dpf/utils/lv2_ttl_generator
2429
@$(CURDIR)/dpf/utils/generate-ttl.sh
2530

2631
dpf/utils/lv2_ttl_generator:
2732
$(MAKE) -C dpf/utils/lv2-ttl-generator
2833
else
29-
gen:
34+
pregen:
3035
endif
3136

3237
# ---------------------------------------------------------------------------------------------------------------------
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
@prefix doap: <http://usefulinc.com/ns/doap#> .
2+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
3+
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
4+
@prefix midi: <http://lv2plug.in/ns/ext/midi#> .
5+
@prefix mod: <http://moddevices.com/ns/mod#> .
6+
@prefix opts: <http://lv2plug.in/ns/ext/options#> .
7+
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
8+
@prefix patch: <http://lv2plug.in/ns/ext/patch#> .
9+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
10+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
11+
@prefix spdx: <http://spdx.org/rdf/terms#> .
12+
@prefix unit: <http://lv2plug.in/ns/extensions/units#> .
13+
14+
<urn:maxgen:zwabo:mirrorz>
15+
a lv2:DelayPlugin, lv2:Plugin, doap:Project ;
16+
17+
lv2:extensionData opts:interface ;
18+
19+
lv2:optionalFeature <http://lv2plug.in/ns/lv2core#hardRTCapable> ,
20+
<http://lv2plug.in/ns/ext/buf-size#boundedBlockLength> ;
21+
22+
lv2:requiredFeature opts:options ,
23+
<http://lv2plug.in/ns/ext/urid#map> ;
24+
25+
opts:supportedOption <http://lv2plug.in/ns/ext/buf-size#nominalBlockLength> ,
26+
<http://lv2plug.in/ns/ext/buf-size#maxBlockLength> ,
27+
<http://lv2plug.in/ns/ext/parameters#sampleRate> ;
28+
29+
lv2:port [
30+
a lv2:InputPort, lv2:AudioPort ;
31+
lv2:index 0 ;
32+
lv2:symbol "lv2_audio_in_1" ;
33+
lv2:name "Audio Input 1" ;
34+
pg:group <urn:maxgen:zwabo:mirrorz#portGroup_dpf_stereo> ;
35+
lv2:designation pg:left ;
36+
] ,
37+
[
38+
a lv2:InputPort, lv2:AudioPort ;
39+
lv2:index 1 ;
40+
lv2:symbol "lv2_audio_in_2" ;
41+
lv2:name "Audio Input 2" ;
42+
pg:group <urn:maxgen:zwabo:mirrorz#portGroup_dpf_stereo> ;
43+
lv2:designation pg:right ;
44+
] ;
45+
46+
lv2:port [
47+
a lv2:OutputPort, lv2:AudioPort ;
48+
lv2:index 2 ;
49+
lv2:symbol "lv2_audio_out_1" ;
50+
lv2:name "Audio Output 1" ;
51+
pg:group <urn:maxgen:zwabo:mirrorz#portGroup_dpf_stereo> ;
52+
lv2:designation pg:left ;
53+
] ,
54+
[
55+
a lv2:OutputPort, lv2:AudioPort ;
56+
lv2:index 3 ;
57+
lv2:symbol "lv2_audio_out_2" ;
58+
lv2:name "Audio Output 2" ;
59+
pg:group <urn:maxgen:zwabo:mirrorz#portGroup_dpf_stereo> ;
60+
lv2:designation pg:right ;
61+
] ;
62+
63+
lv2:port [
64+
a lv2:InputPort, lv2:ControlPort ;
65+
lv2:index 4 ;
66+
lv2:name "BILL" ;
67+
lv2:symbol "BILL" ;
68+
lv2:default 0 ;
69+
lv2:minimum 0 ;
70+
lv2:maximum 1 ;
71+
] ,
72+
[
73+
a lv2:InputPort, lv2:ControlPort ;
74+
lv2:index 5 ;
75+
lv2:name "BOUL" ;
76+
lv2:symbol "BOUL" ;
77+
lv2:default 0 ;
78+
lv2:minimum 0 ;
79+
lv2:maximum 1 ;
80+
] ,
81+
[
82+
a lv2:InputPort, lv2:ControlPort ;
83+
lv2:index 6 ;
84+
lv2:name "ENV" ;
85+
lv2:symbol "ENV" ;
86+
lv2:default 20 ;
87+
lv2:minimum 0 ;
88+
lv2:maximum 2900 ;
89+
] ,
90+
[
91+
a lv2:InputPort, lv2:ControlPort ;
92+
lv2:index 7 ;
93+
lv2:name "dry_wet" ;
94+
lv2:symbol "dry_wet" ;
95+
lv2:default 0.5 ;
96+
lv2:minimum 0 ;
97+
lv2:maximum 1 ;
98+
] ,
99+
[
100+
a lv2:InputPort, lv2:ControlPort ;
101+
lv2:index 8 ;
102+
lv2:name "filter" ;
103+
lv2:symbol "filter" ;
104+
lv2:default 0 ;
105+
lv2:minimum -100 ;
106+
lv2:maximum 100 ;
107+
] ,
108+
[
109+
a lv2:InputPort, lv2:ControlPort ;
110+
lv2:index 9 ;
111+
lv2:name "loop" ;
112+
lv2:symbol "loop" ;
113+
lv2:default 0 ;
114+
lv2:minimum 0 ;
115+
lv2:maximum 1 ;
116+
lv2:portProperty lv2:integer, lv2:toggled, mod:preferMomentaryOnByDefault ;
117+
] ,
118+
[
119+
a lv2:InputPort, lv2:ControlPort ;
120+
lv2:index 10 ;
121+
lv2:name "speed" ;
122+
lv2:symbol "speed" ;
123+
lv2:default 1 ;
124+
lv2:minimum 0.5 ;
125+
lv2:maximum 2 ;
126+
] ,
127+
[
128+
a lv2:InputPort, lv2:ControlPort ;
129+
lv2:index 11 ;
130+
lv2:name "trigger" ;
131+
lv2:symbol "trigger" ;
132+
lv2:default 0 ;
133+
lv2:minimum 0 ;
134+
lv2:maximum 1 ;
135+
lv2:portProperty lv2:integer, lv2:toggled, mod:preferMomentaryOnByDefault ;
136+
] ;
137+
138+
rdfs:comment """
139+
Build with Max gen~ by Zwabo
140+
141+
The TRIGGER function of MIRRORZ allows you to play backward the last chords/melody you just played, same for the LOOP function but looped.
142+
Pressing TRIGGER (momentary ON ) start reading audio backward from the last sampled position within the data/buffer, releasing TRIGGER stop reading audio.
143+
144+
Pressing LOOP (momentary ON ) reads audio backward from the last sampled position within the data/buffer, releasing "LOOP" loop the buffer segment just read.
145+
146+
Pressing TRIGGER stop the loop (if you keep TRIGGER pressed, it reads audio backward from the last sampled position within the data/buffer)
147+
""" ;
148+
149+
mod:brand "zwabo" ;
150+
mod:label "MIRRORZ" ;
151+
152+
doap:name "MIRRORZ" ;
153+
doap:license <http://spdx.org/licenses/ISC.html> ;
154+
155+
doap:maintainer [
156+
foaf:name "zwabo" ;
157+
foaf:homepage <https://github.com/moddevices/max-gen-plugins> ;
158+
] ;
159+
160+
lv2:microVersion 0 ;
161+
lv2:minorVersion 0 .
162+
163+
<urn:maxgen:zwabo:mirrorz#portGroup_dpf_stereo>
164+
a pg:Group , pg:StereoGroup ;
165+
lv2:name "Stereo" ;
166+
lv2:symbol "dpf_stereo" .

max-gen/DistrhoPluginMaxGen.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ void DistrhoPluginMaxGen::initParameter(const uint32_t index, Parameter& paramet
6868
parameter.ranges.def = info.defaultvalue;
6969
parameter.ranges.min = info.outputmin;
7070
parameter.ranges.max = info.outputmax;
71+
72+
parameter.symbol.toBasic();
7173
}
7274

7375
// --------------------------------------------------------------------------------------------------------------------

max-gen/DistrhoPluginMaxGen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class DistrhoPluginMaxGen : public Plugin
4040

4141
const char* getDescription() const noexcept override
4242
{
43-
return DISTRHO_PLUGIN_DESCRIPTION;
43+
return "Generated from Max gen~ and github.com/moddevices/max-gen-plugins";
4444
}
4545

4646
int64_t getUniqueId() const noexcept override

plugins/zwabo-mirrorz/DistrhoPluginInfo.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,9 @@
2626
#define DISTRHO_PLUGIN_NUM_INPUTS 2
2727
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
2828

29-
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "distortion", "stereo"
29+
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "delay", "stereo"
3030
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:DelayPlugin"
31-
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Distortion"
31+
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Delay"
3232

3333
#define DISTRHO_PLUGIN_UNIQUE_ID d_cconst('z', 'w', 'm', 'z')
3434
#define DISTRHO_PLUGIN_VERSION d_version(0, 0, 0)
35-
36-
// TODO have a way to specify properties
37-
// "loop" "trigger"
38-
// lv2:portProperty lv2:integer, lv2:toggled, mod:preferMomentaryOnByDefault ;
39-
// lv2:portProperty lv2:integer, lv2:toggled, mod:preferMomentaryOnByDefault ;
40-
41-
static constexpr const char DISTRHO_PLUGIN_DESCRIPTION[] = R"DESCRIPTION(
42-
Build with Max gen~ by Zwabo
43-
44-
The TRIGGER function of MIRRORZ allows you to play backward the last chords/melody you just played, same for the LOOP function but looped.
45-
Pressing TRIGGER (momentary ON ) start reading audio backward from the last sampled position within the data/buffer, releasing TRIGGER stop reading audio.
46-
47-
Pressing LOOP (momentary ON ) reads audio backward from the last sampled position within the data/buffer, releasing "LOOP" loop the buffer segment just read.
48-
49-
Pressing TRIGGER stop the loop (if you keep TRIGGER pressed, it reads audio backward from the last sampled position within the data/buffer)
50-
)DESCRIPTION";

0 commit comments

Comments
 (0)