mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 20:26:42 +01:00
extract Sequencer model
This commit is contained in:
parent
f347ca838b
commit
aa478099d9
14 changed files with 211 additions and 348 deletions
|
|
@ -78,15 +78,15 @@ pub const KEYMAP_GLOBAL: &'static [KeyBinding<App>] = keymap!(App {
|
|||
Ok(true)
|
||||
}],
|
||||
[Char('='), NONE, "zoom_in", "show fewer ticks per block", |app: &mut App| {
|
||||
app.seq_buf.time_zoom = prev_note_length(app.seq_buf.time_zoom);
|
||||
app.sequencer.time_zoom = prev_note_length(app.sequencer.time_zoom);
|
||||
Ok(true)
|
||||
}],
|
||||
[Char('-'), NONE, "zoom_out", "show more ticks per block", |app: &mut App| {
|
||||
app.seq_buf.time_zoom = next_note_length(app.seq_buf.time_zoom);
|
||||
app.sequencer.time_zoom = next_note_length(app.sequencer.time_zoom);
|
||||
Ok(true)
|
||||
}],
|
||||
[Char('x'), NONE, "extend", "double the current clip", |app: &mut App| {
|
||||
app.arranger.phrase_mut().map(|phrase|{
|
||||
app.arranger.phrase().map(|x|x.write().unwrap()).map(|mut phrase|{
|
||||
let mut notes = phrase.notes.clone();
|
||||
notes.extend_from_slice(&mut phrase.notes);
|
||||
phrase.notes = notes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue