[Sc-devel] Embedding Specs in SynthDefs
Scott Wilson
sdwilson at wesleyan.edu
Sun Jul 29 12:03:57 PDT 2007
On 29 Jul 2007, at 03:22, James Harkins wrote:
> A couple of other things I thought of:
>
> 1- Would it be worthwhile to suppress the control spec data when
> creating a synthdef binary stream that is not going to be saved on
> disk? Oh wait, you already answered that question... fine with me,
> if we don't have to include client only data in server messages.
Yes, there's no sense in including it if it's not needed.
BTW, looking through the synthdef parsing code there's no need for
any extra complication from what I can see. If specs go last in
scsyndef files it can just stop parsing at the point.
>
> 2- How will specs be associated with arguments? Instr uses simple
> array ordering, but I doubt that would be sufficient for this
> because of Control.names... in which case, association by name
> could also be tricky because there is no guarantee that every
> control will have a unique name.
>
> 3- SynthDef.wrap? There, you will have multiple Control UGens.
>
> 2 and 3 should not be taken as objections, just cases to consider.
My initial instinct would be to use array ordering when specifying,
but probably to store the specs in the file in the same way as
parameter names are stored: with an index to the corresponding
parameter in the parameter array. For the Control.names case it might
be simplest to copy the spec if desired, since I think that's the
exception rather than the rule, but perhaps there's some clever way
of referring to another spec that would save having to have a
numberOfParametersToWhichThisSpecApplies value stored for every spec.
So something like
indexInParamArray, spec1...
indexInParamArray, special flag and ref to spec1
Either way I think that would take care of 2 and 3.
S.
More information about the Sc-devel
mailing list