mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
count time from start of playback
This commit is contained in:
parent
f6a7cbf38e
commit
52ea78a466
3 changed files with 309 additions and 285 deletions
|
|
@ -115,6 +115,7 @@ impl Track {
|
|||
input: MidiIter,
|
||||
timebase: &Arc<Timebase>,
|
||||
playing: Option<TransportState>,
|
||||
started: Option<usize>,
|
||||
quant: usize,
|
||||
panic: bool,
|
||||
scope: &ProcessScope,
|
||||
|
|
@ -136,13 +137,15 @@ impl Track {
|
|||
// Play from phrase into output buffer
|
||||
let phrase = &mut self.sequence.map(|id|self.phrases.get_mut(id)).flatten();
|
||||
if playing == Some(TransportState::Rolling) {
|
||||
if let Some(phrase) = phrase {
|
||||
phrase.process_out(
|
||||
&mut self.midi_out_buf,
|
||||
&mut self.notes_on,
|
||||
timebase,
|
||||
(usec0, usecs, period)
|
||||
);
|
||||
if let Some(started) = started {
|
||||
if let Some(phrase) = phrase {
|
||||
phrase.process_out(
|
||||
&mut self.midi_out_buf,
|
||||
&mut self.notes_on,
|
||||
timebase,
|
||||
(usec0 - started, usecs, period)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Monitor and record input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue