I have a use case where I must set the position of MIDI music to a particular beat index (something supported by the old allegro 4 midi player, and perhaps other midi players).
0: Wind Fish
81: Overworld
233: Hyrule Castle
553: Lost Woods
814: Great Sea
985: East Hyrule
1153: Dancing Dragon
1333: Stone Tower
1556: Villages
1801: Swamp + Desert
2069: Outset Island
2189: Kakariko Village
2569: Clock Town
2753: Temple
2856: Dark World
3042: Dragon Roost
3125: Horse Race
3217: Credits
3296: Zelda's Lullaby
Note: I'm not certain if there's an off-by-one error in this code, or in the source midi player these positions are defined to work in (allegro 4), but I found I need to take the beat values above and subtract one to get the exact right positioning.
You can use the playmus example program to seek to a specific tune (you'll need a timidity.cfg and soundfont within your build directory, as always):
./playmus -n 552 TheTravelsOfLink.mid
Draft until some feedback (then I'll update the other music interfaces with NULL stubs).
I have a use case where I must set the position of MIDI music to a particular beat index (something supported by the old allegro 4 midi player, and perhaps other midi players).
Example MIDI: https://drive.google.com/file/d/1qiE7sVyvQoVRxJftKhz-n4juuArfwri8/view?usp=share_link
And positions of tunes within:
Note: I'm not certain if there's an off-by-one error in this code, or in the source midi player these positions are defined to work in (allegro 4), but I found I need to take the beat values above and subtract one to get the exact right positioning.
You can use the
playmus
example program to seek to a specific tune (you'll need a timidity.cfg and soundfont within your build directory, as always):Draft until some feedback (then I'll update the other music interfaces with NULL stubs).