Skip to content
Use any linux event device for MIDI input
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
badumtss_machine
.gitignore
README.rst
badumtss-machine.py
badumtss.conf

README.rst

Ba-Dum-Tss Machine

Ba-Dum-Tss Machine is a little application that converts any Linux input device into a MIDI keyboard. It was created to see if toy percussion set from a Guitar Hero game can be used as electronic drums (it can, not this way).

It is also an excuse for me to play with MIDI APIs and Python asyncio framework.

The code and has been written for Linux only, as it relies on Linux-specific APIs. It should be possible to add support for other platforms, though.

It is a work in progress, with little prospect for sustained development. It might be fun, anyway.

Requirements

Input support:

Simple terminal input is implemented using the curses module from the standard Python library, but it should be considered a proof of concept only.

Output support:

  • JACK-Client Python package for output through a Jack MIDI port
  • FluidSynth for play audio directly from the synthesizer

Usage

Run the script from the source directory:

./badumtss-machine.py

The provided config file will be used to detect available input devices and output interfaces. All detected output devices will be used and the first output interface found (configuration file section order counts).

An intro sound will be played and then input events will be converted to MIDI events or synthesizer commands.

Configuration file may need adjusting, especially the FluidSynth arguments (audio driver and soundfont path).

Keymap Wizard

Mapping of input to MIDI events is described in keymap files referenced in the main configuration file input sections. Instead of editing the keymap files by hand one can use the included 'keymap wizard'.

To run the wizard, use the -w option:

./badumtss-machine.py -w

Note: the keymap file created must be referenced from the main configuration file to be used.

You can’t perform that action at this time.