|
|
@ -1,7 +1,7 @@
|
|
|
|
(
|
|
|
|
(
|
|
|
|
//~~FUNCTION THAT GENERATES THE GUI
|
|
|
|
//~~FUNCTION THAT GENERATES THE GUI
|
|
|
|
~generateGUI = {
|
|
|
|
~generateGUI = {
|
|
|
|
var win, clockStringFunc, masterView, faderViews, tabs;
|
|
|
|
var win, clockStringFunc, metronomeStringFunc, metronomeColorFunc, masterView, faderViews, tabs;
|
|
|
|
var tabButtonReset, masterButton, guitarOButton, guitarIButton, percButton, ensembleButton, accompButton, startPos = 0;
|
|
|
|
var tabButtonReset, masterButton, guitarOButton, guitarIButton, percButton, ensembleButton, accompButton, startPos = 0;
|
|
|
|
var groupNames = ["guitar - ostinato", "guitar - interrupt", "percussion", "interrupt highlights", "fields / beats / flicker"], groupAbbr = ["go", "gi", "p", "e", "a"];
|
|
|
|
var groupNames = ["guitar - ostinato", "guitar - interrupt", "percussion", "interrupt highlights", "fields / beats / flicker"], groupAbbr = ["go", "gi", "p", "e", "a"];
|
|
|
|
var accompNames = ["brown noise", "white noise", "sine beating", "flicker"];
|
|
|
|
var accompNames = ["brown noise", "white noise", "sine beating", "flicker"];
|
|
|
@ -18,16 +18,17 @@
|
|
|
|
masterVolGroups = [0.8, 0.8, 0.8, 0.8, 0.8];
|
|
|
|
masterVolGroups = [0.8, 0.8, 0.8, 0.8, 0.8];
|
|
|
|
|
|
|
|
|
|
|
|
clockStringFunc = {
|
|
|
|
clockStringFunc = {
|
|
|
|
arg div, metronome = true;
|
|
|
|
arg div;
|
|
|
|
var min, sec, metUni;
|
|
|
|
var min, sec;
|
|
|
|
sec = if(metronome, {(div / 5).trunc}, {div});
|
|
|
|
sec = (div / 5).trunc;
|
|
|
|
metUni = case {metronome == false} {""} {div % 20 < 2} {"|◘"} {div % 4 < 2} {"|●"} {true} {"| "};
|
|
|
|
|
|
|
|
min = (sec / 60).trunc.asString;
|
|
|
|
min = (sec / 60).trunc.asString;
|
|
|
|
if(min.size == 1, {min = "0" ++ min}, {});
|
|
|
|
if(min.size == 1, {min = "0" ++ min}, {});
|
|
|
|
sec = (sec % 60).trunc.asString;
|
|
|
|
sec = (sec % 60).trunc.asString;
|
|
|
|
if(sec.size == 1, {sec = "0" ++ sec}, {});
|
|
|
|
if(sec.size == 1, {sec = "0" ++ sec}, {});
|
|
|
|
min ++ ":" ++ sec ++ metUni;
|
|
|
|
min ++ ":" ++ sec
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
metronomeStringFunc = { arg div; case {div % 20 < 2} {"◘"} {div % 4 < 2} {"●"} {true} {" "} };
|
|
|
|
|
|
|
|
metronomeColorFunc = { arg div; case {div % 20 < 2} {Color.red} {div % 4 < 2} {Color.blue} {true} {Color.black} };
|
|
|
|
|
|
|
|
|
|
|
|
~appStatusFunc = Task({
|
|
|
|
~appStatusFunc = Task({
|
|
|
|
loop {
|
|
|
|
loop {
|
|
|
@ -42,10 +43,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
win = Window("ostinato and interrupt", Rect(500, 500, 1100, 500), false).front;
|
|
|
|
win = Window("ostinato and interrupt", Rect(500, 500, 1100, 500), false).front;
|
|
|
|
masterView = {
|
|
|
|
masterView = {
|
|
|
|
var view, masterIndicators, master, generator, transport, ranSeed, startPosText, pauseButton, clock;
|
|
|
|
var view, masterIndicators, master, generator, transport, ranSeed, startPosText, pauseButton, clock, metronome;
|
|
|
|
|
|
|
|
|
|
|
|
OSCFunc({ arg msg, time;
|
|
|
|
OSCFunc({ arg msg, time; {
|
|
|
|
{clock.string = clockStringFunc.value(msg[3])}.defer;
|
|
|
|
clock.string = clockStringFunc.value(msg[3]);
|
|
|
|
|
|
|
|
metronome.stringColor = metronomeColorFunc.value(msg[3]);
|
|
|
|
|
|
|
|
metronome.string = metronomeStringFunc.value(msg[3])}.defer;
|
|
|
|
},'/tr', s.addr);
|
|
|
|
},'/tr', s.addr);
|
|
|
|
OSCFunc.new({arg msg; {
|
|
|
|
OSCFunc.new({arg msg; {
|
|
|
|
{|i| masterIndicators[i].value = msg[3 + i].ampdb.linlin(-40, 0, 0, 1)} ! 2}.defer},
|
|
|
|
{|i| masterIndicators[i].value = msg[3 + i].ampdb.linlin(-40, 0, 0, 1)} ! 2}.defer},
|
|
|
@ -88,14 +91,16 @@
|
|
|
|
[Slider(view, Rect(0, 0, 30, 5)).action_(
|
|
|
|
[Slider(view, Rect(0, 0, 30, 5)).action_(
|
|
|
|
{|pos|
|
|
|
|
{|pos|
|
|
|
|
var min, sec;
|
|
|
|
var min, sec;
|
|
|
|
startPosText.string = clockStringFunc.value((pos.value * ~totalDur).trunc, false);
|
|
|
|
startPosText.string = clockStringFunc.value((pos.value * ~totalDur * 5).trunc);
|
|
|
|
startPos = pos.value;
|
|
|
|
startPos = pos.value;
|
|
|
|
}), stretch: 1],
|
|
|
|
}), stretch: 1],
|
|
|
|
startPosText = StaticText(win).string_("00:00").font_(Font("Monaco", 15)),
|
|
|
|
startPosText = StaticText(win).string_("00:00").font_(Font("Monaco", 15)),
|
|
|
|
nil);
|
|
|
|
nil);
|
|
|
|
view.layout_(HLayout(master,
|
|
|
|
view.layout_(HLayout(master,
|
|
|
|
[VLayout(generator, nil,
|
|
|
|
[VLayout(generator, nil,
|
|
|
|
clock = StaticText(win).string_("00:00|◘").font_(Font("Monaco", 220)),
|
|
|
|
HLayout(clock = StaticText(win).string_("00:00").font_(Font("Monaco", 200)),
|
|
|
|
|
|
|
|
StaticText(win).string_("|").font_(Font("Monaco", 200)),
|
|
|
|
|
|
|
|
metronome = StaticText(win).string_("◘").font_(Font("Monaco", 300)).stringColor_(Color.red)),
|
|
|
|
nil, transport
|
|
|
|
nil, transport
|
|
|
|
), alignment: \top])) };
|
|
|
|
), alignment: \top])) };
|
|
|
|
faderViews = { |group|
|
|
|
|
faderViews = { |group|
|
|
|
|