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

Dec 10, 2012 at 1:00pm

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

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

#63525
Dec 10, 2012 at 1:31pm

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

#229011
Dec 10, 2012 at 2:46pm

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.

#229012

You must be logged in to reply to this topic.