unify some modules and implement edn_command for sampler

This commit is contained in:
🪞👃🪞 2025-01-17 00:11:49 +01:00
parent 3a6202464c
commit d4f962fbfa
19 changed files with 1008 additions and 1084 deletions

View file

@ -185,8 +185,8 @@ impl MidiViewer for MidiEditor {
fn set_clip (&mut self, p: Option<&Arc<RwLock<MidiClip>>>) { self.mode.set_clip(p) }
}
edn_command!(MidiEditCommand: |state: MidiEditor| {
("note/put" [_a: bool] Self::PutNote)
("note/del" [_a: bool] Self::PutNote)
("note/put" [_a: bool] Self::PutNote)
("note/del" [_a: bool] Self::PutNote)
("note/pos" [a: usize] Self::SetNoteCursor(a.expect("no note cursor")))
("note/len" [a: usize] Self::SetNoteLength(a.expect("no note length")))
("time/pos" [a: usize] Self::SetTimeCursor(a.expect("no time cursor")))

View file

@ -479,8 +479,8 @@ edn_command!(FileBrowserCommand: |state: MidiPool| {
("begin" [] Self::Begin)
("cancel" [] Self::Cancel)
("confirm" [] Self::Confirm)
("select" [i: usize] Self::Select(i.expect("no index")))
("chdir" [p: PathBuf] Self::Chdir(p.expect("no path")))
("select" [i: usize] Self::Select(i.expect("no index")))
("chdir" [p: PathBuf] Self::Chdir(p.expect("no path")))
("filter" [f: Arc<str>] Self::Filter(f.expect("no filter")))
});
command!(|self: FileBrowserCommand, state: MidiPool|{