createSynthMessage

25 views
Skip to first unread message

Coma

unread,
Aug 12, 2012, 3:01:22 PM8/12/12
to supercollider-an...@googlegroups.com
Hi,
I was wondering how I could create a new synth that has a finite duration and set the controls right at the moment when I'm creating the Synth. In supercollider I guess it would be something like:

a = Synth("ping",[\freq, 500]);

In my android project I use:

superCollider.sendMessage( OscMessage.createSynthMessage(tempRing.getSynth(), this.id, 0, 1));

Where tempRing.getSynth() returns a string with the name of the synth I wish to play.

Is it possible? This synth is (as it's name says) a short ping that free's itself after finishing (doneAction:2).

p.s. I'm a complete SC noob

Dan Stowell

unread,
Aug 13, 2012, 4:18:55 AM8/13/12
to supercollider-an...@googlegroups.com
Hi -

createSynthMessage() is a convenience function really, and as you
noticed, it doesn't include code to set the synth controls even though
supercollider's interface allows for it.

If you look at the code of createSynthMessage() you can see how it
very simply creates an osc message as a sequence of items. Then if you
look at the documentation of "/s_new"
<http://danielnouri.org/docs/SuperColliderHelp/ServerArchitecture/Server-Command-Reference.html>
you'll see that controls can be set by adding pairs to the end of that
sequence, in the form [control index, control value]*

So you could make your own modified version of createSynthMessage(),
or feel free to send us a pull request

HTH
Dan


2012/8/12 Coma <guill...@gmail.com>:
--
http://www.mcld.co.uk
Reply all
Reply to author
Forward
0 new messages