Hacker News new | past | comments | ask | show | jobs | submit login
Faust – A language for audio applications and plugins (github.com/grame-cncm)
116 points by jarmitage on Nov 22, 2016 | hide | past | favorite | 27 comments



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.


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 [1] http://sonicbirth.com/ [2] https://github.com/olilarkin/wdl-ol


faust seems to be far away from VST visual creators.


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/


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.


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.


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.


readme claims to handle regular VSTi too. but my guess is that a note/channel a time fits better in the functional language paradigm they choose.


Your not misreading. VST has stereo and mono because somethings just need mono (For example a kick drum you just throw a mono plugin compressor and eq and save the head space). Every cycle you can save is important if you have anything besides a simple project.

In fact when I master a lot of times I throw two mono plug ins on left and right just to get a better idea whats going on in each channel. There is a ton you can do with them.


missed VSTi


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


I reference this one a lot, http://www.music.mcgill.ca/~ich/classes/dafx_book.pdf, and have enjoyed it. I get lost in some of the math, but it's very thorough and practical. It was also personally reccommended by the guys at Goodhertz, and they seem to know what they're doing.


I've not read this myself but I've seen The Audio Programming Book[0] cited frequently in "Where do I start with audio programming?" questions.

[0]https://www.amazon.com/Audio-Programming-Book-MIT-Press/dp/0...


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/

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

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

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

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

[5] http://musicdsp.org/


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. :)


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!


Found it, thanks :)


If you get stuck in the math, sites like BetterExplained are really helpful.

https://betterexplained.com/articles/an-interactive-guide-to...


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


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


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


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.


> 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 :(


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

https://github.com/olilarkin/juce_faustllvm


JUCE is not decent?


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





Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: