-
Hello, I'm trying to loop a MIDI file from and to a specific tick using the Fluidsynth API. In order to call
How can I implement this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The MIDI player hasn't been designed for such precise control. Feel free to propse changes to fix those quirks. However, I see no way of getting a callback on every tick. Alternatively, you could consider to use the sequencer API instead. There, you can schedule timer events that give you a callback at a very certain tick. However you'll have to "emulate" the seeking yourself. I'm doing something like that together with libsmf in my app, to support MIDI track loops. But here I know when loop will happen as this is indicated by a CC. So not sure if this suits your use-case at all. |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for your reply. I read the code in your app, and it indeed fixes the problem I was facing. I PR'd this in #780. |
Beta Was this translation helpful? Give feedback.
Hi,
Thanks for your reply. I read the code in your app, and it indeed fixes the problem I was facing.
However, considering the amount of logic and additional state it creates, and considering most of this logic is already present in fluid player, I decided to implement a per-tick callback in the player.
I PR'd this in #780.