Crates.io | makey-midi |
lib.rs | makey-midi |
version | 0.1.0 |
source | src |
created_at | 2023-11-26 04:57:59.639898 |
updated_at | 2023-11-26 04:57:59.639898 |
description | Use a Makey Makey to send midi commands. |
homepage | |
repository | https://github.com/Basicprogrammer10/makey-midi |
max_upload_size | |
id | 1048804 |
size | 35,842 |
Lets you use a Makey Makey to send midi commands! When run, this program will load the config file and either create a virtual midi output port or connect to another midi device. Pressing the keyboard keys defined in the config file will then send their respective note values.
You may want to consider remapping your Makey Makey so you can make use of the click button and so any arrow key inputs don't mess with any synth you have open.
After installing, there are two main ways to run the application.
To connect to an existing midi device or create a new virtual output port.
When creating an output port, no further configuration is needed and the device name will be 'makey-midi' (makey-midi create
).
When connecting to an existing port, you can specify the name of the port or leave it blank to automatically pick one (makey-midi connect [name]
).
The config parameter allows you to specify a path of the config file that contains the key map.
Omitting this will default to config.toml
in the current directory.
The debug flag will log what keys are pressed to the console (Ex: Key pressed: UpArrow
).
Below is the output of running makey-midi --help
.
Usage: makey-midi [OPTIONS] <COMMAND>
Commands:
connect Connects to a MIDI device to send events to
create Creates a new virtual MIDI output device. Only works on Linux.
list Lists all available MIDI devices. For use with the `connect` subcommand
help Print this message or the help of the given subcommand(s)
Options:
-c, --config <CONFIG> The location of the config file. Defaults to `config.toml` in the current directory
-d, --debug Logs each key event to stdout
-h, --help Print help
Here is an example command. This will load the default config file, enable debug output, and connect to the (pretty bad) built-in midi synth in windows.
makey-midi --debug connect "Microsoft GS Wavetable Synth"
Below is an example config.toml
file.
If no config file is found when running, makey-midi will fall back to the default config shown below.
The channel
defined what channel the midi events are sent on.
The keymap
is the main part where you map keyboard keys to midi notes.
A list of all possible key values is in the dropdown below, and a table of midi notes can be found here.
channel = 0
keymap = [
{ key = 'KeyW', note = 59 }, # B
{ key = 'UpArrow', note = 60 }, # C
{ key = 'DownArrow', note = 62 }, # D
{ key = 'LeftArrow', note = 64 }, # E
{ key = 'RightArrow', note = 65 }, # F
{ key = 'Space', note = 67 }, # G
{ key = 'KeyM', note = 69 }, # A
]