Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
514 stars 131 forks source link

Requirements for midi playback support #6

Closed Ancurio closed 9 years ago

Ancurio commented 10 years ago

A library to support midi files in mkxp ideally:

The requirement of manually feeding events is there so the "0x6F" control value change event, which marks the loop start, can be detected, and event parsing can be restarted from this position in the byte stream (very cheap, as just a file seek).

libfluidsynth

fdelapena commented 10 years ago

You can consider WildMIDI too, but it does not support soundfonts, only GUS patches like old Timidity.

Some fluidsynth performance notes: https://github.com/EasyRPG/Player/issues/17

Timidity++ does support SF2 and yes, can be set up via .cfg with soundfont "foo bar.sf2". But note Timidity++ is more intended to be used as a server.

Ancurio commented 10 years ago

Thank you very much for the notes! I will look into WildMIDI.

To be fair, I don't think there really exists a library that does what I want (realtime independent sample rendering of midi event streams), because almost every software synth is written for use in real time with electric keyborads etc.

I have to experiment a bit more with fluidsynth to see if there's a workaround possible.

euna8815 commented 10 years ago

Why not SDL_mixer? It is also part of SDL and can play MIDI files.

Ancurio commented 10 years ago

Why not SDL_mixer? It is also part of SDL and can play MIDI files.

If you read the specific requirements I listed above, you'll find that SDL_mixer fulfills none of them. Besides, it's a different class of framework alltogether, as it handles both decoding of sound data and submission to the audio hardware; the latter part is already handled by OpenAL in mkxp.

Ancurio commented 10 years ago

Just wanted to update that I might have been misinformed on the way fluidsynth works, and am now doing some experiments with it.

Ancurio commented 9 years ago

Implemented: 751fdc599e241c1f1c4c20513787e5f3706f21cc.