Skip to main content

Module for Mixxx MIDI mapping automatic generation

Project description

This project contains some python tools to automate Mixxx MIDI mapping file management. With this tool you can write well-formed XML .midi.xml files from simple text configuration files, possibly mapping multiple channels and decks with one configuration line.

The script does also create a stub .js template file for MIDI scripts.

This script was used to create controller mappings for CDJ-2000, all input files in this project are in data directory. Only manual changes were to finish the generated .js stub functions.

Example command used to create this mapping was:

mixxx-create-midimap –midi-id=’PIONEER CDJ 2000’ –name=’Pioneer CDJ-2000’

–prefix=PioneerCDJ2000 –decks=2 –midi-channels=1,2 –script-template-directory=/tmp –author=”Ilkka Tuohela” –email=hile@iki.fi -D “Pioneer CDJ-2000 configuration for 2 decks on midi channels 1 and 2” data/cdj.controls

EXAMPLES

See files in data directory for examples of control and output configuration files.

CONFIGURATION FILES

The script expects two configuration files on command line: - first argument contains configurations for controls - second argument contains configurations for outputs

Invalid lines in files are ignored, so we can keep all fields in there even if not mapped.

Control files have following syntax: Group:Key <midicode> <hexvalue> {options} # comment

  • If Group is ‘Channel’, you can automatically create configuration for both decks with flags -d2 and -c1,2 (MIDI channels 1 and 2) to the script

  • Key must be valid command in mixxx, unless scripts are created, in which case it needs to be valid js function name

  • midicode is a variable defined in mixxxmap.midi_constants, see pydoc mixxxmap.midi_constants. This is combined with MIDI channel to create mixxx config ‘status’ key

  • hexvalue is the MIDI code value, 0x00 to 0x7f

  • options can contain any of the valid control option names,separtated by comma. You can list supported values with following command: python -c ‘from mixxxmap.midimap import CONTROL_OPTION_NAMES;print CONTROL_OPTION_NAMES’

  • comment is just a comment string, which is added to the .midi.xml file for the control if defined.

If the options contain ‘Script-Binding’, the script function name is parsed from the ‘key’ field. In this case, ‘key’ doesn’t need to be valid mixxx key.

Output files have following syntax: Group:Key <midicode> <hexvalue> <on> <off> Similar to controls, with additional required arguments for on and off values. If both on and off are not given, values 0.0 and 1.0 are used.

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page