Hello everybody,
if it can help someone, I made a function to list all the parameters from your SynthDefs and declare them in Tidal.
This function actually generate the code in the SuperCollider Post window, you have to copy/paste the code in your bootTidal.hs (with the "let" or without depend on your needs, feel free to remove it).
In the first place I use to do this with SuperDirt.postTidalParameters(aSynthDefList);
but the code generate by this isn't usable directly in bootTidal.hs for some reasons (maybe parenthesis), and the list of predefined parameters (parameters exclude for avoid collisions) is not complete:
#[\pan, \amp, \out, \i_out, \sustain, \gate, \accelerate, \gain, \overgain, \unit, \cut, \octave, \offset, \attack];
so I used another one.
Execute this in SuperCollider:
~tidalScopeTotalCodeGen = { arg key = "", targetSearch = 2; // look for SynthDef names which contain key at position define by targetSearch and generate the code to declare args in tidal
var code, presentCtrl/*, targetSynths*/;
code = "let ";
presentCtrl = List.new;
// targetSynths = List.new;
key = key.asString;
SynthDescLib.global.synthDescs.do({ arg item;
var name, nameSize, keySize, start, end;
name = item.name.asString;
nameSize = item.name.size;
keySize = key.size;
switch(targetSearch,
0, { // search at the begining
start = 0;
end = keySize;
},
1, { // search everywhere
start = 0;
end = nameSize;
},
2, { // search at the end
start = nameSize - keySize;
end = nameSize;
},
{ // default function search at the end
start = nameSize - keySize;
end = nameSize;
}
);
if(key.matchRegexp(name, start, end), {
item.controls.do{ arg control;
var controlName, controlNameLower;
controlName = control.name.asString;
controlNameLower = controlName.toLower;
if ((#["?", "slide", "speed", "spread", "legato", "octave", "unit", "accelerate", "loop", "offset", "nudge", "lfo", "rate", "size", "room", "dry", "cut", "cutoff", "resonance", "n", "freq", "note", "degree", "harmonic", "delay", "pan", "gain", "overgain", "lpf", "hpf", "attack", "att", "decay", "sustain", "hold", "sus", "release", "rel", "span", "out", "i_out", "in", "i_in", "input", "output", "inbus", "outbus", "doneaction", "done", "gate", "t_gate", "trig", "t_trig"].includesEqual(controlNameLower).not and: presentCtrl.includesEqual(controlName).not), {
code = code ++ controlName ++ " = pF \"" ++ controlName ++ "\"\n ";
presentCtrl.add(controlName);
});
};
// targetSynths.add(name.asSymbol);
});
});
// SuperDirt.postTidalParameters(targetSynths);
Post << code;
};
~tidalScopeTotalCodeGen.value;