Midi-mixer software written in Java for Korg midiKONTROLLER2. Targeting PipeWire
  • Java 97.4%
  • Nix 2.6%
Find a file
2026-01-30 17:34:38 +02:00
.github/workflows Update maven.yml 2025-04-29 18:09:00 +03:00
.idea Intial commit 2025-04-29 01:32:18 +03:00
src/main fix: add missing log4j2.xml 2026-01-03 18:32:37 +01:00
.envrc Added flake.nix and .envrc for nix-direnv support 2026-01-30 17:34:38 +02:00
.gitignore Added flake.nix and .envrc for nix-direnv support 2026-01-30 17:34:38 +02:00
dependency-reduced-pom.xml chore: migrate logging to log4j 2026-01-03 17:40:27 +01:00
flake.lock Added flake.nix and .envrc for nix-direnv support 2026-01-30 17:34:38 +02:00
flake.nix Added flake.nix and .envrc for nix-direnv support 2026-01-30 17:34:38 +02:00
LICENSE Create LICENSE 2025-04-29 17:18:16 +03:00
pom.xml chore: migrate logging to log4j 2026-01-03 17:40:27 +01:00
README.md feature: allow setting log level via console using the newly 2026-01-03 18:00:00 +01:00

Midi pw-mixer

A Midi mixer software to target Pipewire on linux and Korg nanoKONTROL2

Maven build

Getting started

Prequisites

  • Java 21 JDK or JRE
  • Pipewire
  • pw-dump
  • wpctl
  • User configuration file
  • Korg nanoKONTROL2

Installation

You can either grab the repo and compile the software with maven using

$ mvn package
$ cd target
$ java -jar midi-mixer-<VERSION>.jar # Run the program
$ java -jar midi-mixer-<VERSION>.jar & disown # To send the program to background

Or just grab the latest build from release, I will include a bash script for easier launching of the application, then just put them into your PATH and autostart on login if you want to

Usage

This software relies on the user configuration file. Please create a folder and a file in your /home/user/.config/ The folder and configuration files should be /home/user/.config/midi-mixer/config.ini

and heres a configuration file example

[fader 5]
application = spotify

[fader 6]
application = Zen

[fader 7]
application = Last Epoch.exe:Warframe.x64.exe

[knob 16]
application = Firefox

Follow the same syntax to add the rest of the faders, knobs and applications to map to the faders or knobs.

The faders IDs are from left to right 0 - 7 and the knob IDs are 16 - 23. To map spotify to the leftmost fader you would type

[fader 0]
application = spotify

To map Firefox to the leftmost knob you would type

[knob 16]
application = Firefox

You can map any pipewire node to any fader or knob, i.e. not only applications, but also for example output and devices:

[fader 6]
application = alsa_output.usb-Beyerdynamic_FOX_5.00-00.analog-stereo

[fader 22]
application = alsa_input.usb-Beyerdynamic_FOX_5.00-00.mono-fallback.3

You can force reconfiguration with cycle button from midiKONTROL2. This is required if you open up a application after starting midi-mixer

(This way we avoid any time based configuration parsing that would lead to constant CPU usage for the time calculations)

Logging and Debugging

You can set the log level using the -l (--log-level) parameter. Valid values are TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Defaults to INFO. DEBUG dumps raw MIDI messages received and Pipewire commands sent.

$ java -jar midi-mixer-<VERSION>.jar -l DEBUG # Run the program with DEBUG log level
$ java -jar midi-mixer-<VERSION>.jar -l OFF   # Run the program without logging

The -d (--debug) parameter is deprecated and is equivalent to -l DEBUG.

Changing cooldown time for Pipewire ID refreshes

If a Pipewire node is not found (because for example it was not active while pw-mixer was started), the program will try to refresh the Pipewire ID every 10000ms.

That cooldown time can be changed through the -c parameter:'

$ java -jar midi-mixer-<VERSION>.jar -c 1000 # Change the cooldown to 1000ms

Future and additions

This project was meant to target my specific setup, but if enough interest rises, I might add support for other configurations. If you want a feature added, be sure to make an issue or pull request with the added feature, or make a fork for yourself :)