LF Music Mapper

Real-time audio routing, mixing, and visualization for musicians

Python PyAudio NumPy MIT License
View on GitHub
LF Music Mapper demo showing the interface with 3D spectrogram, VU meters, and routing controls

Core Features

Multi-Device Routing

  • Connect up to 3 simultaneous input devices
  • Route to 4 stereo output tracks (8 channels)
  • Blend up to 3 sources per output channel
  • One-click preset routing patterns
  • USB hot-plug device detection

Per-Channel Mixing

  • Individual gain sliders for every channel
  • Stereo, mono, and multi-device presets
  • Soft limiting via tanh clipping
  • 8-channel VU meters with peak hold
  • Clip detection indicators

3D Spectrogram

  • Waterfall visualization with perspective projection
  • Real-time FFT frequency analysis
  • Full spectrum coverage
  • Color mapping from silence (blue) to peak (white)
  • Continuous scrolling display

Low-Latency Engine

  • Callback-based I/O via PortAudio
  • Ring buffer synchronization across devices
  • 32-bit float processing
  • Sample rates: 44.1kHz, 48kHz, 96kHz
  • Clock drift absorption between hardware

Technical Specifications

Specification Details
Input Devices Up to 3 simultaneous (Digitakt, turntables, synths, etc.)
Output Channels 4 stereo tracks (8 total channels)
Bit Depth 32-bit float
Sample Rates 44.1kHz, 48kHz, 96kHz
Clipping Protection Soft limiting (tanh)
I/O Architecture Callback-based via PortAudio
Buffer Strategy Ring buffer (deque maxlen=4)
Language Python 3.11+
Platform macOS, Windows, Linux
License MIT

Getting Started

Requirements

Python 3.11+ PyAudio NumPy SciPy PyQt5 or PySide2 Audio interface (stereo or multichannel)
# Clone and install
git clone https://github.com/LofiFren/LF_MusicMapper.git
cd LF_MusicMapper
pip install -r requirements.txt

# Run
python3.11 mapper.py

Select Input Devices

Choose your primary input (Input A auto-selects). Optionally add Input B and C for multi-device setups, or set to "-- Off --" to disable.

Configure Output

Select your multichannel output device, set the number of output channels, and choose your sample rate (44.1k, 48k, or 96k).

Set Up Routing

Configure track routing via the mix dialogs or use quick-set buttons for common patterns. Input channels are labeled A1/A2, B1/B2, C1/C2.

Start Routing

Click "Start Routing" to begin. Monitor your levels with the 8-channel VU meters and watch the real-time 3D spectrogram visualization.

Use Cases

Multi-Device Studio

Route your Digitakt, turntable, and synthesizer into separate output tracks simultaneously. Perfect for live jam sessions where you need flexible routing without an external mixer.

Live Performance

Use preset routing patterns to quickly switch between configurations during a set. The real-time VU meters and spectrogram help you monitor levels at a glance.

Recording Setup

Split inputs across multiple output channels for multitrack recording into your DAW. The 32-bit float processing and soft limiting keep your signals clean.