wip: add note to phrase

This commit is contained in:
🪞👃🪞 2024-10-18 16:21:49 +03:00
parent a0eef1f626
commit 2606381d8c
3 changed files with 17 additions and 3 deletions

View file

@ -173,6 +173,7 @@ impl<E: Engine> PhrasePool<E> {
phrase.name = String::from(name.unwrap_or("(no name)"));
phrase.color = color.unwrap_or_else(random_color);
phrase.length = 4 * PPQ;
phrase.notes = vec![Vec::with_capacity(16);phrase.length];
self.phrases.push(Arc::new(RwLock::new(phrase)));
self.phrase = self.phrases.len() - 1;
}
@ -181,6 +182,7 @@ impl<E: Engine> PhrasePool<E> {
phrase.name = String::from(name.unwrap_or("(no name)"));
phrase.color = color.unwrap_or_else(random_color);
phrase.length = 4 * PPQ;
phrase.notes = vec![Vec::with_capacity(16);phrase.length];
self.phrases.insert(self.phrase + 1, Arc::new(RwLock::new(phrase)));
self.phrase += 1;
}