[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] TaskProxyGui
Hi sven,
ok, is this what you meant?
( // 4 tdefs
Tdef(\a, { \a.postln });
Tdef(\Abe, { \Abe.postln });
Tdef(\bebe, { \bebe.postln });
Tdef('01otto', { '01otto'.postln });
// a gui for all of them
t = TdefAllGui.new();
// that gui listens to the keyboard:
// when the first letter matches with the tdefs name,
// start or stop that tdef.
// as long as all your tdefs start with different letters,
// this is unambiguous.
t.win.view.keyDownAction_ { |view, char|
var tdefkey, tdef;
char.postcs;
tdefkey =
Tdef.all.keys.asArray.sort.detect { |key|
key.asString.first == char };
tdef = Tdef.all[tdefkey];
if (tdef.isPlaying) { tdef.stop } { tdef.play };
};
)
best, a
Am 16.12.2007 um 17:34 schrieb Alberto de Campo:
Hi sven,
looks like you have a pretty old version of this class.
The current one is TaskProxyEditor, and does not have a
btns variable.
what should it do exactly?
assining the buttons to keys (e.g. button0 ->
key "0", button1 -> key "1", etc.)
it´s fun to play it like this :)
don´t know, if this makes sense ...
cheers, sven
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users
--
--
Alberto de Campo
Bergstrasse 59/33
A-8020 Graz, Austria
e-mail : decampo@xxxxxx
--