Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api for obtaining Ticks/Playback position #212

Open
Ghabry opened this issue Apr 5, 2020 · 2 comments
Open

Api for obtaining Ticks/Playback position #212

Ghabry opened this issue Apr 5, 2020 · 2 comments

Comments

@Ghabry
Copy link
Contributor

Ghabry commented Apr 5, 2020

Hello.

Is there a way to obtain the current "midi ticks" as e.g. in Fluidsynth? Need this again for EasyRPG Player because there is an event command where the game can ask for the midi position in ticks :/.

https://github.com/FluidSynth/fluidsynth/blob/master/src/midi/fluid_midi.c#L2261

I see that you store the samples in

mdi->events[mdi->event_count - 1].samples_to_next += sample_count;
mdi->extra_info.approx_total_samples += sample_count;

Guess they can be used to calculate the playback position? At least WildMidi_FastSeek uses them but I can't see any way to read these values directly?

@psi29a
Copy link
Member

psi29a commented Apr 5, 2020

We would need to expose this in the API you mean?

something like: WildMidi_CurrentPositionTicks ?

@Ghabry
Copy link
Contributor Author

Ghabry commented Apr 5, 2020

Yeah some API that exposes them

@sezero sezero added this to the 1.0 - Wishlist milestone Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants