mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: add note to phrase
This commit is contained in:
parent
a0eef1f626
commit
2606381d8c
3 changed files with 17 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue