2015-09-09 14:03:24 +02:00
|
|
|
/*
|
2015-09-09 15:13:45 +02:00
|
|
|
This file is part of "Interface Fractures III - Silicon".
|
2015-09-09 15:18:56 +02:00
|
|
|
Copyright (c) 2015 Luka Prinčič, All rights reserved.
|
2015-09-09 15:13:45 +02:00
|
|
|
This program is free software distributed under
|
|
|
|
GNU General Public Licence. See COPYING for more info.
|
|
|
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2015-09-09 14:03:24 +02:00
|
|
|
|
|
|
|
gui_main.scd - responsible for GUI elements under
|
|
|
|
the 'main' tab ...
|
|
|
|
|
|
|
|
********************************************************** */
|
|
|
|
|
|
|
|
|
|
|
|
~tab_views[~tab_names.at("main")].layout = HLayout(
|
|
|
|
|
|
|
|
nil,
|
|
|
|
|
2015-09-10 21:41:57 +02:00
|
|
|
HLayout(
|
2015-09-09 14:03:24 +02:00
|
|
|
|
|
|
|
nil,
|
|
|
|
Button()
|
|
|
|
.states_([
|
|
|
|
["Clock"],
|
|
|
|
["Clock", Color.gray(0.2), Color.grey(0.8)] ])
|
|
|
|
.mouseDownAction_({ | state |
|
|
|
|
switch(state.value,
|
|
|
|
0, {
|
|
|
|
postln("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
|
|
|
|
postln("~~~ starting clock!");
|
|
|
|
TempoClock.default.sched(0, ~mainTimeline);
|
|
|
|
~mainTimeline.reset;
|
|
|
|
},
|
|
|
|
1, {
|
|
|
|
postln("\n~~~ stopping clock!");
|
|
|
|
~mainTimeline.stop;
|
|
|
|
//~mainTimeline.reset;
|
|
|
|
postln("~~~ some synths might still be running");
|
|
|
|
}
|
|
|
|
);
|
|
|
|
})
|
|
|
|
.minHeight_(70).minWidth_(70),
|
2015-09-24 09:28:56 +02:00
|
|
|
nil,
|
|
|
|
|
|
|
|
Button().minHeight_(70).minWidth_(70)
|
|
|
|
.states_([ ["draw Spectrum"], ["draw Spectrum", Color.gray(0.2), Color.grey(0.8)] ])
|
|
|
|
.mouseDownAction_({ | state |
|
|
|
|
switch(state.value,
|
|
|
|
0, { postln("~~~ draw Spectrum on!");
|
|
|
|
~zarquOsc.sendMsg("/sc", "drawSpectrumToggle", 1); },
|
|
|
|
1, { postln("~~~ draw Spectrum off!");
|
|
|
|
~zarquOsc.sendMsg("/sc", "drawSpectrumToggle", 0); }
|
|
|
|
);
|
|
|
|
}),
|
2015-09-09 14:03:24 +02:00
|
|
|
|
2015-09-10 21:41:57 +02:00
|
|
|
Button().minHeight_(70).minWidth_(70)
|
|
|
|
.states_([ ["Test pattern"], ["Test pattern", Color.gray(0.2), Color.grey(0.8)] ])
|
|
|
|
.mouseDownAction_({ | state |
|
|
|
|
switch(state.value,
|
|
|
|
0, { postln("~~~ test pattern on!");
|
|
|
|
~zarquOsc.sendMsg("/sc", "testPatternToggle", 1); },
|
|
|
|
1, { postln("~~~ test pattern off!");
|
|
|
|
~zarquOsc.sendMsg("/sc", "testPatternToggle", 0); }
|
|
|
|
);
|
|
|
|
}),
|
2015-09-09 14:03:24 +02:00
|
|
|
|
2015-09-10 21:41:57 +02:00
|
|
|
Button().minHeight_(70).minWidth_(70)
|
|
|
|
.states_([ ["Test picture"], ["Test picture", Color.gray(0.2), Color.grey(0.8)] ])
|
|
|
|
.mouseDownAction_({ | state |
|
|
|
|
switch(state.value,
|
|
|
|
0, { postln("~~~ test picture on!");
|
|
|
|
~zarquOsc.sendMsg("/sc", "testPictureToggle", 1); },
|
|
|
|
1, { postln("~~~ test pattern off!");
|
|
|
|
~zarquOsc.sendMsg("/sc", "testPictureToggle", 0); }
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
nil
|
|
|
|
),
|
|
|
|
nil
|
|
|
|
);
|
2015-09-09 14:03:24 +02:00
|
|
|
|