Well, here’s what I get with your example after recompiling:
compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
ERROR: Message 'at' not understood.
RECEIVER:
nil
ARGS:
Symbol 'thisCanHappen'
PROTECTED CALL STACK:
Meta_MethodError:new 0x562542cd9a40
arg this = DoesNotUnderstandError
arg what = nil
arg receiver = nil
Meta_DoesNotUnderstandError:new 0x562542cdbd80
arg this = DoesNotUnderstandError
arg receiver = nil
arg selector = at
arg args = [ thisCanHappen ]
Object:doesNotUnderstand 0x562542860940
arg this = nil
arg selector = at
arg args = nil
Meta_ControlName:new 0x562541088a00
arg this = ControlName
arg name = bufnum
arg index = 0
arg rate = control
arg defaultValue = 0
arg argNum = 0
arg lag = 0
SynthDef:addKr 0x5625473a1a40
arg this = SynthDef:grain
arg name = bufnum
arg values = 0
arg lags = 0
ArrayedCollection:do 0x562541acae80
arg this = SymbolArray[ bufnum, t_trig, start, end, out, rate, tempo, atk, sust, rel, curve, gate, grainAmp ]
arg function = a Function
var i = 0
SynthDef:addControlsFromArgsOfFunc 0x56254739ecc0
arg this = SynthDef:grain
arg func = a Function
arg rates = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
arg skipArgs = 0
var def = < closed FunctionDef >
var names = SymbolArray[ bufnum, t_trig, start, end, out, rate, tempo, atk, sust, rel, curve, gate, grainAmp ]
var values = [ 0, 0, 0, 1, 0, 1, 1, 0.1, 1, 0.7, -4, 1, 1.0 ]
var argNames = SymbolArray[ bufnum, t_trig, start, end, out, rate, tempo, atk, sust, rel, curve, gate, grainAmp ]
var specs = nil
SynthDef:buildUgenGraph 0x56254739e740
arg this = SynthDef:grain
arg func = a Function
arg rates = nil
arg prependArgs = [ ]
var result = nil
var saveControlNames = nil
a FunctionDef 0x56254739cd80
sourceCode = "<an open Function>"
Function:prTry 0x562545695680
arg this = a Function
var result = nil
var thread = a Thread
var next = nil
var wasInProtectedFunc = false
CALL STACK:
DoesNotUnderstandError:reportError
arg this = <instance of DoesNotUnderstandError>
Nil:handleError
arg this = nil
arg error = <instance of DoesNotUnderstandError>
Thread:handleError
arg this = <instance of Thread>
arg error = <instance of DoesNotUnderstandError>
Object:throw
arg this = <instance of DoesNotUnderstandError>
Function:protect
arg this = <instance of Function>
arg handler = <instance of Function>
var result = <instance of DoesNotUnderstandError>
SynthDef:build
arg this = <instance of SynthDef>
arg ugenGraphFunc = <instance of Function>
arg rates = nil
arg prependArgs = nil
Meta_AbstractSNSampler:initClass
arg this = <instance of Meta_AbstractSNSampler>
Meta_Class:initClassTree
arg this = <instance of Meta_Class>
arg aClass = <instance of Meta_AbstractSNSampler>
var implementsInitClass = nil
ArrayedCollection:do
arg this = [*739]
arg function = <instance of Function>
var i = 156
Meta_Class:initClassTree
arg this = <instance of Meta_Class>
arg aClass = <instance of Meta_Object>
var implementsInitClass = nil
Process:startup
arg this = <instance of Main>
var time = 130.598814166
Main:startup
arg this = <instance of Main>
var didWarnOverwrite = false
^^ ERROR: Message 'at' not understood.
RECEIVER: nil
I don’t know what you’re trying to achieve but I dare to say it’s conceptually wrong. I’ve been using SuperCollider for some 16 years or so now and I still love it for its elegance and its basic concepts. Though I’m no programmer I’ve been able to write complex programs which I’m still using. I’d say don’t try to work against those concepts - it’s all quite nicely laid out and you can achieve a lot if you follow what’s already there. Sorry, I think I can’t help with that problem.