Reading Tempo from the DAW

I am trying to make the attack and release times of my compressor a function of the tempo of a song. I do not know how to get the tempo from the DAW or its MIDI. Do you all have any insights as to how to do this? Thank you.

use juce::AudioPlayHead to fill a juce::AudioPlayHead::CurrentPositionInfo with information. ppq is the position in quarter notes. use ppq and bpm to calculate lengths of certain intervals in samples.

remember to provide a backup plan, because some DAWs don’t have a playhead, like cantabile or the standard standalone build you use for debugging

1 Like