No description
  • Python 67.7%
  • Jinja 32.3%
Find a file
Daniel Díaz f78971c7e9 Rename main.py -> mixerconf.py
Signed-off-by: Daniel Díaz <yosoy@danieldiaz.org>
2026-05-18 11:44:21 -06:00
templates x32: Fix input channel 2026-05-04 12:53:04 -06:00
tests Rename main.py -> mixerconf.py 2026-05-18 11:44:21 -06:00
.gitignore Initial version 2026-05-02 18:39:30 -06:00
engine.py tests: Fix some and improve coverage 2026-05-03 10:32:04 -06:00
metadata.py Fix colors for X18, honor channel ordering 2026-05-02 18:53:35 -06:00
mixerconf.py Rename main.py -> mixerconf.py 2026-05-18 11:44:21 -06:00
models.py Initial version 2026-05-02 18:39:30 -06:00
presets.py Initial version 2026-05-02 18:39:30 -06:00
profiles.py Refactor Jinja snippets 2026-05-02 21:05:34 -06:00
README.md Rename main.py -> mixerconf.py 2026-05-18 11:44:21 -06:00

Digital Mixer Scene Configuration Generator

A Python-based utility to generate scene configuration files (.scn) for digital mixers (specifically Behringer X18/XR18 and X32). It maps human-readable stage layouts (JSON/YAML) to optimized mixer channel assignments and processing presets.

Features

  • Logical Grouping: Automatically assigns channels based on professional mixing standards:
    • Voices (Soprano, Mezzosoprano, Tenor, Baritone)
    • Plugged Instruments (Guitar, Piano, Bass)
    • Strings (Violin, Viola, Cello)
    • Percussion (Cajon, Bongos, Chimes)
  • Multi-Mixer Support: Profiles for Behringer X18 and X32.
  • EQ Presets: Automatic frequency adjustments based on instrument type and microphone model (e.g., SM58 optimization for voices).
  • Validation: Strict input validation using Pydantic.
  • Dual-Use: Use it as a standalone CLI tool or integrate it as a Python library.

Installation

pip install pydantic typer jinja2 pyyaml

Usage

Simplified Nested Format (Auto-mapped)

You can also use a simplified, grouped layout which automatically maps keys to their respective types:

- sopranos:
  - Alejandra
  - Saidee
- tenors:
  - Abraham
- instruments:
  - Guitar (Panano)
  - Piano (Leonor)

In this format, voices are mapped based on the key (sopranos, tenors, etc.), and instruments are inferred from the string prefix (e.g., "Guitar", "Piano").

- source_type: soprano
  player_name: Patsy
  microphone: SM58
- source_type: guitar (plug)
  player_name: Daniel
- source_type: cajon (whole)
  player_name: Chuy

Generate a scene:

python mixerconf.py create --input layout.yaml --mixer x18 --output sunday_service.scn

Validate a layout without rendering:

python mixerconf.py validate layout.yaml

Python Library

from models import ChannelInput, VoiceType, SceneMapping
from engine import assign_channels
from profiles import BehringerX18Profile

inputs = [
    ChannelInput(source_type=VoiceType.SOPRANO, player_name="Patsy")
]

assigned = assign_channels(inputs)
scene = SceneMapping(name="My Scene", inputs=assigned)

profile = BehringerX18Profile()
output_text = profile.render(scene)
print(output_text)

Development

Running Tests

The project maintains high test coverage (~99%) across core logic and CLI commands.

python3 -m pytest --cov=. tests/

Adding New Profiles

  1. Create a new Jinja2 template in templates/.
  2. Define a new MixerProfile subclass in profiles.py.
  3. Add icon/color mappings in metadata.py.