Latest News: Bitwig Updates Bitwig Studio to 5.2
Util script
-
- KVRer
- Topic Starter
- 2 posts since 3 Aug, 2019
I would like to have util script where I can setup params of my devices.
The question is How can I get specific Device of Track and change it parameter?
I was confused trying this code:
let firstDevice = track.createCursorDevice(null)
let chain = firstDevice.deviceChain()
let bank =chain.createDeviceBank(10)
let device= bank.getDevice(1)
let par = device.getParameter(1)
getParameter is deprecated but I didn't figure out how to use RemoteControls.
The question is How can I get specific Device of Track and change it parameter?
I was confused trying this code:
let firstDevice = track.createCursorDevice(null)
let chain = firstDevice.deviceChain()
let bank =chain.createDeviceBank(10)
let device= bank.getDevice(1)
let par = device.getParameter(1)
getParameter is deprecated but I didn't figure out how to use RemoteControls.
Last edited by pjack on Sat Aug 03, 2019 7:56 pm, edited 1 time in total.
-
- KVRist
- 138 posts since 20 Oct, 2015
you need to first create a cursor to the device ( you are already doing that with "firstDevice", except if you pass a string instead of null, you get a cursor independent from user selection)
then you need to assign firstDevice.createCursorRemoteControlsPage(8) ( 8 is the ammount of parameters you are interested in changing)
with the result of that you can call getParameter() and get back the parameter you are interested in changing.
here's some sample code from one of my scripts:
var device = channel.createCursorDevice("Primary");
var deviceMacros = device.createCursorRemoteControlsPage(8);
var macro = deviceMacros.getParameter(1);
then you need to assign firstDevice.createCursorRemoteControlsPage(8) ( 8 is the ammount of parameters you are interested in changing)
with the result of that you can call getParameter() and get back the parameter you are interested in changing.
here's some sample code from one of my scripts:
var device = channel.createCursorDevice("Primary");
var deviceMacros = device.createCursorRemoteControlsPage(8);
var macro = deviceMacros.getParameter(1);
- KVRAF
- 4145 posts since 13 May, 2004
Watch my Youtube API tutorials, especially: https://www.youtube.com/watch?v=TtHuJJJ ... R2&index=7pjack wrote: ↑Sat Aug 03, 2019 1:29 pm I would like to have util script where I can setup params of my devices.
The question is How can I get specific Device of Track and change it parameter?
I was confused trying this code:
let firstDevice = track.createCursorDevice(null)
let chain = firstDevice.deviceChain()
let bank =chain.createDeviceBank(10)
let device= bank.getDevice(1)
let par = device.getParameter(1)
getParameter is deprecated but I didn't figure out how to use RemoteControls.
But better start at the beginning to understand some basic concepts of the API.