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

[sc-dev] [approve?] ObjectSpec

I'm finding that I frequently have a need to pass a static object (not a legit synthdef arg) when building a Patch *and* I want a way to specify a default object in the specs. Hence:

ObjectSpec : Spec {
var <>object;
*new { |obj|

// allows any object to be specified as a default in a patch
defaultControl {

I'm using this for arrays, even functions to specify part of a ugengraph at patch-build time (such as, providing a complex filter structure in the Instr and letting the user override the default exciter). In the latter case, if there is no default exciter, patch building is unsuccessful unless the user gives one, so it's an important CYA move.

OK to add?


H. James Harkins /// dewdrop_world

"If attacked by a lion, thrust your arm down his throat.
This takes some practice." -- Cyril Connolly