foobar2000

MIDI Player

By: kode54

This component decodes General MIDI files (.MID, .MIDI, .RMI, .KAR) and several MIDI based formats. (.MIDS, .MDS, .HMI, .HMP, .MUS, .XMI, .LDS)

It supports several synthesizers, several of which do not require any additional files to play back music. The bundled synthesizers which do not require additional files may sound rather basic, though.

It also supports Ian Luck's wonderful BASSMIDI SoundFont (.sf2) based synthesizer, including bundled support for his .sf2pack format, which is nearly identical to the basic .sf2 format, except the file identifier is "sfpk" instead of "sfbk", and the audio section of the file is a compressed format supported by BASS that also supports seeking, as it decodes the samples as they are referenced by the MIDI files. The compressed format is identified only by its bitstream properties. BASS includes support for MP3 and Ogg Vorbis samples, while plugins are bundled to support FLAC, WavPack, Musepack, and Opus format samples.

FLAC is the suggested format for saving space and fast decoding, while Opus is suggested for "preview" type downloads, as it provides a relatively stable waveform for loops in this format, while compressing quite a bit. However, I cannot recommend using lossy compression of SoundFonts as a final distribution format, as loops could still show errors.

SoundFonts may be loaded in a simple, or even complex setup, using either basic .sflist text files encoded in UTF-8 format, or .sflist.json files, also encoded in UTF-8 format. A description for the SFLIST JSON format, as well as a parser capable of handling both the original and JSON formats, may be found here:

https://gist.github.com/kode54/a7bb01a0db3f2e996145b77f0ca510d5

Please note that the VST instrument and Secret Sauce support executables are bundled, and are invoked using named pipes for communication with standard input and output devices on the executable end. The full source code is also published, in case anyone wants to replicate them, or use them for another purpose. They are built with the same compiler as this component, but since they are not themselves components, they require the Microsoft Visual Studio 2015 C++ runtimes. Both 32 and 64 bit versions, to be precise.

https://g.losno.co/chris/foo_midi/commits/branch/master
https://g.losno.co/chris/midi_processing/commits/branch/master
https://g.losno.co/chris/libADLMIDI/commits/branch/master
https://g.losno.co/chris/midisynth/commits/branch/master
https://g.losno.co/chris/scc/commits/branch/master
https://g.losno.co/chris/munt/commits/branch/master
https://g.losno.co/chris/foobar2000/src/branch/master/plugins/SCPipe

Current version: 2.3.5, released on 2020-07-24

Change log:

  • Implemented BASSMIDI voices control in Advanced Preferences
  • Moved existing BASSMIDI Advanced Preferences option to its own tree with the new option
  • Dynamic info now returns current and maximum BASSMIDI voices

Works with foobar2000 v1.4 and newer

Links

Download
View version history
Documentation

More components

Browse all
Browse by author: kode54
Tags: decoder, game music, synthesizer

How to install a component?