editor keycodes work

This commit is contained in:
🪞👃🪞 2025-01-16 15:43:44 +01:00
parent 525923d057
commit fc3ecfb241
4 changed files with 94 additions and 86 deletions

View file

@ -56,10 +56,17 @@ edn_provide!(bool: |self: MidiEditor| {
":false" => false
});
edn_provide!(usize: |self: MidiEditor| {
":note-length" => self.note_len(),
":note-point" => self.note_point(),
":time-point" => self.time_point(),
":time-zoom" => self.time_zoom().get(),
":note-length" => self.note_len(),
":note-pos" => self.note_point(),
":note-pos-next" => self.note_point() + 1,
":note-pos-prev" => self.note_point().saturating_sub(1),
":time-pos" => self.time_point(),
":time-pos-next" => self.time_point() + self.time_zoom().get(),
":time-pos-prev" => self.time_point().saturating_sub(self.time_zoom().get()),
":time-zoom" => self.time_zoom().get(),
});
impl std::fmt::Debug for MidiEditor {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {