Simplest example: ( (out (osc 400))) ...which is exactly the same as: ( "process=osc(400);") Larger example: ( (import "math.lib") (= (smooth c) (colon "*(1-c)" "+~*(c)")) (= vol (colon (hslider "volume (db)" 0 -96 0 0.1) db2linear (smooth 0.99))) (= freq (hslider "freq" 1000 0 24000 0.1)) (out (vgroup "Osc" (* (oscil* freq) vol)))) Evaluating code in the x11 buffer, for example from the faust software catalog: ( :autoimport-libs #f (x11-selection)) Import code from url: ( (url "http://faudiostream.cvs.sourceforge.net/*checkout*/faudiostream/faust/examples/tapiir.dsp")) ( "http://faudiostream.cvs.sourceforge.net/*checkout*/faudiostream/faust/examples/karplus32.dsp") ( "http://faudiostream.cvs.sourceforge.net/*checkout*/faudiostream/faust/tools/faust2pd-1.0.2/examples/seqdemo/organ.dsp") Import local file: ( (include "/home/kjetil/snd-run/osc.dsp")) Display the faust source of the lastest evaluated faust object: (display-faust-source) A very convenient way to test the faust programs at http://faudiostream.cvs.sourceforge.net/faudiostream/faust/examples/ : ( :autoimport-libs #f (url (x11-selection))) Sending sound from one RT object to another: (let ((abus (make-bus))) ( :in-bus abus (= (smooth c) "*(1-c) : +~*(c)") (= gain (colon (vslider " dB " 0 -96 4 0.1) db2linear (smooth 0.999))) (out (vgroup "fader" "*(gain)"))) ( :out-bus abus (oscil*))) Using faust to monitor the output of the RT engine: ( :in-bus *out-bus* "vmeter(x) = attach(x, envelop(x) : vbargraph(\"dB\", -96, 10)); hmeter(x) = attach(x, envelop(x) : hbargraph(\"dB\", -96, 10)); envelop = abs : max(db2linear(-96)) : linear2db : min(10) : max ~ -(96.0/SR); process = vmeter;") Faust lisp macro: (define-faust-macro (oscivol freq vol) `(* ,vol (osci ,freq))) ( (out (oscivol 500 0.2))) The "oscivol" macro can also be implemented by concatenating strings. More verbose, but also more powerful: (define-faust-macro (oscivol freq vol) (<-> (eval-parse vol) "*osci(" (eval-parse freq) ")")) Accessing scheme variables in faust code: (define frequency 400) ( (out (osc ,frequency))) ;; More elaborate example: (define frequency '(= frequency 400)) (define osc '(= osc (osci frequency))) ( ,frequency ,osc (out osc)) ;; Trying to organize things: (define faust-def (let ((defs '())) (lambda* (:optional def) (if def (push! def defs) defs)))) (faust-def '(= frequency 400)) (faust-def '(= osc (osci frequency))) ( ,@(faust-def) (out osc)) ;; (Lots of potentional improvements here...) Calling Faust functions from Snd-Rt code. Both the frequency slider and the volume slider will appear in the same dialog: ( (* ( (= freq (vslider "freq" 600 0 2400 0.1)) (= process (vgroup "ai" (osc freq)))) ( "vol" 0.0 0.1 1.0))) More than one channel: ( (vct-scale! ( "process=osc(400),osc(500)") ( "vol" 0.0 0.1 1.0))) Send sound from Snd-rt into a object: ( ( :in (vct (oscil*)) (= gain (vslider "gain" 0.2 0 1 0.01)) (= process (vgroup "ai" "*(gain)")))) (note that the output of is a single signal, while the input is a vct. To get a vct as output as well, use instead of )