Skip to content

Commit

Permalink
Add modguis, some details on readme
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Dec 20, 2023
1 parent 3c9d414 commit e810f89
Show file tree
Hide file tree
Showing 40 changed files with 5,500 additions and 12 deletions.
18 changes: 7 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,23 @@ 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)))

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

all: plugins gen

plugins:
$(foreach p,$(PLUGINS),$(MAKE) all -f max-gen/Makefile.common.mk NAME=${p};)

gen: plugins pregen
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/;)

ifneq ($(CROSS_COMPILING),true)
pregen: plugins dpf/utils/lv2_ttl_generator
@$(CURDIR)/dpf/utils/generate-ttl.sh

dpf/utils/lv2_ttl_generator:
plugins: plugins/*/DistrhoPluginInfo.h plugins/*/gen_exported.*
$(foreach p,$(PLUGINS),$(MAKE) all -f max-gen/Makefile.common.mk NAME=${p};)

dpf/utils/lv2_ttl_generator$(APP_EXT):
$(MAKE) -C dpf/utils/lv2-ttl-generator
else
pregen:
endif

# ---------------------------------------------------------------------------------------------------------------------
# cleanup
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,36 @@ Stored in a single source code repository to make it easy for contributors and M

This source code repository has the following contents:

- **custom-ttl** - LV2 ttl files modified by hand, based on the generated DPF output, that adds a bit more information and meta-data to a plugin
- **dpf** - the plugin framework used to get CLAP, LV2, VST2, VST3 formats from a single implementation;
for MOD we only care about the LV2 format for now
- **max-gen** - custom code that integrates the gen~ exported code in DPF
- **plugins** - gen~ exported plugins, each including the exported code plus a custom `DistrhoPluginInfo.h` for plugin meta-data and a README supplied by the author
- **presets** - optional, LV2 presets to be included on the MOD plugin store builds of each plugin

### ADDING NEW PLUGINS

#### PLUGIN

This repository builds plugins as present in the `plugins` folder.
Each folder should follow the naming convention of "brandname-pluginame", with a single dash as separator and no spaces or special characters.

Inside each plugin folder there are 4 files:

- DistrhoPluginInfo.h
- gen_exported.cpp
- gen_exported.h
- README.md

The first file is meant for the plugin framework, it sets up branding, plugin categories and audio port count.
It is safe to copy this file to another plugin for a starting point, but then make sure to edit the fields as necessary.
The URI of the plugin **must** match the folder name in the style of "urn:maxgen:brandname:pluginname" (so keep the "urn:maxgen:" and change the rest)
Take special attention to make sure the number of audio inputs and outputs match the MAX gen~ patch side.

Then we have the MAX gen~ `gen_exported.cpp` and `gen_exported.h` exported C++ code, which we store directly as-is.

And finally a readme just to give some details on the plugin and any relevant information.

### BUILDING

For building you will need a POSIX-compliant compiler (GCC or Clang) plus GNU Make.
Expand Down
49 changes: 49 additions & 0 deletions custom-ttl/zwabo-cozmic/modgui/icon-cozmic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<div class="mod-pedal mod-pedal-lata{{{cns}}} mod-seven-knobs mod-boxy75 mod-{{color}} {{color}}">
<div mod-role="drag-handle" class="mod-drag-handle"></div>
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div>
<div class="mod-plugin-name"><h1>{{label}}</h1></div>
<div class="mod-light on" mod-role="bypass-light"></div>
<div class="mod-control-group clearfix">
{{#controls}}
<div class="mod-knob" title="{{comment}}">
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div>
<span class="mod-knob-title">{{name}}</span>
</div>
{{/controls}}
</div>
<div class="mod-footswitch" mod-role="bypass"></div>
<div class="mod-pedal-input">
{{#effect.ports.audio.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.audio.input}}
{{#effect.ports.midi.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.midi.input}}
{{#effect.ports.cv.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.cv.input}}
</div>
<div class="mod-pedal-output">
{{#effect.ports.audio.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.audio.output}}
{{#effect.ports.midi.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.midi.output}}
{{#effect.ports.cv.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.cv.output}}
</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 e810f89

Please sign in to comment.