refactor PhrasePlayer::process callback

This commit is contained in:
🪞👃🪞 2024-11-01 20:06:42 +02:00
parent 0820c10f8b
commit 3df8e87840
4 changed files with 118 additions and 87 deletions

View file

@ -22,6 +22,8 @@ pub struct Arranger<E: Engine> {
pub arrangement_split: u16,
/// Width of phrase pool
pub phrases_split: u16,
/// Width and height of app at last render
pub size: Measure<E>,
}
/// Sections in the arranger app that may be focused
#[derive(Copy, Clone, PartialEq, Eq)]
@ -121,9 +123,9 @@ impl<E: Engine> Arranger<E> {
phrases: Arc<RwLock<PhrasePool<E>>>,
) -> Self {
let mut app = Self {
jack: None,
focus_cursor: (0, 1),
phrases_split: 20,
jack: None,
focus_cursor: (0, 1),
phrases_split: 20,
arrangement_split: 21,
editor: PhraseEditor::new(),
status: ArrangerStatusBar::ArrangementClip,
@ -135,6 +137,7 @@ impl<E: Engine> Arranger<E> {
transport,
arrangement,
phrases,
size: Measure::new(),
};
app.update_focus();
app