mk2apc_4light is a simple mapper designed to facilitate providing feedback to an AKAI APC mini mk2 MIDI controller when used in conjunction with QLC+. It receives feedback messages from QLC+ and adapts them to control the button LEDs on the AKAI APC mini mk2 controller.
- Linux operating system for midi
os::unix::VirtualInput
- Rust programming language
- QLC+ lighting control software
-
Clone the repository:
git clone https://github.com/revilo196/mk2apc_4light.git
-
Navigate to the project directory:
cd mk2apc_4light
-
Configure the program:
-
Create a configuration file named
config.toml
in the project directory. Example content:midi_idx = 0
This configuration file specifies the MIDI index for the AKAI APC mini mk2. Adjust the
midi_idx
value according to the desired MIDI input device. You can check the console log to identify the correct index.
-
-
Build and run the program:
cargo run --release
The program will start and wait for MIDI messages from QLC+.
-
Configure QLC+ to send feedback messages:
- Open QLC+ and go to the "Input/Output Manager."
- Under the "MIDI Input" tab, select a MIDI plugin and enable it.
- Configure the plugin to send messages to the virtual MIDI input device created by
mk2apc_4light
(usually named "mk2apc_4light_port").
Now, when QLC+ sends feedback messages,
mk2apc_4light
will receive and adapt them to control the button LEDs on the AKAI APC mini mk2 controller.
- Receives MIDI feedback messages from QLC+ and adapts them for the AKAI APC mini mk2 controller.
- Maps different types of feedback to specific MIDI channels for controlling button LEDs.
- Converts Note Off messages to Note On messages for consistent handling.
- Provides console output for debugging purposes.
The apc_mk2_mapper
program provides a default mapping for the AKAI APC mini mk2 controller, which controls the button LEDs based on the feedback messages received from QLC+. The default mapping is as follows:
-
Outer Buttons: The outer buttons of the controller, which are notes beyond the range of 88, are mapped to Channel 1. This mapping ensures that these buttons remain on Channel 1.
-
Button Blinking: Buttons with a color value greater than 64 are mapped to Channel 9. The program subtracts 64 from the color value and maps it to Channel 9, making the button LEDs blink.
-
Normal Buttons: All other buttons are mapped to Channel 7 to make them as bright as possible.
The program handles Note Off messages by converting them to Note On messages with the same parameters. This conversion ensures consistent handling of button states.
These default mappings can be modified and customized according to specific requirements by editing the midi_callback
function in the source code.
You can customize the mappings and behavior of mk2apc_4light by modifying the code in the midi_callback function within the main.rs
file. The comments in the code provide explanations and guidance on how to modify the mappings for different MIDI messages.
This project is licensed under the MIT License.
- This program utilizes the midir and wmidi Rust libraries for MIDI input and output.
- The config Rust library is used for reading the configuration file.
here follows a color table of usable color for refernce PDF