mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
separate TimeInteger/TimeFloat
This commit is contained in:
parent
89dcc2afe2
commit
063706017e
4 changed files with 91 additions and 59 deletions
|
|
@ -237,12 +237,12 @@ impl<E: Engine> Arrangement<E> {
|
|||
match self.selected {
|
||||
ArrangementFocus::Scene(s) => {
|
||||
for (t, track) in self.tracks.iter_mut().enumerate() {
|
||||
let start = self.clock.next_launch();
|
||||
let start = self.clock.next_launch_frame();
|
||||
track.player.enqueue_next(start, self.scenes[s].clips[t].as_ref());
|
||||
}
|
||||
},
|
||||
ArrangementFocus::Clip(t, s) => {
|
||||
let start = self.clock.next_launch();
|
||||
let start = self.clock.next_launch_frame();
|
||||
self.tracks[t].player.enqueue_next(start, self.scenes[s].clips[t].as_ref());
|
||||
},
|
||||
_ => {}
|
||||
|
|
|
|||
|
|
@ -173,8 +173,8 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
|||
.flatten()
|
||||
.map(|t|format!("▎{t:>}"))
|
||||
.unwrap_or(String::from("▎"));
|
||||
let time2 = track.player.switch_at.as_ref()
|
||||
.map(|t|format!("▎{:>}", t.load(Ordering::Relaxed)))
|
||||
let time2 = track.player.next_phrase.as_ref()
|
||||
.map(|(t, _)|format!("▎{:>}", t.load(Ordering::Relaxed)))
|
||||
.unwrap_or(String::from("▎"));
|
||||
col!(name, time1, time2)
|
||||
.min_xy(w as u16, title_h)
|
||||
|
|
|
|||
|
|
@ -119,8 +119,6 @@ pub struct PhrasePlayer<E: Engine> {
|
|||
pub phrase: Option<(AtomicUsize, Option<Arc<RwLock<Phrase>>>)>,
|
||||
/// Start time and next phrase
|
||||
pub next_phrase: Option<(AtomicUsize, Option<Arc<RwLock<Phrase>>>)>,
|
||||
/// Frames remaining until switch to next phrase
|
||||
pub switch_at: Option<AtomicUsize>,
|
||||
/// Play input through output.
|
||||
pub monitoring: bool,
|
||||
/// Write input to sequence.
|
||||
|
|
@ -334,7 +332,6 @@ impl<E: Engine> PhrasePlayer<E> {
|
|||
clock: clock.clone(),
|
||||
phrase: None,
|
||||
next_phrase: None,
|
||||
switch_at: None,
|
||||
notes_in: Arc::new(RwLock::new([false;128])),
|
||||
notes_out: Arc::new(RwLock::new([false;128])),
|
||||
monitoring: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue