Add session timer in the post window

This commit is contained in:
2024-05-14 11:20:18 +02:00
parent 176004f7c4
commit 6034e63638
3 changed files with 46 additions and 12 deletions

View File

@ -190,3 +190,24 @@ m = MIDIOut.newByName("MIDI", "Bus 1");
});
~apply.play;
)
Main.elapsedTime
(
d.formatTime = {
arg seconds = 0;
var hours = seconds / 3600;
var minutes = (seconds % 3600) / 60;
var secs = (seconds % 60);
hours = hours.asString.padLeft(2, $0);
minutes = minutes.asString.padLeft(2, $0);
secs = secs.asString.padLeft(2, $0);
^hours ++ ":" ++ minutes ++ ":" ++ secs
};
)
d.formatTime
d.formatTime(20).postln;