mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
sync midi by frames rather than useconds
This commit is contained in:
parent
63b5eb3740
commit
b1e4ec3a88
4 changed files with 29 additions and 17 deletions
|
|
@ -32,7 +32,7 @@ pub struct App {
|
|||
/// Current position according to transport
|
||||
pub playhead: usize,
|
||||
/// Position of T0 for this playback within global timeline
|
||||
pub play_started: Option<usize>,
|
||||
pub play_started: Option<(usize, usize)>,
|
||||
/// Current sample rate and tempo.
|
||||
pub timebase: Arc<Timebase>,
|
||||
/// Display mode of grid section
|
||||
|
|
@ -86,7 +86,10 @@ process!(App |self, _client, scope| {
|
|||
if self.playing != Some(transport.state) {
|
||||
match transport.state {
|
||||
TransportState::Rolling => {
|
||||
self.play_started = Some(current_usecs as usize);
|
||||
self.play_started = Some((
|
||||
current_frames as usize,
|
||||
current_usecs as usize,
|
||||
));
|
||||
},
|
||||
TransportState::Stopped => {
|
||||
self.play_started = None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue