Hi Rory,
Sorry about the category type. Cabbage Stew didn’t seem to fit the question when I was choosing from the category combobox. Anyway. I remember reading the post you linked when you posted it the first time, but unfortunately it isn’t the tempo what I’m trying to set, but the internal clock.
Having opcodes like setscorepos means Csound has something like a rewindable clock. It would be nice to be able to link that to the host transport. The only thing we would need to take care of would be that multiple instances of the same instrument could be fired up by rewinding to a certain time.
Otherwise, how can you create an audio file player that is synced to the transport? I’ve tried with some of the looper opcodes and TIME_IN_SECONDS as the loop start time, but it isn’t very accurate. Maybe it would be easier and more sample-accurate to just modify the audio file player plugin you created for the host of Cabbage 1 with Juce.
EDIT: Because of how the score events are scheduled I think even if it’s possible to achieve what I propose here, it’s a poor decision regarding the overall design strategy. I’ll just stick to flooper2, deferred gen01 tables and simple arithmetic for playing audio files in sync with the transport host.