Util script

Post Reply New Topic
RELATED
PRODUCTS

Post

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.
Last edited by pjack on Sat Aug 03, 2019 7:56 pm, edited 1 time in total.

Post

..

Post

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);

Post

pjack 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.
Watch my Youtube API tutorials, especially: https://www.youtube.com/watch?v=TtHuJJJ ... R2&index=7
But better start at the beginning to understand some basic concepts of the API.

Post Reply

Return to “Controller Scripting”