[linux-audio-dev] Blockless processing

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Blockless processing
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Fri Dec 13 2002 - 00:22:11 EET


I couldn't resist it so I hacked up a quick script to try the blockless,
dynamicly compiled processing we were discussing the other day.

http://plugin.org.uk/blockless/

just "make" if you want to test it
Its really hacky insomnia perl code, so dont look at it ;)

It works by defining graphs (.g), that are made up of atoms (C code) and
other graphs. The perl script turns it all into one giant lump of C and
builds it.

Graph files look like eg (pinknoise.g):

noise n(); // declares an instance n
zm1 d();
mix2to1 m();
gain half(0.5f);

n:out -> m:in1; // connect the 'out' port of n to the 'in' port of m
n:out -> d:in;
d:out -> m:in2;

m:out -> half:in;

half:out -> this:out; // an output from this module to the parent graph

I went as far as defining a biquad filter in the graph format
(http://plugin.org.uk/blockless/blockless/modules/biquad.g), but it
dosen't quite work because the execution order is more or less random.

I used the biquad in a simple toplevel graph
(http://plugin.org.uk/blockless/blockless/graphs/test4.g), it takes about
50 cycles per sample on PIII (interestingly its compiles to slightly worse
code in gcc3.2), the source my script produces is very tangled and
funtion-y, but gcc manages to untagle it and inline it all, eg.
http://plugin.org.uk/blockless/blockless/intem/test4.c

Its too much work to create a reasonably complex synth or anything in this
as theres no UI and keeping all the links straight in your head is
painful, so I dont know how well it scales up.

Its quite cool building up modules from gain and z^-1 units though :)

- Steve


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Dec 13 2002 - 00:26:30 EET