Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Midisoundboard

Easy cross-platform, CLI-Based tool written in python to convert midi key presses into a sound to play, like a soundboard!

(this is untested on MacOS and Linux so please put any issues in the issues tab on github!!)

This requires python to use! If you dont have python, then theres this wonderful tool called 'google' that can help you install it for your platform! IF YOURE ON MAC PLEASE INSTALL IT THE HOMEBREW WAY OR IT WONT WORK!

Install and setup

Clone or download this repo and run
python setup.py This command will install all python depencencies, and allow for CLI usage on macos/linux devices.

Getting started

To get started, you can set a port by running
.\midisoundboard listports
This command list all avaliable midi ports, if none are avaliable there are no midi devices connected to your computer.
Once you've selected a port, it will write it to port.txt which will then be used by the program.

To actually start using the soundboard you can use
.\midisoundboard start
which will show

Available inputs: ['Launchkey Mini MK3 MIDI 0', 'MIDIIN2 (Launchkey Mini MK3 MID 1']  (set port with .\midisoundboard listports)
AVALIABLE MODES:
1. Test Mode - See what notes are what, and look at a live feed of incoming notes/events
2. Write mode - Map notes to sound effects
3. Soundboard mode - Use mapped notes to play sound effects like a soundboard
MODE: Type your mode here!

Quick Mode Commands

To quickly access any of the 3 modes, you can use their designated commands as follows:
.\midisoundboard start test
.\midisoundboard start write
.\midisoundboard start soundboard

How to use each mode

Test Mode

Upon selecting test mode, your console will show this

selected port: Launchkey Mini MK3 MIDI 0 (use .\midisoundboard listports to set port)

Test mode selected. Press keys on your keyboard

Listening for MIDI on 'Launchkey Mini MK3 MIDI 0'... Press Ctrl+C to end program.

(Obviously, where it says Launchkey Mini MK3 MIDI 0 your selected port will be!)
In Test Mode, any keys on your MIDI device that are pressed/released will show in the terminal.
Test mode is designed for... well... testing! You can see which keys are what note value, and troubleshoot if your device isn't working.
An example of what this would look like in action is

selected port: Launchkey Mini MK3 MIDI 0 (use .\midisoundboard listports to set port)

Test mode selected. Press keys on your keyboard

Listening for MIDI on 'Launchkey Mini MK3 MIDI 0'... Press Ctrl+C to end program.
Note Pressed: 67
Note Released: 67
Note Pressed: 69
Note Released: 69
Note Pressed: 67
Note Released: 67
Note Pressed: 69
Note Released: 69

As noted in the logs, you can use Cntrl/Cmd+C to end the program (this works in every mode)

Write Mode

Write mode is used to add mappings (what tells the program which key plays what sound).
You press a key, and then type in the audio file name. All audio files must be inside of the SFX folder. For a quick and easy way to do this, see here.

If you press a key with a sound already mapped to it, it will ask if you would like to remove it.
Following is an example of what using this mode might look like:

Edit mode selected. Press a key on your keyboard and follow the instructions...
selected port: Launchkey Mini MK3 MIDI 0 (use .\midisoundboard listports to set port)


Listening for MIDI on 'Launchkey Mini MK3 MIDI 0'... Press Ctrl+C to end program.
Note Pressed: 48
note: type cancel below if you do not want to map anything to this note! (48)
name of sound to map key 48 to (include .mp3 at the end!): boom.mp3

added mapping 48→boom.mp3

Note Pressed: 40
A mapping for this key (40) already exists (boom.mp3)! Would you like to delete it? (y/n) y
removed mapping key40→boom.mp3

Note Pressed: 40
note: type cancel below if you do not want to map anything to this note! (40)
name of sound to map key 40 to (include .mp3 at the end!): fah.mp3

added mapping 40→fah.mp3


Edit mode ended

Soundboard mode

Soundboard Mode plays the sounds associated with each key. It's simple and straightforward. An example of using this mode may look like:

selected port: Launchkey Mini MK3 MIDI 0 (use .\midisoundboard listports to set port)

Soundboard mode selected. Press keys on your keyboard to play the sounds mapped to them. Press Ctrl+C to exit the program

Listening for MIDI on 'Launchkey Mini MK3 MIDI 0'... Press Ctrl+C to end program.
Note Pressed: 40 and played sound fah.mp3
Note Pressed: 41 and played sound fart.mp3
Note Pressed: 62 but no mapping has been added!
Note Pressed: 48 and played sound boom.mp3
Note Pressed: 59 but no mapping has been added!
Soundboard mode ended

Command list/explanation

To run all commands, make sure to prefix them with .\ and run them inside this folder!

midisoundboard start

Opens up a selection between the 3 modes (test, write, and soundboard)

midisoundboard start test

Quicker way of going to test mode

midisoundboard start write

Quicker way of going to write mode

midisoundboard start soundboard

Quicker way of going to soundboard mode

midisoundboard listports

Lists all avaliable MIDI ports, and prompts if you'd like to select one to be set in port.txt

midisoundboard quickcopy

Opens up a file select modal where you can choose .mp3 files to be copied over into the sfx folder.

midisoundboard opensfxfolder

Opens up the sfx folder, so you can easilly have access to and rename files.

midisoundboard resetconfig

Resets ALL configuration including

  • Set port
  • Saved mappings

and deletes all sound effects from the sfx folder. It will also restore mappings.json and port.txt if they have been deleted.

About

Easy cross-platform, CLI-Based tool written in python to convert midi key presses into a sound to play, like a soundboard!

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages