mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: reenable standalone sequencer
This commit is contained in:
parent
690a8e8f24
commit
0eb063db1c
7 changed files with 125 additions and 37 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue