This commit is contained in:
2025-09-30 17:53:00 -05:00
parent ba7fda2b5c
commit 9eec30779a
2 changed files with 10 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@ impl App for Tenori {
g.show(ctx, cursor)
}
for d in self.dialogs
if play {
for note in self.notes_for_beat() {
self.play(note)
+9 -1
View File
@@ -25,7 +25,10 @@ pub struct Tenori {
window_counter: usize,
// The audio output stream to which we will play notes
output_stream: OutputStream
output_stream: OutputStream,
// Error dialogs we're currently showing
dialogs: Vec<String>
}
impl Default for Tenori {
@@ -40,6 +43,7 @@ impl Default for Tenori {
last_tick: None,
grids: vec![],
window_counter: 0,
dialogs: vec![],
output_stream
}
}
@@ -69,6 +73,10 @@ impl Tenori {
self.beat() != old_beat
}
pub fn display_dialogs(&mut self) {
}
/// Which beat (0..loop_length) we're on
pub fn beat(&self) -> u32 {
self.timer.floor() as u32