-
trying to make a game with midi files for audio, which means i need them to loop. but the composer would prefer not to have to make songs loop into the intro or to not have intros, so fluid_player_set_loop() is insufficient is there a reasonably simple (i have no idea where to begin reading this thing) to implement non-hack way to support some kind of loop points in fluidsynth? if not, could one be added? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In short: No. There is no standard way to achieve MIDI looping, since no standard for this exists. There are various conventions to achieve this though. I went with implementing the N64 convention, which gives the composer a lot flexibility (e.g. consider the crazy laughs in Creepy Castle's Ballroom: They'll always laugh at a different place in the tune). The understand my codesnippet, you need to:
Ultimately, whatever convention you decide for, you'll need to have some kind of marker somewhere (either in the MIDI or in the game itself), allowing you to react to and simply re-enqueue the MIDI events from the beginning of the loop. That's it. It is however application and use-case specific, which is why it cannot and will not be implemented in fluidsynth, sry. |
Beta Was this translation helpful? Give feedback.
In short: No.
There is no standard way to achieve MIDI looping, since no standard for this exists. There are various conventions to achieve this though. I went with implementing the N64 convention, which gives the composer a lot flexibility (e.g. consider the crazy laughs in Creepy Castle's Ballroom: They'll always laugh at a different place in the tune).
The understand my codesnippet, you need to: