
Faust – A language for audio applications and plugins - jarmitage
https://github.com/grame-cncm/faust
======
veli_joza
I've used Faust quite a bit few months ago. It's very powerful and expressive,
and targeting many different systems/platforms is no problem. I have used
generated C code on bare-metal ARM Cortex M4F platform, which is some distance
away of original scope of Faust project. It was fairly easy to do. The
documentation is also well written and comprehensive, it gives you very nice
introduction into functional languages, time-domain DSP, as well as
explanation of some common applications (pitch detector, panner...).

Two downsides I noticed (maybe they are fixed in the mean time?) are error
messages and block composition. Because of the way Faust compiler works, error
messages are long and not very meaningful. Some expressions are merged and
simplified before error is triggered, so it's difficult correlate the
expression in error output with your source code.

The other problem is that once you have the basic blocks and want to merge
them into complex system, the syntax suddenly gets in your way. You have to
introduce dummy wires in some blocks just to get signal to its destination.
The compiler can output graphical representation of code, but it would
sometimes be much easier to use visual tool like the Simulink or LabView.
Perhaps this is just tooling issue, but I found language syntax to be
confusing and not scaling up properly.

------
Mizza
This looks interesting!

I make music and VSTs for fun.[0] In the past I used a framework called
SonicBirth[1], but recently I've moved to "IPlug"/"WDL-OL"[2], which seems
very professional to me in terms of capabilities. Looking forward to doing
more of this, plenty of ideas..

[0] [https://github.com/Miserlou/Autopan](https://github.com/Miserlou/Autopan)
[1] [http://sonicbirth.com/](http://sonicbirth.com/) [2]
[https://github.com/olilarkin/wdl-ol](https://github.com/olilarkin/wdl-ol)

~~~
gcb0
faust seems to be far away from VST visual creators.

------
kruhft
Common Lisp Music has the best piano synth out of any of the music generation
packages I've ever used:

[http://ccrma.stanford.edu/software/clm/](http://ccrma.stanford.edu/software/clm/)

------
jonathanstrange
That language and framework is really interesting but I was wondering about
the platform "VSTi (mono)". Does this mean that VST instruments produced with
it can currently only be mono? That seems like an odd limitation, so wonder if
I'm misreading this statement.

~~~
radiowave
Presumably in the sense of "can only play one note at a time".

At a guess, the whole business of spinning up a new instance of the sound
generator for each new note that's played, (or running a fixed number of
instances, and dynamically allocating new notes whichever instance will be
least disruptive, aka "note stealing"), and the other business of doing
modulation (such as vibrato) that needs to be applied consistently across all
instances of the sound generator... remains to be implemented.

In other words, it looks to me like Faust's focus at the moment is on
describing the processing in the audio signal path. Polysynths require a whole
bunch of cross-cutting management functions, outside of (and between) the
(multiple) audio signal paths.

~~~
veli_joza
This is correct interpretation, you can have stereo output but your instrument
can handle only one note at the time.

There are plenty of modern synths that have "mono" or "solo" option. If you
play two notes at once, the resulting tone will slide from first note to the
second. This is obviously very useful for playing melodies and keyboard solos
where polyphony is often not desired.

BTW there are ways to use multiple mono-synths as a poly-synth, depending on
VST host.

------
anentropic
This looks great. Does anyone have any pointers where to start with DSP audio
programming?

~~~
squeaky-clean
I'm just a hobbyist, but here's some resources that have helped me. My
interests are specifically for musical applications, so that might affect some
things.

"The Scientist and Engineer's Guide to Digital Signal Processing" is free
online. This has been my most used text so far. [0]

Introduction To Digital Filters [1]. Another book free online. I haven't dug
very deep into this one yet, but select chapters have been helpful so far.
Juluis O. Smith III has several other books on the topic that seem useful too.

Earlevel's Wavetable oscillator tutorial. Create a mip-mapped wavetable
oscillator in C++. A really nice balance of theory and practicality in both
the explanations and code/ [2]

The music-dsp mailing list and the KVR DSP forum [3] have both been extremely
helpful. I'd seriously recommend lurking the KVR forum for a bit if you're
interested in musical applications of dsp. It's a bit like HN in that you'll
ask "how do I replicate this 80's digital synth" and sometimes the original
programmer will respond.

Aside from that, blogs specific to your interests. Plugin manufacturers can
often get pretty technical on their blogs. I recommend reading through the
archive of the valhalladsp blog if reverbs interest you.

And not DSP specific, but working on a fun project is always a good motivator.
I started off with VSTs using I-Plug/WDL-OL. Now I'm using a Hoxton OWL
(guitar pedal with a Cortex M4f) and have been much more productive than ever,
just because the form factor and hardware are so fun.

There's lots of repositories of code examples. AudioTK has a lot of examples
and is high quality, I feel [4]. MusicDSP has a TON of code examples, though
not all of them are good quality or well optimized, it's like the stack-
overflow copy-pasting of DSP, but still useful for the depth. [5] There's
probably a hundred others, many optimized for specific hardware, but these are
the 2 that come to my mind first.

Edit: Oh, there's also tons of MOOCs and online lectures about this as well. I
won't offer any advice there though, as I don't learn well through those.

[0] [http://www.dspguide.com/](http://www.dspguide.com/)

[1]
[https://ccrma.stanford.edu/~jos/filters/](https://ccrma.stanford.edu/~jos/filters/)

[2] [http://www.earlevel.com/main/category/digital-
audio/oscillat...](http://www.earlevel.com/main/category/digital-
audio/oscillators/wavetable-oscillators/)

[3]
[http://www.kvraudio.com/forum/viewforum.php?f=33](http://www.kvraudio.com/forum/viewforum.php?f=33)

[4] [https://github.com/mbrucher/AudioTK](https://github.com/mbrucher/AudioTK)

[5] [http://musicdsp.org/](http://musicdsp.org/)

~~~
pault
Meta: what happened to comment favorites? Wasn't this feature recently added?
I always come across link lists like this and want to save them, but I'm too
lazy/busy to put them in a bookmark manager. Oh well. Nice comment, thanks for
the resources. :)

~~~
squeaky-clean
I can only see it when I click on the "X hours ago" link on a comment. Does it
appear for you then? Also thank you!

~~~
pault
Found it, thanks :)

------
mikroondas
I know the guy who created this language. He is both passionate of programming
and music. Very cool guy. To try the power of Faust. Check
[http://faust.grame.fr/faustplayground](http://faust.grame.fr/faustplayground)

------
adamnemecek
If this tickles your fancy, you should also check out AudioKit an (mac|i|tv)OS
framework for doing something similar.

[https://github.com/audiokit/AudioKit](https://github.com/audiokit/AudioKit)

~~~
gcb0
the goal on faust seems to be portability... im not involved though so cant
say for sure

------
ttflee
I was amazed to attend a seminar on Faust by Yann Orlarey in Beijing last
summer. I was the only one in that room who had a programming background and
happened to know a little bit of functional programming.

------
gcb0
> For all these audio platforms you may have to install the related SDK and/or
> development libraries.

what have put me off from developing on top of VST is that there is no decent
multi platform sdk for it. i though this was the solution, but it only adds a
convenience layer for the code, not for VST hell :(

~~~
jarmitage
you can embed faust projects inside JUCE projects. here's one example:

[https://github.com/olilarkin/juce_faustllvm](https://github.com/olilarkin/juce_faustllvm)

------
tolmark12
Very cool, any chance faust could be used to generate LV2 plugins?

~~~
programLyrique
It can:
[http://lac.linuxaudio.org/2013/papers/16.pdf](http://lac.linuxaudio.org/2013/papers/16.pdf)

