load project from file

This commit is contained in:
🪞👃🪞 2024-07-08 17:27:58 +03:00
parent e2a842492e
commit eeb2faf064
9 changed files with 320 additions and 245 deletions

View file

@ -14,7 +14,7 @@ impl Default for Timebase {
fn default () -> Self {
Self {
rate: 48000f64.into(),
bpm: 100f64.into(),
bpm: 150f64.into(),
ppq: 96f64.into(),
}
}
@ -39,6 +39,9 @@ impl Timebase {
#[inline] pub fn bpm (&self) -> f64 {
self.bpm.load(Ordering::Relaxed)
}
#[inline] pub fn set_bpm (&self, bpm: f64) {
self.bpm.store(bpm, Ordering::Relaxed)
}
#[inline] fn usec_per_beat (&self) -> f64 {
60_000_000f64 / self.bpm() as f64
}