There’s something in Tracktion that gives me the corresponding tempo section that match a specific time or a specific beat? something like “getTempoSection( double atBeat)” “getTempoSection(double atTime)”?
I wrote this but I think it could be write better from Tracktion programmers and it should be a great idea to add something like these funcs in framework:
TempoSequence::SectionDetails getMatchingTempoSection(int const beat) const
{
auto sections = edit.tempoSequence.getTempoSections();
TempoSequence::SectionDetails section;
for (int i = 0; i < sections.size(); ++i)
{
if (sections.getReference(i).startBeatInEdit > beat) { break; }
section = sections.getReference(i);
}
return section;
}