add PhraseEditor::note_len

This commit is contained in:
🪞👃🪞 2024-10-18 09:35:10 +03:00
parent 826cc5902b
commit de1eb6ef97
3 changed files with 30 additions and 29 deletions

View file

@ -66,6 +66,8 @@ pub struct PhraseEditor<E: Engine> {
_engine: PhantomData<E>,
/// Phrase being played
pub phrase: Option<Arc<RwLock<Phrase>>>,
/// Length of note that will be inserted, in pulses
pub note_len: usize,
/// The full piano keys are rendered to this buffer
pub keys: Buffer,
/// The full piano roll is rendered to this buffer
@ -223,6 +225,7 @@ impl<E: Engine> PhraseEditor<E> {
Self {
_engine: Default::default(),
phrase: None,
note_len: 24,
notes_in: Arc::new(RwLock::new([false;128])),
notes_out: Arc::new(RwLock::new([false;128])),
keys: keys_vert(),