Pianoterm is a powerful Linux CLI tool that transforms a USB MIDI keyboard into a command launcher. Assign specific shell commands to keyboard keys, allowing seamless control over media players and scripts directly from the piano. Ideal for musicians and tech enthusiasts looking to enhance their workflow.
pianoterm is a powerful Linux command-line interface tool that enables users to trigger shell commands directly from a USB MIDI keyboard. This innovative solution allows musicians and tech enthusiasts to seamlessly integrate their musical instrument with command execution, enhancing both creativity and productivity.
Key Features
- Run Shell Commands from Your Piano: Easily assign specific shell commands to individual keys on your MIDI keyboard, facilitating a unique way to control software and scripts while performing.
- Flexible Configuration: Customize key assignments through a configuration file located in
$HOME/.config/pianoterm/config, adapting the tool to suit personal workflows.
Usage Example
To start using pianoterm, run the following command in your terminal:
pianoterm <port>
Note: Ensure that ALSA is set up as the soundcard driver and utilize acconnect -i to identify the desired MIDI port.
Configuration Details
The configuration file allows for versatile setups:
# This is a comment
# trigger can be on_release or on_press
on_press
# syntax: port = command
# Use aseqdump -p <port> to find specific keycodes
21 = playerctl previous # first key on an 88-key keyboard
22 = playerctl play-pause
23 = playerctl next
# ...
108 = /home/me/my_script.sh
This example configuration demonstrates how to set up keys 21 through 23 to control common media playback functions, while key 108 can be linked to a custom script.
pianoterm also provides a straightforward build process:
git clone https://github.com/vustagc/pianoterm.git
cd pianoterm && make
Dependencies
To ensure optimal performance, the following dependencies are required:
- C compiler
- alsactl (version 1.2.15.2)
- make (optional)
Leverage the potential of your MIDI keyboard with pianoterm and explore new ways to enhance your musical and technical projects.
No comments yet.
Sign in to be the first to comment.