Table of Contents
- MIDI concepts
- MIDI in Buttons tab
- MIDI in Analogs tab
- MIDI Algorithms
- FAQ
- Testing things out
- Velocity sensitivity
- Nostalgia key binding
- Edit dialog won't show any input
- Velocity not high enough
- Nothing shows up when I try to bind in Analogs tab
- My device doesn't show up at all
- My pads have multiple trigger zones, how do I bind them?
- OK then why the hell does spicecfg have separate options for Hi-Hat, Hi-Hat Closed, and Hi-Hat Half-Open?
- Your code sucks, can I use third party tools like Midikey2key or CoyoteMIDI?
- Can I use software MIDI emulation or MIDI-over-network / BlueTooth?
- If my controller supports MIDI and HID, which should I use?
- I went through this page but my MIDI device still doesn't work properly - how do I troubleshoot and report a bug?
MIDI concepts
MIDI channels
MIDI is (typically) transmitted over a single channel. There are channels 1 through 16.
When you plug in a MIDI instrument to your PC (through an adapter or over USB), typically, it will use Channel 1. For drum kits, it's very common for them to use Channel 10. However, it can vary; check the manual of your MIDI equipment.
Notes, CC, and Pitch Bend
There are three types of controls that can be used as input:
Notes
Notes 0-127 correspond to a musical note.
Spice will also display the equivalent note names as well - Note #0 is C-1, note #1 is C#-1, note #53 is F3, and so on.
Things like piano keys and drum pads would typically have a corresponding note number. If you are unsure, consult the manual of your instrument.
Each note has an on/off state (digital button state) and associated note velocity. Velocity will vary but only if your instrument is velocity-sensitive.
CC
CC stands for Continuous Control. These are knobs, pedals, toggle buttons, sliders, etc.
- CC #0-31 are double precision controls (e.g., hi-hat pedals on a drum, using piezo sensors, is typically CC#4)
- CC #64-69 On/Off controls (e.g., piano sustain pedals are typically #64)
- CC #70-95, 102-119 are single precision controls (depth controls - pretty rare except in high end MIDI equipment)
Pitch Bend
Pitch bend controllers are also supported. These can be seen on some MIDI keyboards. These are analog controllers.
MIDI in Buttons tab
Notes, CC, and pitch bend can be mapped as a button.
To bind a button,
- Open
Buttonstab - Click on
Bindbutton (and not theNaivebutton!) - Press / tap / adjust the desired MIDI control
Hopefully, the control was bound automatically using the automatic "learning" detection above. If that wasn't successful:
- Click on
Editbutton - Change
Device Identifierto your MIDI instrument - Pick one of
Midi Note,MIDI Continuous Control (CC), orPitch Bend - IMPORTANT: double and triple check which
MIDI Channelis being used. - Manually adjust the note# or cc# to match what you expect. If you are unsure which number, consult the manual of your instrument.
Note Velocity Threshold
For notes, you can set the velocity threshold. By default, if the value is set to 0, any amount of velocity will trigger the button. If the value is higher than that, soft presses will be completely ignored by spice, and only the harder presses will register.
Note that this is a per-note setting; e.g., if you have it set on a certain piano key, it will apply to all other bindings for that piano key. Typically, this is not really a concern, except in really complex binding schemes.
CC Threshold
For CC, you can set the threshold.
By default, if the CC value is 0 then the note is OFF, and when it's greater than 0, it will be ON. For most people this is way too sensitive to use properly in a game (e.g., for pedals). Therefore, instead, increase the threshold - the suggested value is the half way point. That way, you need to press the pedal at least half way down for the button to register.
MIDI in Analogs tab
CC and pitch bend up/down are supported for analog binding.
- Open
Analogstab. - Click
Bind. - IMPORTANT: use the desired control; e.g., twist knobs, press hard on pedals, use the pitch bend dial, etc, right now.
- Expand the
Devicedrop down and select your MIDI device. - Expand the
Controldrop down and pick your CC / pitch bend control. - Except in very rare circumstances, you should leave
Deadzonein 0. - Check
Invert Axisas needed.
MIDI Algorithms
There are three algorithms:
- v2 - timestamp every input and provide the most recent input to the game when polled
- v2_drum - same as v2, but holds are disabled
- legacy - same as original spicetools logic
By default, spice will use v2 for most games (guitarfreaks included). For drummania and FutureTomTom, v2_drum will be used. If you want to override this, change the MIDI Note Input Algorithm (-midialgo) in Advanced tab.
MIDI sustain duration
v2 and v2_drum algorithms will hold every MIDI note for 20ms. This is intended to be just long enough for the slowest-polling game (looking at you, drummania which polls at 60Hz) to pick up every input without dropping. You should not need to do this, but it is possible to change this duration with MIDI Note Min. Sustain (-midisustain) option.
If this value is smaller than the poll period (for 60Hz poll rate game, if this is set to 16ms or less) then some input may straight up ignored by the game engine, because your input went ON and then OFF between the polls. If this value is too high, then multiple presses may coalesce (merge) into one long input, which means the game will pick up your first press but treat the rest as a hold.
For reference, 1/16th notes at 200bpm are 75ms apart.
FAQ
Testing things out
If you want to test your MIDI device, bind them in spicecfg, and then go into the game's test menu and perform an I/O test. spicecfg doesn't poll your instrument the same way a real game engine does, so you'll see different behavior when doing things like fast rolls, velocity sensitive presses, etc.
Velocity sensitivity
Depending on how hard you press on a piano key, or how hard you strike a drum pad - velocity information can be sent over MIDI protocol.
There are some important things to note:
- Some low end instruments do not support velocity sensitivity at all. What value they send for velocity is up to the device.
- Nostalgia does use velocity data, and used for gameplay purposes (yellow and blue zones in recital mode). You can check the velocity in test menu. Read below for binding.
- drummania does not use velocity data for gameplay, only digital on/off input. Test menu shows velocity data for calibration though.
- FutureTomTom shows velocity data in test menu, but not used in gameplay (maybe loudness?)
Nostalgia key binding
Nostalgia expects each key to have velocity value associated when pressed, ranging from 0 to 14.
If you have velocity-sensitive keys, bind them to Key 1 Key 2 etc; spice will transmit velocity information when the game polls for input. With this, you need to press lightly in blue zones and harder in blue zones when playing recital mode to get Elegant judge.
If you don't have velocity-sensitive keys, bind all of them to Key 1 Medium, Key 2 Medium, etc. This causes spice's I/O emulation to ignore the actual velocity and instead insert "medium" presses all the time, which satisfies both blue and yellow zones in recital mode.
Edit dialog won't show any input
Make sure the correct device and MIDI channel are selected - especially the channel number which can be reset.
Double check the velocity threshold / threshold as well; the safe value to test is zero. The velocity value received is entirely dependent on your device.
Velocity not high enough
For example - no matter how hard you press, you can't get Elegant judge in the yellow zones in Nostalgia
Spice currently doesn't have any way to adjust the velocity curve.... so you'll need to adjust the velocity setting in your equipment.
Nothing shows up when I try to bind in Analogs tab
After selecting the device, make sure you use your control (press on pedal, twist a knob, etc). After some data is received by spice, the controls will show up in the drop down.
My device doesn't show up at all
It's possible for another application to open exclusive access to your MIDI device. Close other applications before opening spicecfg/spice/spice64.
My pads have multiple trigger zones, how do I bind them?
You can map multiple pad zones to a single button. Just press the < > buttons you see at the bottom left to move to a different page, and map each zone on a different page.
This would apply to: any drum brains that register Tom Rim separately from Tom, any Hi-Hat variations (Hi-Hat Open, Hi-Hat Half-open, Hi-Hat Closed, etc).
OK then why the hell does spicecfg have separate options for Hi-Hat, Hi-Hat Closed, and Hi-Hat Half-Open?
Because these were added in 2018, and then ability to map multiple bindings was added later.
Now the Closed and Half-Open variants can't be removed because people are using it and we don't want to break them. If you're a new user, you can just ignore them.
Your code sucks, can I use third party tools like Midikey2key or CoyoteMIDI?
So far it seems that both of these tools cannot properly inject keystrokes into Windows raw input API, which spice uses.
If you do find a tool that works, do share.
Can I use software MIDI emulation or MIDI-over-network / BlueTooth?
Yes! Try loopMIDI + VMPK on Windows, or rtpMIDI + various MIDI apps on iOS (Midi Wrench is a good one, MIDI Drum by InstaChord for sequencer). Your latency will be terrible though.
If my controller supports MIDI and HID, which should I use?
Nostroller, for example, supports MIDI / HID / keyboard / controller modes. If possible, avoid MIDI. The MIDI protocol is ancient and always splits chords into multiple MIDI messages, which is may result in higher latency and therefore not ideal for playing games. Instead, prefer to use the HID mode which treats every key as analog input.
For drum pads, MIDI is likely your only option.
I went through this page but my MIDI device still doesn't work properly - how do I troubleshoot and report a bug?
We hope that the latest series of updates in January of 2025 addresses most of the MIDI drum issues, but if you still have trouble, let us know.
To view raw stream of MIDI data,
- open spicecfg.
- click on Overlay tab
- at the bottom, check
Enable Overlay in Config - press F9 (Toggle Control hotkey)
- expand
RawInput - click on
MIDI Controlbutton - bang on your MIDI drums
If you want to report a bug, please attach the screenshot of the above, and explain which data corresponds to which action.