[linux-audio-dev] Re: Writing LADSPA plugins in high level language?

Albert Graef Dr.Graef at t-online.de
Thu Jun 15 19:07:35 UTC 2006


> On Thu, Jun 15, 2006 at 08:53:11AM -0400, Paul Davis wrote:
>>faust, btw, has no concept of a timeline in the sense that chuck does.

No, that's right. As I pointed out elsewhere in this thread, Faust is a 
language for programming ugens, not for managing sequences and 
playlists. We're talking about different levels of an audio processing 
system here.

Alfons Adriaensen wrote:
> One could in theory contruct a language that knows the concept of a 
> 'period' of frames, and that allows you to write audio code and be
> oblivious of the fact that is in fact processed in chunks of N frames,
> that you have to maintain state between callbacks, etc.

This is what Faust actually does. At the language level, it provides the 
illusion of working with infinite streams of audio samples (or, 
mathematically speaking, real-valued functions of discrete time) so that 
you don't have to worry about the state which has to be kept between 
different blocks, the compiler will take care of that for you.

> But you can
> only hide these things up to a certain point. When you write some
> code that maps badly onto the current period size, then either it
> will be be very inefficient, have horrible latency, or the language
> will just fail.

Right. That's why the C code generated by Faust is essentially just the 
bare-bones block processing callback which takes the actual block size 
and the audio buffers as parameters. It's up to the different 
"architectures" to decide how this routine is actually used in a manner 
which is optimal with regard to a given "host system", be it Jack, 
LADSAP, VST, SuperCollider or whatever.

Of course any domain-specific high-level language has its trade-offs of 
convenience vs. implementation overhead vs. limits of the domain model. 
This is hard to get right for low-level DSP programming because 
efficiency is of utmost importance, but I think that Faust does this 
pretty well. The only roadblock right now is that it is not suitable for 
multirate processing yet, but Yann is working on that. Fons, I hope that 
with your experience as a seasoned DSP programmer you will try Faust 
some time; I think you might like it, and your feedback will surely be 
valuable. :)

Albert

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the Linux-audio-dev mailing list