Latest News: Bitwig updates Bitwig Studio to v5.1
Setting post recording delay with beat time.
-
- KVRist
- Topic Starter
- 51 posts since 26 Nov, 2017
I want to set the post recording clip delay in my script with buttons for 1bar 4bar 8bar on my touch osc display. But I don’t really understand how to pass the beat time through the post recording delay function based in what it says in the api. I’m stuck.
Thanks
Thanks
-
- KVRist
- 110 posts since 6 Nov, 2017
Ah OK, I found getClipLauncherPostRecordingTimeOffset() for transport and I got it to work like this (with the global variable "offset"):
in init:
and then with a button:
This gives me a Post Recording Delay of 2 bars (8 beats).
Would there be a way to set this as a time format like 02:00:00:00 in order to make it two bars? The solution above only works with 4/4, I want to assign 4 buttons for specific numbers of bars.
in init:
Code: Select all
transport.getClipLauncherPostRecordingTimeOffset().markInterested();
offset = transport.getClipLauncherPostRecordingTimeOffset()
Code: Select all
offset.set(8);
Would there be a way to set this as a time format like 02:00:00:00 in order to make it two bars? The solution above only works with 4/4, I want to assign 4 buttons for specific numbers of bars.
-
- KVRist
- 110 posts since 6 Nov, 2017
In order to have different LEDs light up according to the current Post Recording Delay I hade to first format the beat time value. For my script that was done with and then something like
Now I have a last question, everything else works nicely!!
I also want to show the current Defaul Clip Launch Quantization, which is a SettableEnumValue (can have values like "1", "1/2", "1/4"...). How can I check the current state for the right LED to be lit?
I have
Do I need a similar procedure like getFormatted()? I can't seem to compare "quant" with a string:
This does not work... Current version is also on github, https://github.com/TVbene/LaunchpadScriptV3/ --> launchpad_grid.js.
Code: Select all
time = offset.geFormatted()
Code: Select all
if(i == 1 && time == "002:00:00:00")
{
colour = Colour.GREEN_FULL
}
I also want to show the current Defaul Clip Launch Quantization, which is a SettableEnumValue (can have values like "1", "1/2", "1/4"...). How can I check the current state for the right LED to be lit?
I have
Code: Select all
transport.defaultLaunchQuantization().markInterested();
quant = transport.defaultLaunchQuantization();
Code: Select all
if(j == 5 && quant == "1")
{
colour = Colour.RED_FULL
}
-
- KVRist
- 110 posts since 6 Nov, 2017
Alright folks, script is working, just closure :
in order to set default launch quantize we had
of course for getting the value you need
so in my case I need something like
which makes it possible to have
in order to set default launch quantize we had
Code: Select all
transport.defaultLaunchQuantization().set()
Code: Select all
transport.defaultLaunchQuantization().set()
Code: Select all
quantValue = quant.get();
Code: Select all
if quantValue == "1"