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

Re: [sc-dev] [crucial] Patch adds non-control arguments to argsForSynth arrays




On Thu, Dec 18, 2008 at 5:01 AM, James Harkins <jamshark70@xxxxxxxxx> wrote:
I think its valid and actually any SynthDef could/should support it. that way whenever somebody tries to pass in an Env or wants a quantity they can do so without having to say "oh for that you'll need to use Patch/Instr ... "

I'm not sure about that. SynthDef is a layer of abstraction whose (sole, I would argue) job is to make scsyndef binary representations.

but this is simply passing in some arguments in order to make that synth def, but that don't become arguments to the synth.

that's not too much of a stretch



To take the discussion in kind of a different direction -- I've been mulling over what to do with my use of instr/patch. I actually use its patching capabilities relatively little, preferring instead to get a single synthdef to trigger with patterns or by Voicer.

right, you only use Patch to build Instr into SynthDefs

its primarily the Instr library that you use, but you are free (and it would be generally useful) to build other InstrSynthDef making classes.  just preserve the Instr format.

you are continually having problems because you aren't doing a hack by using Patch to build synth defs.

builder functions are great and can be a great place to be creative.
when you are bored with one, just throw it away.
but then Instr is simple
Patch is concentrated on its responsibilities

anything else can be written to make use of these things and that increases overall flexibility and I would welcome it.




** For instance, if I want one control to be built with no Lag while the rest have lags, I have to put a KrNumberEditor(value, spec).lag_(nil) into the patch input list.

from the viewpoint of using a Patch, its the responsibility (and power) of the object being inputed there.

you are looking at things still as "I'm getting Patch to build what I want" and then trying to find an object that will represent what you want.

you could build a synth def builder that takes any argument system you want

InstrBuilder( instrname,
(
lfo: [ \ir, 2.0 ], // default value 2
freq: [ \kr, 400.0, nil], // default 400.0, no lag
amp: nil // infer everything from the instr spec
)
).asSynthDef

it might (if its simple) end up being a nice way that even Patch would then use it to do the building.



- Difficulty in addressing arguments by name.

Patch.set( allows an integer or a symbol

Instr could do the same for all the at methods

just write one conversion/lookup method