I found some example code here, on how I should retrieve that info from the DAW :
( search for AUHostMusicalContextBlock within the text )
Using this code I can indeed get the tempo info from apps like Garageband and AUM.
However I cannot get the tempo info from Cubasis. The musicalContextBlock property is nil.
Am I correct to assume Cubasis does not provide an AUHostMusicalContextBlock?
I did some further experiments. I thought that maybe, when you enable Midi Clock in Cubasis, Cubasis will also send this Midi Clock to any AUv3 Send Effects. It would allow the effect to sync to the beat, although less efficient than use of AUHostMusicalContextBlock.
My AUv3 plugin is of the type “aumf” , or Audio Unit Music Effect , that is able to receive Midi data, as opposed to plugins of the type “aufx”, or Audio Unit Effect, that is not able to receive Midi data. And indeed, in AUM, when I enable the keyboard, it is able to send midi data to the plugin.
Not so in Cubasis. It seems Cubasis does not send midi data to any AUv3 Send Effect plugin. As a result it also does not send Midi Clock data. Can you confirm this?
I am developing AUv3 plugins and find myself in the same situation - Cubasis 3 does not appear to provide musical context info that would allow me to use the song/session tempo in my plugin.
Is there a solution to this? Other hosts (Garageband, AUM, etc.) provide the tempo as documented.