bye sequencer

This commit is contained in:
🪞👃🪞 2024-07-03 18:36:16 +03:00
parent 2165e5d45d
commit 316fe45b2a
12 changed files with 510 additions and 759 deletions

View file

@ -3,7 +3,6 @@ pub mod focus;
pub mod mixer;
pub mod plugin;
pub mod sampler;
pub mod sequencer;
pub use self::focus::*;
@ -42,6 +41,28 @@ const KEYMAP: &'static [KeyBinding<App>] = keymap!(App {
[Char('a'), CONTROL, "add_scene", "add a new scene", add_scene],
[Char('`'), NONE, "switch_mode", "switch the display mode", switch_mode],
});
//-pub const KEYMAP: &'static [KeyBinding<Sequencer>] = keymap!(Sequencer {
//- [Up, NONE, "cursor_up", "move cursor up", cursor_up],
//- [Down, NONE, "cursor_down", "move cursor down", cursor_down],
//- [Left, NONE, "cursor_left", "move cursor left", cursor_left],
//- [Right, NONE, "cursor_right", "move cursor right", cursor_right],
//- [Char('.'), NONE, "cursor_inc", "increase note duration", cursor_duration_inc],
//- [Char(','), NONE, "cursor_dec", "decrease note duration", cursor_duration_dec],
//- [Char('`'), NONE, "mode_next", "Next view mode", mode_next],
//- [Char('='), NONE, "zoom_in", "Zoom in", zoom_in],
//- [Char('-'), NONE, "zoom_out", "Zoom out", zoom_out],
//- [Char('a'), NONE, "note_add", "Add note", note_add],
//- [Char('z'), NONE, "note_del", "Delete note", note_del],
//- [CapsLock, NONE, "advance", "Toggle auto advance", nop],
//- [Char('w'), NONE, "rest", "Advance by note duration", nop],
//- [Char(' '), NONE, "toggle_play", "Toggle play/pause", toggle_play],
//- [Char('r'), NONE, "toggle_record", "Toggle recording", toggle_record],
//- [Char('d'), NONE, "toggle_overdub", "Toggle overdub", toggle_overdub],
//- [Char('m'), NONE, "toggle_monitor", "Toggle input monitoring", toggle_monitor],
//- [Char('s'), NONE, "stop_and_rewind", "Stop and rewind", stop_and_rewind],
//- [Char('q'), NONE, "quantize_next", "Next quantize value", quantize_next],
//- [Char('Q'), SHIFT, "quantize_prev", "Previous quantize value", quantize_prev],
//-});
fn toggle_play (app: &mut App) -> Usually<bool> {
app.playing = match app.playing.expect("after jack init") {
@ -280,7 +301,7 @@ fn add_scene (app: &mut App) -> Usually<bool> {
fn add_track (app: &mut App) -> Usually<bool> {
let name = format!("Track {}", app.tracks.len() + 1);
app.tracks.push(Track::new(&name, app.jack.as_ref().unwrap().as_client(), &app.timebase, None, None)?);
app.tracks.push(Track::new(&name, app.jack.as_ref().unwrap().as_client(), None, None)?);
app.track_cursor = app.tracks.len();
Ok(true)
}