format beats from 0 or 1

This commit is contained in:
🪞👃🪞 2024-11-01 16:49:09 +02:00
parent b8047ab1ef
commit 10c5dcca9d
2 changed files with 20 additions and 7 deletions

View file

@ -198,8 +198,12 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
.map(|(t, _)|{
let target = t.pulse().get();
let current = clock.instant.pulse().get();
let remaining = clock.timebase().format_beats(target - current);
format!("{remaining:>}")
if target > current {
let remaining = clock.timebase().format_beats_0(target - current);
format!("▎-{remaining:>}")
} else {
String::new()
}
})
.unwrap_or(String::from(""));
let output_name = track.player.midi_outputs.get(0)