[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Some 3.3 work

Julian, Josh,

Yes, I was simply trying to re-activate the original discussion:

I think it would be pretty cool in order to ensure patching facilities




On 17 Dec 2008, at 20:53, Josh Parmenter wrote:

Hmm... except, this doesn't really solve the problem (at least in my mind). What I thought of in relation to this when we talked about it sometime ago was that something like this would work:

SynthDef(\test, {arg out = 0, freq, mul = 0.1;
Out.ar(out, SinOsc.ar(freq, 0, mul))

a = Synth.new(\test, [\freq, 440]);

b = Synth.new(\test, [\freq, 200, \mul, 440 * 4, \out, 10]);

// set the freq input to the audio bus 10
// this is a made up syntax, just to illustrate what I though the idea was
a.mapToAudio(\freq, 10);

Is this what you meant Andrea? I started thinking about how to do this some time ago, and came up with a few ideas...

1) make all Busses part of the same structure (no audio or control per se).
2) Make the first portion (let's say, busses 0 -127) audio, therefore arrays (pointers) of s.options.blockSize
3) make the rest (let's say 128 - 4096) single values (just like the current control busses)
... here is where I don't know how to solve the problem ...
4) Make Control a UGen that outputs its rate (based on bus number) and either the audio signal OR a scaler.
5) 4 (above) causes problems - another possible idea is to make Control always output blockSize samples, either  as its audio output, or as linearly interpolated control data (doing the work that the input UGen would be doing otherwise - other UGens then see all Control UGens as audio data - which is a problem as well). Control.names gets iffy.
6) Maybe make all args to a SynthDef a special kind of Control (.ar?) that behaves as above, but you can still create Control.names.kr UGens in the SynthDef by hand?
7) OR - make the default control be as it is now, but the user can specify a rate in the rates part of the SynthDef, making the above:

SynthDef(\test, {arg out = 0, freq, mul = 0.1;
Out.ar(out, SinOsc.ar(freq, 0, mul))
}, [nil, \ar, nil]).send(s);

Now - freq is a Control that takes care of things as described in option 5 above, while the others are just the normal Controls that a SynthDef wraps all args in.

I believe changes in Bus would prevent code breakage with the renumbered bus approach. The only code I can really see breaking is hard coded control and audio bus ids (since there would no longer be things like control bus '0')... or maybe that step isn't necessary? Though I don't see any other way for the Control.ar method to know whether a bus is audio or control (other then doing a < check on the id).



On Dec 17, 2008, at 10:03 AM, Julian Rohrhuber wrote:

Just to know and to bring some ideas from a user pov:

- What about mapping audio buses as synth controls for 3.3?

here is a solution, a bit of a hack, but works as long as there is no change in the synthDef format.

q = ();
q.audioBusses = Bus.control(s, s.options.numAudioBusChannels);
q.mapAudio = { |q, node, key, bus|
node.set(key, bus);
q.audioControl = { |q, key, numChannels|
In.ar(Control.names(key).kr(0), numChannels)

a = {
SinOsc.ar(q.audioControl(\freq, 2)) * 0.1


b = { Out.ar(62, LFNoise2.ar(1.dup).exprange(800, 1700)) }.play;

q.mapAudio(a, \freq, 62);

I'll see if I can implement it in JITLib, so that it can be used easily.


sc-dev mailing list

/* Joshua D. Parmenter

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono

sc-dev mailing list

Andrea Valle
Università degli Studi di Torino

- La Repubblica promuove lo sviluppo della cultura e la ricerca scientifica e tecnica.
- La Repubblica detta le norme generali sull'istruzione ed istituisce scuole statali per tutti gli ordini e gradi.
(Costituzione della Repubblica Italiana, art. 9 e 33)