I'm able to add listeners for playing, recording and even queued (for playing) but I want to be able to make the controller flash red before recording and amber before stopping, like it does in Ableton. Is there a way to do this? I hope it doesn't require using the color listener because that seems like a weird thing to rely on.
Also, as a separate matter, will there ever be listeners for starting and stopping scenes? Currently, my script doesn't light up the scene launch buttons at all...
addIsQueuedForRecordingObserver?
- KVRAF
- 6540 posts since 9 Dec, 2008 from Berlin
1.)
void addPlaybackStateObserver(Callable callback)
Registers an observer that reports the playback state of clips / slots. The reported states include stopped, playing, recording, but also queued for stop, queued for playback, queued for recording.
Parameters:
callback a callback function that receives three parameters:
the slot index (integer),
the queued or playback state: 0 when stopped, 1 when playing, or 2 when recording, and
a boolean parameter indicating if the second argument is referring to the queued state (true) or the actual playback state (false)
2.)
Scenes so far aren't clearly defined entities. It makes sense in a way, since what exactly defines a scene?
If all clips in it are playing? What if some of them are not looping? What if some other clips are playing as well outside of the scene?
You can create a large uber-trackbank and iterate through all clips of a scene to see if they play and if yes, consider the scene playing...
Not sure how useful it is.
Cheers,
Tom
void addPlaybackStateObserver(Callable callback)
Registers an observer that reports the playback state of clips / slots. The reported states include stopped, playing, recording, but also queued for stop, queued for playback, queued for recording.
Parameters:
callback a callback function that receives three parameters:
the slot index (integer),
the queued or playback state: 0 when stopped, 1 when playing, or 2 when recording, and
a boolean parameter indicating if the second argument is referring to the queued state (true) or the actual playback state (false)
2.)
Scenes so far aren't clearly defined entities. It makes sense in a way, since what exactly defines a scene?
If all clips in it are playing? What if some of them are not looping? What if some other clips are playing as well outside of the scene?
You can create a large uber-trackbank and iterate through all clips of a scene to see if they play and if yes, consider the scene playing...
Not sure how useful it is.
Cheers,
Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." · Rumi
UrbanFlow.art · Instagram · YouTube
UrbanFlow.art · Instagram · YouTube
-
- KVRer
- Topic Starter
- 18 posts since 27 Mar, 2014
Thanks this is exactly what I need. I'll fix this issue on my script when I get back from my vacation.ThomasHelzle wrote:1.)
void addPlaybackStateObserver(Callable callback)
Registers an observer that reports the playback state of clips / slots. The reported states include stopped, playing, recording, but also queued for stop, queued for playback, queued for recording.
[...]
I suppose what I could do is come up with my own definition of what a scene is, try to mirror the behavior of Live (wrt to the controller feedback) and make my own function that takes a callback. That way if you guys do add something like this later, I could swap it out more easily. I'd certainly rather go by Bitwig's opinion of if a scene is playing or queued for playing rather than my own. I just don't want the GUI saying one thing and the controller saying another but if the GUI has nothing to say, I can come up with something to tell the controller.ThomasHelzle wrote:2.)
Scenes so far aren't clearly defined entities. It makes sense in a way, since what exactly defines a scene?
If all clips in it are playing? What if some of them are not looping? What if some other clips are playing as well outside of the scene?
You can create a large uber-trackbank and iterate through all clips of a scene to see if they play and if yes, consider the scene playing...
Not sure how useful it is.
Cheers,
Tom
-
- KVRer
- Topic Starter
- 18 posts since 27 Mar, 2014
So addPlaybackStateObserver is working pretty well for me. The only thing that strikes me personally as odd is that I don't get queued for stopping unless I tell the whole track to stop. If I hit play on a different clip on the track, it definitely shows queued for play on that clip, but not queued for stop on the other clip, which is what I'd expect. But if this is by design I suppose it could make sense but it's good to have a reminder that "this clip will stop because another clip is starting" especially if your grid doesn't actually cover all the clips.
