N64 MIDI + Soundfont player by monx at 12:31 AM EST on February 22, 2025
A while back I did some work with SubDrag's N64 tools, but realized I never shared it here. I updated chiptune.app to play MIDI and SoundFonts extracted with N64SoundbankTool:
The MIDI files contain special metadata events with the name of a SoundFont file (I wish there was a standard for this; I just made it up). When the player encounters this event, it will fetch and load that SoundFont into the Fluidsynth engine (Fluidlite).
Most of the work here was tweaking/repairing SoundFonts with Polyphone, and extra processing to convert N64MidiTool exports to well-behaved MIDI files (unroll loops, release/retrigger overlapping notes, and so on). My SoundFont tweaks are best-effort, and there might be a few remaining MIDI glitches, but I'm happy with the results.
I should mention Derselbst has done similar (and probably superior) work for ANMP.
Shoutout to SubDrag and anyone who helped compile all those game configs.
1. extract all MIDI and DLS soundbanks (and debug text) with Subdrag's N64 SoundTool 2. convert DLS to SF2 3. clean up SF2 (manual testing, by ear) with Polyphone 4. grab the corresponding .inl file from L-Spiro's Nintendo-Synthy-4 project (e.g. NS4GoldenEye007Files.inl) 5. run a script that cleans up MIDI files -- a. clean up track loop events based on debug text -- b. pick up track titles/soundbank ID from the .inl file -- c. for games with multiple soundbanks, insert the Soundfont filename into the MIDI file with a meta text event -- d. fix drum channel -- e. fix overlapping notes (they are truncated since I've not modified fluidsynth) insert all notes off at end of loops
Cool! I've been using the USF player in chiptune.app occasionally, didn't look at the MIDI stuff yet. And I don't think I'd seen ANMP before, I'll check it out.
Ah, last night I pushed a fix for USF on chiptune.app. There used to be a 1-2 second freeze before starting playback, but now it's instantaneous. Much smoother experience.
It will now also mute audio during long blocking "seek" commands. Still slow, but less annoying.
I've known about MIDI+SF2 schemes being tried for a long time, but this is the best & least hassle implementation I've seen so far. Of course, when you totally replace the sound engine, inconsistencies are almost guaranteed, usually with mod speed/depth or envelopes. I'm seeing that some games are better here than others.
Still, very fun proof of concept, as is the entire website. Amazing work, really. I was really pleased to see the timed FamiCompo NSFEs available on there, I worked tirelessly on those. Maybe less pleased about my old music though ^^;; there is nowhere to hide!