dubphil@free.fr writes:
> I want to setup a sound system with linux. For this, I need an app that
OK, yet another solution, now with my absolute favourite "modular". Since
Pd is mentioned on lists so often, I figured I should do some counter-PR
for SuperCollider :-)
The program below for SuperCoolider will do the splitting for you,
channels SuperCollider:out_1 through out_8 will have the 4 stereo
channels, and since we are in a modern age, you can control the split
points and gain via OSC :-) (MIDI would be possible to do from within SC3
too, its very simple)
The SC code:
s.waitForBoot {
n=SynthDef(\splitter, {|low=300, mid=2000, high=8000,
lgain=1.0, lmgain=1.0, mhgain=1.0, hgain=1.0|
var signal, l, lm, lmc, mh, mhc, h;
signal = AudioIn.ar([1,2]);
l = LPF.ar(signal, low, lgain);
lmc = low+(mid-low/2);
lm = BPF.ar(signal, lmc, (mid-low) / lmc, lmgain);
mhc = mid+(high-mid/2);
mh = BPF.ar(signal, mhc, (high-mid) / mhc, mhgain);
h = HPF.ar(signal, high, hgain);
Out.ar(0, [l, lm, mh, h].flat)
}).play(s);
OSCresponder(nil, '/split', {|time, responder, msg|
n.setn(\low, msg[1..7])
}).add;
}
And here is some little piece of C code using liblo (hey steve, this stuff
rocks!) to control the 7 parameters via OSC from command-line (you could as
well control them in real-time from within SC itself)
#include
#include
#include
#include "lo/lo.h"
int main(int argc, char *argv[])
{
lo_address t = lo_address_new(NULL, "57120");
if (lo_send(t, "/split", "fffffff", atof(argv[1]), atof(argv[2]), atof(argv[3]), atof(argv[4]), atof(argv[5]), atof(argv[6]), atof(argv[7])) == -1) {
printf("OSC error %d: %s\n", lo_address_errno(t), lo_address_errstr(t));
}
return 0;
}
(gcc -o split_client split_client.c -llo)
Compile this, and call it like this:
./split_client 120 1200 12000 0.5 1.0 2.0 4.0
> Does this kind of apps should take a long time to be developped ?
Took me about 20 minutes :-)
Whats left is you need to connect the ports to something like jack-rack,
this could also be automated from SC be telling the server which jack
ports to connect to. Alternatively, if the effects you need can be implemented
with SC3 Unit Generators, you might even be able to do it all inside
SC3.
http://supercollider.sourceforge.net/ http://www.audiosynth.com/
--
CYa,
Mario
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.