|
|
@ -18,14 +18,15 @@
|
|
|
|
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 secInt;
|
|
|
|
arg div, metronome = true;
|
|
|
|
var min, sec;
|
|
|
|
var min, sec, metUni;
|
|
|
|
sec = secInt;
|
|
|
|
sec = if(metronome, {(div / 5).trunc}, {div});
|
|
|
|
|
|
|
|
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
|
|
|
|
min ++ ":" ++ sec ++ metUni;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
~appStatusFunc = Task({
|
|
|
|
~appStatusFunc = Task({
|
|
|
@ -56,8 +57,7 @@
|
|
|
|
VLayout(
|
|
|
|
VLayout(
|
|
|
|
HLayout(
|
|
|
|
HLayout(
|
|
|
|
Slider(view).value_(0.8).action_({|v| ~play.set(\allMasterVol, v.value * 1.25)}),
|
|
|
|
Slider(view).value_(0.8).action_({|v| ~play.set(\allMasterVol, v.value * 1.25)}),
|
|
|
|
masterIndicators[0],
|
|
|
|
masterIndicators[0], masterIndicators[1]),
|
|
|
|
masterIndicators[1]),
|
|
|
|
|
|
|
|
Button(view).states_([["mute", Color.black], ["mute", Color.black, Color.grey]]).action_(
|
|
|
|
Button(view).states_([["mute", Color.black], ["mute", Color.black, Color.grey]]).action_(
|
|
|
|
{|v| ~play.set(\allMasterMute, (1 - v.value).abs)}),
|
|
|
|
{|v| ~play.set(\allMasterMute, (1 - v.value).abs)}),
|
|
|
|
StaticText(view).string_(" master ").align_(\center),
|
|
|
|
StaticText(view).string_(" master ").align_(\center),
|
|
|
@ -78,24 +78,25 @@
|
|
|
|
Button(view).states_([["play", Color.black], ["stop", Color.black, Color.grey]]).action_(
|
|
|
|
Button(view).states_([["play", Color.black], ["stop", Color.black, Color.grey]]).action_(
|
|
|
|
{| pState |
|
|
|
|
{| pState |
|
|
|
|
pauseButton.value = 0;
|
|
|
|
pauseButton.value = 0;
|
|
|
|
if(pState.value == 0, {~play.set(\playRate, 0, \startTrig, 0); clock.string = startPosText.string},
|
|
|
|
if(pState.value == 0, {~play.set(\playRate, 0, \startTrig, 0);
|
|
|
|
|
|
|
|
clock.string = clockStringFunc.value((startPos * ~totalDur * 5).trunc)},
|
|
|
|
{~play.set(\startPos, startPos, \playRate, 1, \startTrig, 1)})}),
|
|
|
|
{~play.set(\startPos, startPos, \playRate, 1, \startTrig, 1)})}),
|
|
|
|
pauseButton = Button(view).states_([["pause", Color.black], ["pause", Color.black, Color.grey]]).action_(
|
|
|
|
pauseButton = Button(view).states_([["pause", Color.black], ["pause", Color.black, Color.grey]]).action_(
|
|
|
|
{| pState |
|
|
|
|
{| pState |
|
|
|
|
if(pState.value == 1, {~play.set(\playRate, 0)},{~play.set(\playRate, 1)})}),
|
|
|
|
if(pState.value == 1, {~play.set(\playRate, 0)},{~play.set(\playRate, 1)})}),
|
|
|
|
StaticText(view).string_("start time"),
|
|
|
|
StaticText(view).string_("start time"),
|
|
|
|
[Slider(view, Rect(0, 0, 30, 20)).action_(
|
|
|
|
[Slider(view, Rect(0, 0, 30, 5)).action_(
|
|
|
|
{|pos|
|
|
|
|
{|pos|
|
|
|
|
var min, sec;
|
|
|
|
var min, sec;
|
|
|
|
startPosText.string = clockStringFunc.value(pos.value * ~totalDur);
|
|
|
|
startPosText.string = clockStringFunc.value((pos.value * ~totalDur).trunc, false);
|
|
|
|
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,
|
|
|
|
[VLayout(generator, nil,
|
|
|
|
clock = StaticText(win).string_("00:00").font_(Font("Monaco", 300));,
|
|
|
|
clock = StaticText(win).string_("00:00|◘").font_(Font("Monaco", 220)),
|
|
|
|
transport
|
|
|
|
nil, transport
|
|
|
|
), alignment: \top])) };
|
|
|
|
), alignment: \top])) };
|
|
|
|
faderViews = { |group|
|
|
|
|
faderViews = { |group|
|
|
|
|
var view, masterIndicators, trackIndicators, master, tracks;
|
|
|
|
var view, masterIndicators, trackIndicators, master, tracks;
|
|
|
|