This patch needs the pyrtmidi python extension available at http://trac2.assembla.com/pkaudio/wiki/pyrtmidi
You can find the patch here: http://gangrenegang.com/~kimmy/fof-mfh-3.0-midi-input.patch
To patch the code, I use the 'patch' utility:
patch -p 1 < fof-mfh-3.0-midi-input.patch
If you patch your MFH3 source and DON'T have this extension, OR you have no MIDI devices, nothing bad will happen. But without the rtmidi extension, MIDI just won't work with this FOF:MFH3 patch.
To know if the MIDI input works for certain, patch your game and run it in a terminal (or 'cmd'). If you see "x MIDI inputs found." or "No MIDI input ports found", it's working. If you see the latter, that means it can't find any usable MIDI inputs. Plug something in, and make sure you have the drivers loaded for it.
This patch will attempt to use ALL MIDI inputs as valid inputs. Then, to associate the input to a pad (for drums) or any other instrument for that matter (midi guitars?), just go to the options and configure them normally. Hit the pad you want to use for the appropriate pad, and it'll identify it as "Midi #x-y" where 'x' is the input used (or 'port') and 'y' is the pad on the device itself. In other words, if you 'move' the drum set, you'll need to setup your pads again. This is because in the world of MIDI the drums don't identify themselves uniquely, just what they are, so I'm afraid that's just how it is. On the other hand; if you have, say, 8 pads and two pedals, you could move them around and allow two players to share one set. (That's right, this will work!) Groovy.
As for any bugs I've used the patch quite a lot and haven't found any issues at all (it's a very simple patch), but you may. If you find one please post about it.
rtmidi SHOULD work on Mac OS X, Linux with ALSA, IRIX, or Windows. If your platform isn't listed there (I'm looking at you guys, BSD,) direct your patches to the rtmidi project, since this one doesn't do anything platform specific.
Also, if you're in Linux and you are seeing "No MIDI input ports found" make sure you have the appropriate sequencer modules loaded:
- snd_timer
snd_seq
snd_seq_device
snd_seq_midi
snd_seq_midi_event
If anybody cares to use this patch, please throw any questions at this thread, I'll keep my eye on it.
.. also, I have no idea if this patch will apply cleanly to stock FoF or any other mods, but really it doesn't matter, since they only work with guitars as far as I know anyway. ... Okay, if you have a MIDI guitar (which I've never heard of), let me know how it went.