refactor: phrase chunk in/out

This commit is contained in:
🪞👃🪞 2024-06-30 19:56:45 +03:00
parent 83830d9cb3
commit 8a2693c297
3 changed files with 127 additions and 141 deletions

View file

@ -1,30 +1,13 @@
use crate::prelude::*;
mod keys;
use self::keys::*;
mod handle;
pub use self::handle::*;
mod process;
pub use self::process::*;
mod keys; use self::keys::*;
mod handle; pub use self::handle::*;
mod process; pub use self::process::*;
mod phrase; pub use self::phrase::*;
pub mod horizontal;
pub mod vertical;
pub type PhraseData = BTreeMap<u32, Vec<MidiMessage>>;
pub struct Phrase {
pub name: String,
pub length: u32,
pub notes: PhraseData,
}
impl Phrase {
pub fn new (name: &str, length: u32, notes: Option<PhraseData>) -> Self {
Self { name: name.to_string(), length, notes: notes.unwrap_or(BTreeMap::new()) }
}
}
pub struct Sequencer {
pub name: String,
/// JACK transport handle.