mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 13:16:44 +01:00
pass around TransportTime
This commit is contained in:
parent
85e243f782
commit
67a5ea3a2b
6 changed files with 41 additions and 25 deletions
|
|
@ -6,6 +6,8 @@ pub struct Arranger<E: Engine> {
|
|||
pub focus_cursor: (usize, usize),
|
||||
/// Controls the JACK transport.
|
||||
pub transport: Option<Arc<RwLock<TransportToolbar<E>>>>,
|
||||
/// Global timebase
|
||||
pub clock: Arc<TransportTime>,
|
||||
/// Contains all the sequencers.
|
||||
pub arrangement: Arrangement<E>,
|
||||
/// Pool of all phrases in the arrangement
|
||||
|
|
@ -117,14 +119,19 @@ impl<E: Engine> Arranger<E> {
|
|||
phrases: Arc<RwLock<PhrasePool<E>>>,
|
||||
) -> Self {
|
||||
let mut app = Self {
|
||||
focus_cursor: (0, 1),
|
||||
editor: PhraseEditor::new(),
|
||||
status: ArrangerStatusBar::ArrangementClip,
|
||||
focus_cursor: (0, 1),
|
||||
phrases_split: 20,
|
||||
arrangement_split: 20,
|
||||
editor: PhraseEditor::new(),
|
||||
status: ArrangerStatusBar::ArrangementClip,
|
||||
clock: if let Some(ref transport) = transport {
|
||||
transport.read().unwrap().clock.clone()
|
||||
} else {
|
||||
Arc::new(TransportTime::default())
|
||||
},
|
||||
transport,
|
||||
arrangement,
|
||||
phrases,
|
||||
phrases_split: 20,
|
||||
arrangement_split: 20,
|
||||
};
|
||||
app.update_focus();
|
||||
app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue