Re: Building a Racket client for SC

[email protected]
Newsgroups gmane.comp.audio.supercollider.user
Message-ID <CAFniQ7VZoq+G12Pz+tTbn1djiQ52pXMw9r-E538VqH6j79d0ww@mail.gmail.com>
On Mon, Mar 1, 2021 at 9:25 PM <[email protected]> wrote:
> I guess there's no way to make all parameters susceptible to modulation other than creating an In ugen for all of them, but that might introduce a performance penalty.

"/n_map" is your friend here.

// just defining normal Controls, nothing special
a = { |freq = 440, amp = 0.1| SinOsc.ar(freq, 0, amp).dup }.play;

~fbus = Bus.control(s, 1);
~fbus.set(440);
a.map(\freq, ~fbus);

b = { LFDNoise3.kr(LFDNoise3.kr(8).exprange(1, 500)).exprange(220,
880) }.play(outbus: ~fbus);

~abus = Bus.control(s, 1);
~abus.set(0.1);
a.map(\amp, ~abus);

c = { SinOsc.kr(LFDNoise3.kr(1).exprange(0.1, 100)) * 0.1 }.play(outbus: ~abus);

... and now both parameters are modulated at control rate, without any
modification to the original synth.

// clean up
[a, b, c, ~fbus, ~abus].do(_.free);

The devil is in the details, particularly to make it completely
transparent, but control buses are CPU cheap.

hjh

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.