hi daniel,
I'm not really interested in the default values. what I want is to asynchronously take snapshots of the events values as they unfold. so far I'm using this function that I believe you shared with the list a while ago:
var get_control_values = { |synth|
var event = ();
var desc = SynthDescLib.global[synth.defName.asSymbol];
desc.notNil.if {
desc.controls.do {
|ctl|
if( ctl.name != '?', {
if( ctl.numChannels > 1, {
synth.getn(ctl.name, ctl.numChannels, {
|v|
event.put(ctl.name, v)
})
},
{
synth.get(ctl.name, {
|v|
event.put(ctl.name, v)
} );
});
} );
};
};
event;
};
a = Synth(\default);
b = get_control_values.(a)
b.postln;
now with Pbind I know the SynthDef's name but I don't know how to obtain a
handle to the Synth.
thanks a lot for helping out.
::: sam :::
On Sun, 16 Dec 2018 00:28:51 +0100 sc-users@xxxxxxxxxxxxxxxx said
> Hi,
>
> if you're not setting with Pbind there will be the default args and you can
> get them like this:
>
> SynthDescLib.global[\default].controlDict.collect(_.defaultValue)
>
> // equivalent
>
> SynthDescLib.global[\default].controlDict.collect { |x| x.defaultValue }
>
> // or
>
> SynthDescLib.global[\default].controls.collect { |x| x.name -> x.defaultValue
> }
>
> So there's no need to track the synths (except you're somehow controlling
> them otherwise)
>
> Regards
>
> Daniel
>
> -----------------------------
> http://daniel-mayer.at [5]
> -----------------------------
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/