basic midi import example

This commit is contained in:
🪞👃🪞 2024-11-24 03:47:03 +01:00
parent 35944cf684
commit f5b1f495ad
8 changed files with 114 additions and 66 deletions

View file

@ -0,0 +1,18 @@
use tek_api::*;
struct ExamplePhrases(Vec<Arc<RwLock<Phrase>>>);
impl HasPhrases for ExamplePhrases {
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>> {
&self.0
}
fn phrases_mut (&mut self) -> &mut Vec<Arc<RwLock<Phrase>>> {
&mut self.0
}
}
fn main () -> Usually<()> {
let mut phrases = ExamplePhrases(vec![]);
PhrasePoolCommand::Import(0, String::from("./example.mid")).execute(&mut phrases)?;
Ok(())
}