wip: reenable standalone sequencer

This commit is contained in:
🪞👃🪞 2024-10-08 18:33:21 +03:00
parent 690a8e8f24
commit 0eb063db1c
7 changed files with 125 additions and 37 deletions

View file

@ -13,12 +13,16 @@ pub struct Sequencer<E: Engine> {
pub phrases: Arc<RwLock<PhrasePool<E>>>,
/// Phrase editor view
pub editor: PhraseEditor<E>,
/// Which view is focused
pub focus: usize
}
/// Contains all phrases in a project
pub struct PhrasePool<E: Engine> {
_engine: PhantomData<E>,
/// Phrases in the pool
pub phrases: Vec<Arc<RwLock<Option<Phrase>>>>,
/// Whether this widget is focused
pub focused: bool,
}
/// A MIDI sequence.
#[derive(Debug)]
@ -93,7 +97,8 @@ impl<E: Engine> PhrasePool<E> {
pub fn new () -> Self {
Self {
_engine: Default::default(),
phrases: vec![Arc::new(RwLock::new(Some(Phrase::default())))]
phrases: vec![Arc::new(RwLock::new(Some(Phrase::default())))],
focused: false
}
}
}