You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
763 B
31 lines
763 B
s.boot;
|
|
|
|
// load instrument and create NDef
|
|
(
|
|
var perc_gen_source = (("SC_ALGS_PATH".getenv)+/+"synths/perc_gen/instr.scd").load;
|
|
~perc_gen_dict = NodeDictionary.newFrom(perc_gen_source);
|
|
~perc_gen_dict.makeSourceNDef();
|
|
)
|
|
|
|
// apply specs from dictionary
|
|
~perc_gen_dict[\specs].keysValuesDo({|k, v| Ndef(~perc_gen_dict[\name]).addSpec(k, v);});
|
|
|
|
Ndef(~perc_gen_dict[\name]).edit;
|
|
Ndef(~perc_gen_dict[\name]).play;
|
|
|
|
p = NdefPreset(Ndef(~perc_gen_dict[\name]));
|
|
w = Window("Preset test", Rect(200, 200, 420, 350)).front;
|
|
w.addFlowLayout;
|
|
g = ProxyPresetGui(p, parent: w);
|
|
b = NdefGui(Ndef(~perc_gen_dict[\name]), 8, parent: w);
|
|
|
|
// Run periodical trigger
|
|
Tdef(\t, {
|
|
loop {
|
|
Ndef(~perc_gen_dict[\name]).set(\gate, 1);
|
|
1.wait;
|
|
}
|
|
}).play;
|
|
|
|
Ndef.clear;
|
|
Tdef.clear; |