.. _command-line: Command-line reference ====================== Run ``submediant`` after installation, or use ``python -m submediant`` with the same arguments. All paths below are relative to the repository root. See :doc:`runtime-setup` for the local environment and FFmpeg requirements. Inspect the current parsers with:: submediant --help submediant audio --help submediant video --help submediant album --help Create destination directories before using the imported-sequence CLI; its WAV-only path writes directly to the supplied file. Keep outputs under ``build/``. The equipment export path creates parent directories. A failed command exits nonzero; handled rendering/input errors use exit status 2 and a ``submediant:`` message on stderr. Successful commands exit 0. The main audio and video commands print output paths; note-driven audio additionally prints its WAV digest, render identity, and sample count. .. _cli-audio: Render audio or a full-song movie --------------------------------- Usage:: submediant audio INPUT OUTPUT.wav [--studio STUDIO.json] submediant audio INPUT OUTPUT.wav --video OUTPUT.mp4 [OPTIONS] ``INPUT`` can be an imported ``submediant.wiggle-sequence`` or a note-driven ``submediant.performance`` JSON document. Output WAV uses mono 24 kHz signed 16-bit PCM. Imported performances enforce their approved WAV SHA-256 digest. ``--studio PATH`` Select a reusable studio descriptor. Imported sequences default to the Wiggle studio. Note-driven songs require an equipment descriptor unless a caller supplies an EquipmentStudio programmatically to the CLI entry point. ``--binding PATH`` Part-to-device binding JSON; required for a note-driven song and rejected for an imported sequence. ``--video PATH`` Also export the full performance as MP4 from the same audio execution. Requires Pillow plus FFmpeg with H.264/ALAC encoding. MP4 audio is lossless. ``--fps INTEGER`` Full-song video frame rate, default 24. This does not change audio rate. ``--skin NAME`` Per-render skin fallback: ``led-city``, ``atomcore``, ``guitar``, or ``diagnostic``. The latter two require equipment; device overrides remain. ``vacuum-tube-core`` is accepted as an alias for ``atomcore``. Requires ``--video``. ``--video-config PATH`` Imported full-song cabinet metadata, otherwise discovered as adjacent ``full-video.json``. Requires ``--video``. Equipment panels are declared by equipment definitions and reject this option. ``--performance-mode NAME`` Note-driven default interpretation: ``non-expressive``, ``normal``, ``awkward``, or ``goat``. Omitted uses the configured default (normally ``normal``). Phrase directions refine the mode; ``non-expressive`` disables automatic expression without removing explicitly authored controls. Imported sequences reject this option. Imported sequence example:: mkdir -p build gzip -dc tests/fixtures/black-canal.sequence.json.gz > build/black-canal.json submediant audio build/black-canal.json build/black-canal.wav submediant audio build/black-canal.json build/black-canal.wav --studio studios/wiggle.studio.json --video build/black-canal.mp4 --skin atomcore --fps 24 Note-driven equipment example:: mkdir -p build submediant audio examples/performance/xylophone-trio/song.json build/trio.wav --studio examples/performance/xylophone-trio/hardrubber.equipment.json --binding examples/performance/xylophone-trio/binding.json Add ``--video build/trio.mp4`` for the equipment movie, or ``--performance-mode goat`` to select family-relative interpretation. These examples perform the checked-in score; they do not infer notes from audio. .. _cli-video: Render an imported-sequence excerpt ----------------------------------- Usage:: submediant video INPUT OUTPUT.mp4 [OPTIONS] This separate command is for imported Wiggle excerpts up to 12 seconds. Use ``audio --video`` for a full-song movie or note-driven equipment; the excerpt command rejects note-driven songs. It still executes and verifies the imported audio before selecting the visual excerpt. ``--start SECONDS`` Excerpt start on the track clock, default 0. ``--duration SECONDS`` Excerpt duration, up to 12 seconds. When omitted, uses the available remainder capped at 12 seconds. ``--fps INTEGER`` Excerpt video frame rate, default 30. ``--studio PATH`` Optional imported-sequence studio descriptor. ``--skin NAME`` ``led-city`` or ``atomcore``; also accepts the historical ``vacuum-tube-core`` alias. Without an explicit skin, uses the selected studio default or LED City when no studio was selected. ``--view instruments|circuit`` Choose the instrument cabinet or graph circuit. Defaults to instruments, or circuit when ``--focus`` is supplied without a view. ``--focus BUNDLE ASSET`` Select a graph for the circuit view; default focus is ``room room``. ``--rig PATH`` Override the inline visual rig with a local JSON file. ``--cover PATH`` Local square artwork for the instrument view. Otherwise an adjacent ``cover.png`` is discovered when available. ``--title TEXT`` Override displayed title; quote text containing spaces. Instrument view otherwise derives a title from the document/path; circuit uses Submediant. ``--binding PATH`` Present in the shared parser, but not supported for imported excerpts. Note-driven data must use ``audio --video`` instead. Examples after decompressing the fixture above:: submediant video build/black-canal.json build/excerpt.mp4 --start 12 --duration 4 --skin led-city submediant video build/black-canal.json build/room-circuit.mp4 --view circuit --focus room room --duration 2 The excerpt flags ``--start``, ``--duration``, ``--rig``, ``--view``, ``--cover``, ``--title``, and ``--focus`` do not belong to ``audio``. Full-song ``--video``, ``--video-config``, and ``--performance-mode`` do not belong to ``video``. .. _cli-album: Verify an album or export sides ------------------------------- Usage:: submediant album INDEX.json [--side A|B] [--out-dir DIRECTORY] [--studio PATH] ``INDEX.json`` is a version-1 album index referencing its sequence files. All selected tracks' input pins, membership, frame counts, and studio compatibility are checked before any track audio is performed. ``--side A|B`` Select one side; omitted verifies both A and B. ``--out-dir DIRECTORY`` Write ``Side A.wav`` and/or ``Side B.wav`` including declared gaps. Omitted performs verification without writing side audio. ``--studio PATH`` Use one imported-sequence studio descriptor for the selected tracks. Each track receives an independent performance session. For an album index you supply, the command forms are:: submediant album path/to/album.json submediant album path/to/album.json --side A --out-dir build/album --studio studios/wiggle.studio.json The ``path/to/album.json`` placeholder is not a bundled full-album fixture. Generalized equipment-album routing is separate from this imported-sequence album command.