mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
wip: assigning steps to frames
This commit is contained in:
parent
7c1dc9ce9b
commit
faac61180b
6 changed files with 389 additions and 13 deletions
|
|
@ -51,9 +51,10 @@ pub fn handle (state: &mut Sequencer, event: &Event) -> Result<(), Box<dyn Error
|
|||
let row = state.cursor.0 as usize;
|
||||
let step = state.cursor.1 as usize;
|
||||
let duration = state.cursor.2 as usize;
|
||||
state.sequence[row][step] = Some(super::Event::NoteOn(35, 128));
|
||||
let mut sequence = state.sequence.lock().unwrap();
|
||||
sequence[row][step] = Some(super::Event::NoteOn(35, 128));
|
||||
if state.cursor.2 > 0 {
|
||||
state.sequence[row][step + duration] = Some(super::Event::NoteOff(35));
|
||||
sequence[row][step + duration] = Some(super::Event::NoteOff(35));
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue