(au:make-node type sub-type manu [channels])


Creates a new audiounit node.  Audiounit nodes can

  be connected together to form complex audio processing

  graphs (see au:connect-node, au:update-graph). You can

  manipulate audiounit nodes using a variety of impromptu

  functions (play-note au:set-param au:print-params

  au:get-param au:midi-out etc.). A visual user interface for

  each audiounit node can be opened by calling (au:open-view

  au:node).  The type, sub-type and manu for each audiounit on

  your system can be found by using the (au:print-audiounits

  type) function or use the OSX command line tool auval with

  the -a option.


       channels -- An optional argument specifying the number of channels that this audiounit should output (defaults to 2 - i.e Stereo).  Check that your audiounit supports more than 2 channels out (you can check using AULab among other things). Be careful what you connect it to as it will force this input of the next audiounit in the chain to match the number of channels you spec here

   manufacturer -- The manufacturers name. Apple audiounits are tagged


       sub-type -- a four character string describing the name of the

  audiounit that you wish to open. A common instrument

  available on every OSX system is "dls "

           type -- a four character string representing the type of

  audiounit. the type is one of "aumu" "aufx" "aumx" "aufc"

  "augn" "aumf"

Returns: boolean

Related: au:update-graph au:print-audiounits au:set-param

au:print-params au:get-param au:clear-graph au:print-graph

au:connect-node au:disconnect-node play-note



; connect two dls audiounits

; one with reverb and one without

(define inst1 (au:make-node "aumu" "dls " "appl"))

(define inst2 (au:make-node "aumu" "dls " "appl"))

(define reverb (au:make-node "aufx" "mrev" "appl"))

(define mixer (au:make-node "aumx" "smxr" "appl"))

(au:connect-node inst1 0 reverb 0)

(au:connect-node reverb 0 mixer 0)

(au:connect-node inst2 0 mixer 1)

(au:connect-node mixer 0 *au:output-node* 0)


(au:open-view inst1)

(play-note (now) inst1 60 80 *second*)

(play-note (now) inst2 72 80 *second*)

Back to index