mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
refactor: phrase chunk in/out
This commit is contained in:
parent
83830d9cb3
commit
8a2693c297
3 changed files with 127 additions and 141 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue