| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594 |
- #!/usr/bin/env python3
- """Generate Rigforge's four-source reference pedalboard bundle for mod-ui."""
- import argparse
- import hashlib
- import json
- import os
- import shutil
- import sys
- import tempfile
- from pathlib import Path, PurePosixPath
- import yaml
- from validate_desired_state import safe_relative_path, validate_state
- ROOT = Path(__file__).resolve().parents[1]
- def turtle_string(value):
- return json.dumps(str(value), ensure_ascii=False)
- def plugin_state_files(processor, plugin_path):
- instance = processor["instance"]
- plugin_uri = processor["plugin_uri"]
- state_dir = f"effect-{instance}"
- if processor.get("file_property"):
- effect_ttl = (
- "@prefix atom: <http://lv2plug.in/ns/ext/atom#> .\n"
- "@prefix lv2: <http://lv2plug.in/ns/lv2core#> .\n"
- "@prefix pset: <http://lv2plug.in/ns/ext/presets#> .\n"
- "@prefix state: <http://lv2plug.in/ns/ext/state#> .\n\n"
- "<>\n"
- " a pset:Preset ;\n"
- f" lv2:appliesTo <{plugin_uri}> ;\n"
- " state:state [\n"
- f" <{processor['file_property']}> {turtle_string(plugin_path)}^^atom:Path\n"
- " ] .\n"
- )
- else:
- effect_ttl = (
- "@prefix lv2: <http://lv2plug.in/ns/lv2core#> .\n"
- "@prefix pset: <http://lv2plug.in/ns/ext/presets#> .\n\n"
- "<>\n"
- " a pset:Preset ;\n"
- f" lv2:appliesTo <{plugin_uri}> .\n"
- )
- manifest_ttl = (
- "@prefix lv2: <http://lv2plug.in/ns/lv2core#> .\n"
- "@prefix pset: <http://lv2plug.in/ns/ext/presets#> .\n"
- "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n\n"
- "<effect.ttl>\n"
- f" lv2:appliesTo <{plugin_uri}> ;\n"
- " a pset:Preset ;\n"
- " rdfs:seeAlso <effect.ttl> .\n"
- )
- return {
- f"{state_dir}/effect.ttl": effect_ttl.encode("utf-8"),
- f"{state_dir}/manifest.ttl": manifest_ttl.encode("utf-8"),
- }
- def resolved_asset(repo_root, relative):
- if not safe_relative_path(relative):
- raise ValueError(f"unsafe pedalboard asset path: {relative!r}")
- path = (repo_root / Path(*PurePosixPath(relative).parts)).resolve()
- if not path.is_relative_to(repo_root.resolve()) or not path.is_file():
- raise FileNotFoundError(f"pedalboard asset is missing or outside repository: {path}")
- return path
- def generate_bundle_files(state, repo_root=ROOT, asset_root=None, nam_model_path=None):
- errors = validate_state(state)
- if errors:
- raise ValueError("invalid desired state: " + "; ".join(errors))
- repo_root = Path(repo_root).resolve()
- asset_root = Path(asset_root or repo_root / "artifacts" / "mod-ui" / "arm64" / "current" / "app" / "default.pedalboard")
- routing = state["routing"]["mod_host_chains"]["guitar"]
- nam, ir = routing["processors"]
- voice_chain = state["routing"]["mod_host_chains"]["voice"]
- voice_processors = voice_chain["processors"]
- nam_source_path = resolved_asset(repo_root, nam["asset_path"])
- nam_path = Path(nam_model_path).resolve() if nam_model_path else nam_source_path
- if not nam_path.is_file():
- raise FileNotFoundError(f"NAM model file is missing: {nam_path}")
- ir_path = resolved_asset(repo_root, ir["asset_path"])
- output_level = nam["parameters"]["output_level"]
- plugin_files = {}
- for processor in voice_processors:
- plugin_files.update(plugin_state_files(processor, ""))
- nam_instance = nam["mod_ui_instance"].removeprefix("/graph/")
- ir_instance = ir["mod_ui_instance"].removeprefix("/graph/")
- nam_model_uri = nam["file_property"]
- ir_file_uri = ir["file_property"]
- source_labels = {
- "guitar": "Guitare",
- "bass": "Basse",
- "voice": "Micro",
- "synth": "Synthé",
- }
- source_ids = {source["id"] for source in state["sources"]}
- passthrough_channels = [
- (index, source_labels[source_id])
- for index, source_id in enumerate(("guitar", "bass", "voice", "synth"), start=1)
- if source_id not in ("guitar", "voice") and source_id in source_ids
- ]
- additional_ports_ttl = "\n\n".join(
- f'''<capture_{index}>
- lv2:index {9 + (index - 2) * 2} ;
- lv2:name "{label} - Entrée mod-ui" ;
- lv2:portProperty lv2:connectionOptional ;
- lv2:symbol "capture_{index}" ;
- a lv2:AudioPort, lv2:InputPort .
- <playback_{index}>
- lv2:index {10 + (index - 2) * 2} ;
- lv2:name "{label} - Sortie mod-ui" ;
- lv2:portProperty lv2:connectionOptional ;
- lv2:symbol "playback_{index}" ;
- a lv2:AudioPort, lv2:OutputPort .'''
- for index, label in passthrough_channels
- )
- additional_arcs_list = ", ".join(
- [f"_:b{index + 2}" for index, _label in passthrough_channels]
- + [f"_:voice{index}" for index in range(1, len(voice_processors))]
- + ["_:voice0", "_:voice_out"]
- )
- additional_arcs_ttl = "\n\n".join(
- f"_:b{index + 2} ingen:tail <capture_{index}> ;\n"
- f" ingen:head <playback_{index}> ."
- for index, _label in passthrough_channels
- )
- additional_ports_list = ",\n ".join(
- f"<{symbol}_{index}>"
- for index, _label in passthrough_channels
- for symbol in ("capture", "playback")
- )
- voice_processors_ttl = []
- voice_processor_blocks = []
- voice_processor_arcs = []
- for index, processor in enumerate(voice_processors):
- instance = processor["mod_ui_instance"].removeprefix("/graph/")
- plugin_uri = processor["plugin_uri"]
- if processor["id"] == "voice-reverb":
- plugin_uri = "urn:dragonfly:room"
- input_symbol = "input_l" if processor["id"] == "voice-reverb" else "in"
- output_symbol = "output_l" if processor["id"] == "voice-reverb" else "out"
- label = {
- "voice-high-pass": "Coupe-bas",
- "voice-compressor": "Compresseur voix",
- "voice-de-esser": "De-esser",
- "voice-reverb": "Réverbération voix",
- }[processor["id"]]
- x_position = 160.0 + index * 260.0
- port_symbols = {
- "voice-high-pass": ("in", "out", {"mode": "mode", "filter_type": "ft", "filter_mode": "fm", "slope": "s", "frequency_hz": "f", "quality": "q"}),
- "voice-compressor": ("in", "out", {"compression_mode": "cm", "ratio": "cr", "attack_time_ms": "at", "release_time_ms": "rt"}),
- "voice-de-esser": ("in", "out", {}),
- "voice-reverb": ("input_l", "output_l", {"dry_level": "dry_level", "early_level": "early_level", "late_level": "late_level", "size": "size", "predelay_ms": "predelay", "decay_seconds": "decay", "in_low_cut_hz": "in_low_cut", "in_high_cut_hz": "in_high_cut"}),
- }
- input_symbol, output_symbol, control_symbols = port_symbols[processor["id"]]
- port_declarations = [
- f"<{instance}/{input_symbol}>",
- f"<{instance}/{output_symbol}>",
- f"<{instance}/:bypass>",
- ]
- if processor["id"] == "voice-reverb":
- port_declarations.extend(
- (f"<{instance}/input_r>", f"<{instance}/output_r>")
- )
- control_declarations = []
- for parameter in processor.get("parameters", {}):
- if processor["id"] == "voice-de-esser":
- continue
- symbol = control_symbols[parameter]
- port_declarations.append(f"<{instance}/{symbol}>")
- value = processor["parameters"][parameter]
- if processor["id"] == "voice-high-pass":
- value = {
- "mode": 0,
- "filter_type": 1,
- "filter_mode": 2,
- "slope": 1,
- "frequency_hz": 90.0,
- "quality": 0.707,
- }[parameter]
- elif processor["id"] == "voice-compressor":
- value = {
- "compression_mode": 0,
- "ratio": 3.0,
- "attack_time_ms": 10.0,
- "release_time_ms": 120.0,
- }[parameter]
- rendered_value = json.dumps(value) if isinstance(value, str) else str(value)
- control_declarations.append(
- f"<{instance}/{symbol}>\n"
- f" ingen:value {rendered_value} ;\n"
- " a lv2:ControlPort, lv2:InputPort ."
- )
- if processor["id"] == "voice-de-esser":
- values = {
- "Ratio": 2.0,
- "Threshold": 0.1,
- "Attack": 5.0,
- "Release": 80.0,
- "Split": 6000.0,
- }
- for symbol, value in values.items():
- port_declarations.append(f"<{instance}/{symbol}>")
- control_declarations.append(
- f"<{instance}/{symbol}>\n"
- f" ingen:value {value} ;\n"
- " a lv2:ControlPort, lv2:InputPort ."
- )
- extra_audio_ports = ""
- if processor["id"] == "voice-reverb":
- extra_audio_ports = (
- f"\n\n<{instance}/input_r>\n"
- " a lv2:AudioPort, lv2:InputPort .\n"
- f"\n<{instance}/output_r>\n"
- " a lv2:AudioPort, lv2:OutputPort ."
- )
- voice_processors_ttl.append(
- f"""<{instance}>
- ingen:canvasX {x_position} ;
- ingen:canvasY 650.0 ;
- ingen:enabled true ;
- ingen:polyphonic false ;
- pedal:instanceLabel "{label}" ;
- pedal:instanceNumber {processor["instance"]} ;
- pedal:performanceVisible true ;
- pedal:performanceIndex {index + 2} ;
- lv2:prototype <{plugin_uri}> ;
- lv2:port {", ".join(port_declarations)} ;
- a ingen:Block .
- <{instance}/{input_symbol}>
- a lv2:AudioPort, lv2:InputPort .
- <{instance}/{output_symbol}>
- a lv2:AudioPort, lv2:OutputPort .
- <{instance}/:bypass>
- ingen:value 0 ;
- a lv2:ControlPort, lv2:InputPort ."""
- )
- voice_processors_ttl[-1] += "\n\n" + "\n\n".join(control_declarations)
- voice_processors_ttl[-1] += extra_audio_ports
- if index > 0:
- previous = voice_processors[index - 1]
- previous_instance = previous["mod_ui_instance"].removeprefix("/graph/")
- previous_output = (
- "output_l" if previous["id"] == "voice-reverb" else "out"
- )
- voice_processor_arcs.append(
- f"_:voice{index} ingen:tail <{previous_instance}/{previous_output}> ;\n"
- f" ingen:head <{instance}/{input_symbol}> ."
- )
- voice_chain_ttl = "\n\n".join(voice_processors_ttl)
- voice_chain_arcs_ttl = "\n\n".join(voice_processor_arcs)
- first_voice = voice_processors[0]
- last_voice = voice_processors[-1]
- first_voice_instance = first_voice["mod_ui_instance"].removeprefix("/graph/")
- last_voice_instance = last_voice["mod_ui_instance"].removeprefix("/graph/")
- first_voice_input = "in"
- last_voice_output = "output_l" if last_voice["id"] == "voice-reverb" else "out"
- ttl = f"""\
- @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
- @prefix doap: <http://usefulinc.com/ns/doap#> .
- @prefix ingen: <http://drobilla.net/ns/ingen#> .
- @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
- @prefix midi: <http://lv2plug.in/ns/ext/midi#> .
- @prefix mod: <http://moddevices.com/ns/mod#> .
- @prefix patch: <http://lv2plug.in/ns/ext/patch#> .
- @prefix pedal: <http://moddevices.com/ns/modpedal#> .
- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
- @prefix state: <http://lv2plug.in/ns/ext/state#> .
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
- <capture_1>
- lv2:index 5 ;
- lv2:name "Guitare - Entrée mod-ui" ;
- lv2:portProperty lv2:connectionOptional ;
- lv2:symbol "capture_1" ;
- a lv2:AudioPort, lv2:InputPort .
- <playback_1>
- lv2:index 6 ;
- lv2:name "Guitare - Sortie mod-ui" ;
- lv2:portProperty lv2:connectionOptional ;
- lv2:symbol "playback_1" ;
- a lv2:AudioPort, lv2:OutputPort .
- {additional_ports_ttl}
- {voice_chain_ttl}
- <:bpb>
- ingen:value 4.0 ;
- lv2:index 0 ;
- a lv2:ControlPort, lv2:InputPort .
- <:bpm>
- ingen:value 120.0 ;
- lv2:index 1 ;
- a lv2:ControlPort, lv2:InputPort .
- <:rolling>
- ingen:value 0 ;
- lv2:index 2 ;
- a lv2:ControlPort, lv2:InputPort .
- <control_in>
- atom:bufferType atom:Sequence ;
- atom:supports midi:MidiEvent ;
- lv2:index 3 ;
- lv2:name "Control In" ;
- lv2:portProperty lv2:connectionOptional ;
- lv2:symbol "control_in" ;
- <http://lv2plug.in/ns/ext/resize-port#minimumSize> 4096 ;
- a atom:AtomPort, lv2:InputPort .
- <control_out>
- atom:bufferType atom:Sequence ;
- atom:supports midi:MidiEvent ;
- lv2:index 4 ;
- lv2:name "Control Out" ;
- lv2:portProperty lv2:connectionOptional ;
- lv2:symbol "control_out" ;
- <http://lv2plug.in/ns/ext/resize-port#minimumSize> 4096 ;
- a atom:AtomPort, lv2:OutputPort .
- <midi_separated_mode>
- ingen:value 0 ;
- lv2:index 7 ;
- a atom:AtomPort, lv2:InputPort .
- <midi_loopback>
- ingen:value 0 ;
- lv2:index 8 ;
- a atom:AtomPort, lv2:InputPort .
- <{nam_instance}>
- ingen:canvasX 160.0 ;
- ingen:canvasY 280.0 ;
- ingen:enabled true ;
- ingen:polyphonic false ;
- lv2:microVersion 0 ;
- lv2:minorVersion 0 ;
- mod:builderVersion 0 ;
- mod:releaseNumber 0 ;
- pedal:instanceLabel "NAM" ;
- pedal:instanceNumber {nam["instance"]} ;
- pedal:performanceVisible true ;
- pedal:performanceIndex 0 ;
- lv2:prototype <{nam["plugin_uri"]}> ;
- lv2:port <{nam_instance}/control>,
- <{nam_instance}/notify>,
- <{nam_instance}/input>,
- <{nam_instance}/output>,
- <{nam_instance}/input_level>,
- <{nam_instance}/output_level>,
- <{nam_instance}/quality_scale>,
- <{nam_instance}/:bypass> ;
- state:state [ <{nam_model_uri}> {turtle_string(str(nam_path))}^^atom:Path ] ;
- a ingen:Block .
- <{nam_instance}/control>
- atom:bufferType atom:Sequence ;
- atom:supports patch:Message ;
- lv2:designation lv2:control ;
- lv2:index 0 ;
- lv2:symbol "control" ;
- a atom:AtomPort, lv2:InputPort .
- <{nam_instance}/notify>
- atom:bufferType atom:Sequence ;
- atom:supports patch:Message ;
- lv2:designation lv2:control ;
- lv2:index 1 ;
- lv2:symbol "notify" ;
- a atom:AtomPort, lv2:OutputPort .
- <{nam_instance}/input>
- a lv2:AudioPort, lv2:InputPort .
- <{nam_instance}/output>
- a lv2:AudioPort, lv2:OutputPort .
- <{nam_instance}/input_level>
- ingen:value 0.0 ;
- a lv2:ControlPort, lv2:InputPort .
- <{nam_instance}/output_level>
- ingen:value {output_level} ;
- a lv2:ControlPort, lv2:InputPort .
- <{nam_instance}/quality_scale>
- ingen:value 1.0 ;
- a lv2:ControlPort, lv2:InputPort .
- <{nam_instance}/:bypass>
- ingen:value 0 ;
- a lv2:ControlPort, lv2:InputPort .
- <{ir_instance}>
- ingen:canvasX 620.0 ;
- ingen:canvasY 280.0 ;
- ingen:enabled true ;
- ingen:polyphonic false ;
- lv2:microVersion 0 ;
- lv2:minorVersion 0 ;
- mod:builderVersion 0 ;
- mod:releaseNumber 0 ;
- pedal:instanceLabel "Cabinet IR" ;
- pedal:instanceNumber {ir["instance"]} ;
- pedal:performanceVisible true ;
- pedal:performanceIndex 1 ;
- lv2:prototype <{ir["plugin_uri"]}> ;
- lv2:port <{ir_instance}/control>,
- <{ir_instance}/notify>,
- <{ir_instance}/in>,
- <{ir_instance}/out>,
- <{ir_instance}/:bypass> ;
- state:state [ <{ir_file_uri}> {turtle_string(str(ir_path))}^^atom:Path ] ;
- a ingen:Block .
- <{ir_instance}/control>
- atom:bufferType atom:Sequence ;
- atom:supports patch:Message ;
- lv2:designation lv2:control ;
- a atom:AtomPort, lv2:InputPort .
- <{ir_instance}/notify>
- atom:bufferType atom:Sequence ;
- atom:supports patch:Message ;
- lv2:designation lv2:control ;
- a atom:AtomPort, lv2:OutputPort .
- <{ir_instance}/in>
- a lv2:AudioPort, lv2:InputPort .
- <{ir_instance}/out>
- a lv2:AudioPort, lv2:OutputPort .
- <{ir_instance}/:bypass>
- ingen:value 0 ;
- a lv2:ControlPort, lv2:InputPort .
- <>
- doap:name "Rigforge - Guitare NAM/IR, Basse, Micro, Synthé" ;
- pedal:unitName "Rigforge" ;
- pedal:unitModel "Generic" ;
- pedal:width 1200 ;
- pedal:height 700 ;
- pedal:addressings <addressings.json> ;
- pedal:screenshot <screenshot.png> ;
- pedal:thumbnail <thumbnail.png> ;
- pedal:formatVersion 2 ;
- pedal:version 1 ;
- ingen:polyphony 1 ;
- ingen:arc _:b1, _:b2, _:b3, {additional_arcs_list} ;
- ingen:block <{nam_instance}>, <{ir_instance}>, {", ".join(f"<{processor['mod_ui_instance'].removeprefix('/graph/')}>" for processor in voice_processors)} ;
- lv2:port <:bpb>, <:bpm>, <:rolling>,
- <control_in>, <control_out>,
- <capture_1>, <playback_1>,
- {additional_ports_list},
- <midi_separated_mode>, <midi_loopback> ;
- lv2:extensionData <http://lv2plug.in/ns/ext/state#interface> ;
- a lv2:Plugin, ingen:Graph, pedal:Pedalboard .
- _:b1 ingen:tail <capture_1> ;
- ingen:head <{nam_instance}/input> .
- _:b2 ingen:tail <{nam_instance}/output> ;
- ingen:head <{ir_instance}/in> .
- _:b3 ingen:tail <{ir_instance}/out> ;
- ingen:head <playback_1> .
- _:voice0 ingen:tail <capture_3> ;
- ingen:head <{first_voice_instance}/{first_voice_input}> .
- {voice_chain_arcs_ttl}
- _:voice_out ingen:tail <{last_voice_instance}/{last_voice_output}> ;
- ingen:head <playback_3> .
- {additional_arcs_ttl}
- """
- files = {
- "manifest.ttl": (
- "@prefix ingen: <http://drobilla.net/ns/ingen#> .\n"
- "@prefix lv2: <http://lv2plug.in/ns/lv2core#> .\n"
- "@prefix pedal: <http://moddevices.com/ns/modpedal#> .\n"
- "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n\n"
- "<rigforge-guitar.ttl>\n"
- " lv2:prototype ingen:GraphPrototype ;\n"
- " a lv2:Plugin, ingen:Graph, pedal:Pedalboard ;\n"
- " rdfs:seeAlso <rigforge-guitar.ttl> .\n"
- ).encode("utf-8"),
- "rigforge-guitar.ttl": ttl.encode("utf-8"),
- "addressings.json": b"{}\n",
- "snapshots.json": b'{"current":0,"snapshots":[]}\n',
- }
- files.update(plugin_state_files(nam, nam_path))
- files.update(plugin_state_files(ir, ir_path))
- files.update(plugin_files)
- for image_name in ("screenshot.png", "thumbnail.png"):
- image = asset_root / image_name
- if not image.is_file():
- raise FileNotFoundError(f"mod-ui default board image is missing: {image}")
- files[image_name] = image.read_bytes()
- return files
- def write_bundle(output, files, overwrite=False):
- output = Path(output)
- if output.exists():
- if output.is_symlink() or not output.is_dir():
- raise RuntimeError(f"pedalboard output is not a regular directory: {output}")
- existing = {}
- for path in output.rglob("*"):
- if path.is_symlink():
- raise RuntimeError(f"refusing symlink in pedalboard output: {path}")
- if path.is_file():
- existing[path.relative_to(output).as_posix()] = path.read_bytes()
- if existing == files:
- return
- if not overwrite:
- raise RuntimeError(f"pedalboard output already exists and differs: {output}")
- output.parent.mkdir(parents=True, exist_ok=True)
- temporary = Path(tempfile.mkdtemp(prefix=f".{output.name}.", dir=output.parent))
- try:
- for relative, content in files.items():
- path = temporary / relative
- path.parent.mkdir(parents=True, exist_ok=True)
- path.write_bytes(content)
- if output.exists():
- backup = output.with_name(output.name + ".rigforge-backup")
- if backup.exists():
- raise RuntimeError(f"pedalboard recovery path already exists: {backup}")
- os.replace(output, backup)
- try:
- os.replace(temporary, output)
- except OSError:
- os.replace(backup, output)
- raise
- else:
- os.replace(temporary, output)
- finally:
- if temporary.exists():
- shutil.rmtree(temporary)
- def main(argv=None):
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument("--state", type=Path, default=ROOT / "config" / "desired-state.yaml")
- parser.add_argument("--repo-root", type=Path, default=ROOT)
- parser.add_argument("--output", type=Path)
- parser.add_argument("--force", action="store_true", help="replace an existing differing generated bundle")
- args = parser.parse_args(argv)
- try:
- state = yaml.safe_load(args.state.read_text(encoding="utf-8"))
- files = generate_bundle_files(state, args.repo_root)
- output = args.output
- if output is None:
- digest = hashlib.sha256()
- for name, content in sorted(files.items()):
- digest.update(name.encode("utf-8") + b"\0" + content + b"\0")
- reference_directory = state["deployment"]["mod_ui"]["reference_directory"]
- output = (
- Path.home()
- / reference_directory
- / f"rigforge-guitar-{digest.hexdigest()[:16]}.pedalboard"
- )
- write_bundle(output, files, overwrite=args.force)
- except (OSError, ValueError, RuntimeError, KeyError, TypeError, yaml.YAMLError) as error:
- print(f"ERROR: {error}", file=sys.stderr)
- return 1
- print(f"Generated mod-ui pedalboard: {output}")
- return 0
- if __name__ == "__main__":
- raise SystemExit(main())
|