ChucK: audio routing ...28 Oct 2015

How to route audio out pairs in the case of multichannel DAC? This is not crystal clear from the manual. In my case I’d like to choose a stereo pair in a multichannel interface: a Novation Audio Hub which exposes it’s 4 outputs as dac.chans(0, 1, 2, 3). Taking a hint from the Pan2 UGen docs:

UGen U => Pan2 p => dac.chan(2);
p => dac.chan(3);
0 => p.pan; //set to centre

in this case, ChucK is started with the following options:

chuck --loop --dac3 --in2 --out4

ChucK: to and from signed numeric values ...19 Oct 2015

In a situation where you want to get the absolute value of a number whether it’s positive or negative. i.e. this is something you might want to do when working with the rate parameter of sndbuf()

just like the abs() functions in  stdlib.h in the C language – strip off it’s sign & return the absolute value:

Std.fabs(float) or Std.abs(int)

these are functions pulled in from ChucKs default libraries.

If you want to do what could be considered the inverse operation involves something more like school maths:

(rate *- rate) => rate;

…will invert a positive value to negative.