YCAMInterlab / ofxTimeline

lightweight timeline tools for openFrameworks
271 stars 141 forks source link

1 playhead for multiple timelines....? #86

Open JoshuaBatty opened 11 years ago

JoshuaBatty commented 11 years ago

I am building an audiovisual app that has a lot of DSP and audio parameters that I need to automate. So much so that I have split the Mater controls, shader params and DSP params into 3 separate timeline classes. In my GUI, I have toggles setup to switch between the different timelines.

Only problem is that I essentially now have 3 playheads. 1 for each timeline. What I need is just one playhead (coming from the master) that can then drive the playhead postion of the other 2 timelines manually.

Currently I am doing -> //-------------------------------------------------------------- float MainTimeline::getCurrentTimeMillis(){ return timeline.getCurrentTimeMillis(); } Then in my 2 other timelines trying this -> //-------------------------------------------------------------- void AudioTimeline::update(MainTimeline *mTimeline){ timeline.setCurrentTimeMillis(mTimeline->getCurrentTimeMillis()); }

But unless I call timeline.play() then the playhead doesn't move.

Any ideas on how to achieve this Jim?