MIDI rendering with soundfonts
Posted: Mon Jan 16, 2023 3:37 pm
Hello!
I was looking through the internet about how to use soundfonts (in .sf2 format) to play MIDI files, what can greatly reduce the size of the project and add a special charm to the game since it doesn't need to rely on the OS soundbank (that in case of Windows is very terrible).
I don't know if Löve natively supports it, but i saw in the wiki something about loading C/C++ libraries (or .dll/.so) and looking through Github i saw two libraries for that: TinySoundFont, that is pretty raw since the dev need to implement all the .mid loading to pass each note through the library to be processed, if i'm not mistaken, and FluidSynth, i already knew about this library since mkxp used it internally, seems to be more easy to play midis through it.
I don't have much knowledge about working with C/C++ libraries or interacting with DLL/SOs, so does anybody here tried to work with libs like these to play mids in a pretty way using Löve?
I was looking through the internet about how to use soundfonts (in .sf2 format) to play MIDI files, what can greatly reduce the size of the project and add a special charm to the game since it doesn't need to rely on the OS soundbank (that in case of Windows is very terrible).
I don't know if Löve natively supports it, but i saw in the wiki something about loading C/C++ libraries (or .dll/.so) and looking through Github i saw two libraries for that: TinySoundFont, that is pretty raw since the dev need to implement all the .mid loading to pass each note through the library to be processed, if i'm not mistaken, and FluidSynth, i already knew about this library since mkxp used it internally, seems to be more easy to play midis through it.
I don't have much knowledge about working with C/C++ libraries or interacting with DLL/SOs, so does anybody here tried to work with libs like these to play mids in a pretty way using Löve?