0% found this document useful (0 votes)
64 views8 pages

Albert Gräf Dept. of Music Informatics: Interfacing PD With Faust

This document discusses interfacing Pure Data (Pd) with Faust, a functional programming language for digital signal processing. Some key points: - Faust allows programmers to use Pd as a graphical test environment for DSP programs, and allows Pd users to extend it with custom externals programmed in Faust. - The main features of interfacing Pd with Faust include automatic mapping of Faust controls to Pd objects, inspection of controls, and generation of Pd patches from Faust programs. - Faust is convenient for DSP programming due to its high-level language, powerful capabilities, fast optimized code generation, and portability across platforms.

Uploaded by

Matt Wall
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views8 pages

Albert Gräf Dept. of Music Informatics: Interfacing PD With Faust

This document discusses interfacing Pure Data (Pd) with Faust, a functional programming language for digital signal processing. Some key points: - Faust allows programmers to use Pd as a graphical test environment for DSP programs, and allows Pd users to extend it with custom externals programmed in Faust. - The main features of interfacing Pd with Faust include automatic mapping of Faust controls to Pd objects, inspection of controls, and generation of Pd patches from Faust programs. - Faust is convenient for DSP programming due to its high-level language, powerful capabilities, fast optimized code generation, and portability across platforms.

Uploaded by

Matt Wall
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Interfacing Pd with Faust

Interfacing Pd with Faust

Albert Gräf
Dept. of Music Informatics
Interfacing Pd with Faust

// tone.dsp

vol = nentry("vol", 0.3, 0, 10, 0.01); // %


pan = nentry("pan", 0.5, 0, 1, 0.01); // %
freq = nentry("pitch", 440, 20, 20000, 0.01);

// simple sine tone generator

process = osci(freq)*vol : panner(pan);

• Faust programmers:
use Pd as a graphical
test environment
• Pd users: extend Pd
with audio externals
programmed in Faust
(Karplus-Strong etc.)
Interfacing Pd with Faust

// tone.dsp

vol = nentry("vol", 0.3, 0, 10, 0.01); // %


pan
freq
= nentry("pan", 0.5, 0, 1, 0.01); // %
= nentry("pitch", 440, 20, 20000, 0.01);
Why
// simple sine tone generator
Faust?
process = osci(freq)*vol : panner(pan);

• Faust is convenient: high-level functional


programming language
• Faust is powerful: can do lots of things which are
awkward or impossible in Pd
• Faust is fast: sophisticated automatic
optimizations, generates C++ code
• Faust is portable: works with different platforms
and environments, just recompile
Interfacing Pd with Faust

Main Features of Pd/Faust


– automatic mapping of Faust controls
(button, checkbox, nentry,
hslider, vslider; also passive
controls: hbargraph, vbargraph)
– inspection (bang reports all controls)
– control pathnames following Faust
group structure (hgroup, vgroup,
tgroup)
– default active control (mute, bypass)
– faust2pd: automatic gop (“graph on
parent”) patches
Interfacing Pd with Faust

Plain Interface
.dsp source

faust -a
puredata.cpp && c++

.pd_linux plugin

Pd
Interfacing Pd with Faust

Deluxe Interface
.dsp source

faust -xml -a
puredata.cpp && c++

.pd_linux plugin .dsp.xml file

faust2pd

.pd file

Pd
Interfacing Pd with Faust

Pd+Faust +Q pattern = repeat [60,60,choose [63,67]];


repeat X = {X|repeat X};
choose Xs = Xs!rand 0 (#Xs-1);

– Faust only does audio processing


– Q is another functional programming
language tailored for symbolic processing
– Pd/Q external allows Pd control objects
to be implemented in Q
– Pd+Faust+Q = visual patching +
functional programming of sophisticated
audio and control objects
Interfacing Pd with Faust

Where To Get
– Faust (includes Pd interface):
http://faust.grame.fr/ (also Web-based
Faust compiler)
– Q website (many examples, Pd/Q
interface):
http://q-lang.sf.net/examples.html#Pd

Don't miss the Faust Hands On workshop


tomorrow, Sat, 16.00!

You might also like