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

Re: [sc-users] Controlling amp in Task controlled Synths



Or... place all the synths that you want to respond to a slider in the same Group, then send the message to change the amp parameter to the Group.

Josh

******************************************
Joshua D. Parmenter
http://homepage.mac.com/joshpar/

"...Some people think a composer's supposed to please them, but in a way a composer is a chronicler... He's supposed to report on what he's seen and lived." -Charles Mingus

On Aug 30, 2005, at 3:08 PM, James Harkins wrote:

Allocate a control bus and write the slider values onto the control bus.

c = Bus.control(s, 1);
d = "c" ++ c.index;

Then, when you create the synths, set the amp like this:

Synth(..., [\freq, rrand(1, 1000), \amp, d]);

Every synth will then read the amp value from the control bus.

PS Another plug for my library -- Voicer has a mechanism to do this
automatically. One of those things that's really useful for
musicmaking that new users struggle with, but already has an easy
implementation outside the "standard" language definition.

v = Voicer(10, \sinosc);
g = v.mapGlobal(\amp, nil);

slider.action_({ g.set(slider.value) });

v.trigger(rrand(1, 1000)...);

PPS It's a VERY VERY BAD IDEA to set up the GUI objects in the middle
of your synthdef. It "works" in simple cases, but it shows that you
have some misunderstanding about what happens on the server and what
happens on the client. I'd suggest reviewing the client and server
help files, because this misunderstanding will come back to haunt you
laterwhen you're doing something more complicated.

hjh

On 8/30/05, Ricardo Guerreiro <rg@xxxxxxx> wrote:

Hello,

I'm trying to manually control the amplitude of a Synth controlled by a Task. But obviously the slider cannot find the nodes created by the Task.


--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users