Forums > Javascript

create an [dac~ 1 2 3 4 5] etc. with JavaScript


Dec 10 2012 | 1:00 pm

Hi all,

would it be possible to create the [dac~] object with a certain output configuration dynamically in JavaScript?
For instance, if I had a given number (23 channels) – how would the JS code look like to create the dac~ with the appropriate arguments 1 2 3 .. 23 ?

Thanks in advance

Dec 10 2012 | 1:31 pm

That JS already exists, look in the JS examples for ‘scriptnewdefault’.

Dec 10 2012 | 2:46 pm

Thanks I got it now. The trick is to pack all the arguments that would be part of the "newdefault()" command for instance into an array and then just call newdefault(array). The indices of [dac~1 2 3..] can be assigned in a for- loop.

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > Javascript