PhraseCommand -> MidiEditCommand

This commit is contained in:
🪞👃🪞 2025-01-02 13:35:35 +01:00
parent 7f55c3bfc8
commit 57158d4d6f
4 changed files with 15 additions and 15 deletions

View file

@ -11,7 +11,7 @@ use ClockCommand::{Play, Pause};
Select(ArrangerSelection),
Zoom(usize),
Phrases(PoolCommand),
Editor(PhraseCommand),
Editor(MidiEditCommand),
StopAll,
Clear,
}
@ -57,7 +57,7 @@ input_to_command!(ArrangerCommand: <Tui>|state: ArrangerTui, input|match input.e
key_pat!(Shift-Char(' ')) =>
Self::Clock(if state.clock().is_stopped() { Play(Some(0)) } else { Pause(Some(0)) }),
key_pat!(Char('e')) =>
Self::Editor(PhraseCommand::Show(Some(state.phrases.phrase().clone()))),
Self::Editor(MidiEditCommand::Show(Some(state.phrases.phrase().clone()))),
key_pat!(Ctrl-Left) =>
Self::Scene(ArrangerSceneCommand::Add),
key_pat!(Ctrl-Char('t')) =>
@ -152,7 +152,7 @@ input_to_command!(ArrangerCommand: <Tui>|state: ArrangerTui, input|match input.e
_ => None
},
}
}.or_else(||if let Some(command) = PhraseCommand::input_to_command(&state.editor, input) {
}.or_else(||if let Some(command) = MidiEditCommand::input_to_command(&state.editor, input) {
Some(Self::Editor(command))
} else if let Some(command) = PoolCommand::input_to_command(&state.phrases, input) {
Some(Self::Phrases(command))