how to get the beat and timeline from an music directly

hello,

I wanna get the beat and timeline from an music directly.I mean that ,for example,i have a .mp3 file ,and it loaded via createSound API,but it can’t get the length or the beat or timeline.

i’ve read the example source code.the project ‘music_callback’ can get the beat ,timeline and other information from ‘bank’ file in FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES structure.

My questions are:

  1. how to get beat and timeline via lowlevel api.
  2. if i want to get the beat or timeline,should i must use Studio api or should i must create the .bank file.

Thanks.

Hi rtfc001,

Thanks for your question.

The FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES callback only works for events that use tempo markers in FMOD Studio projects.

There isn’t any beat detection function available in the FMOD Studio or lowlevel API.

If you need to get the length of the MP3, you can use the Sound::GetLength on the created sound.
https://www.fmod.org/documentation/#content/generated/FMOD_Sound_GetLength.html

Thanks,
Richard

@Richard Thank you very much!
Ah,well,Maybe i should create some bank files to get the beat and timeline as the example project does.