mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
editor keycodes work
This commit is contained in:
parent
525923d057
commit
fc3ecfb241
4 changed files with 94 additions and 86 deletions
|
|
@ -1,20 +1,22 @@
|
|||
(:enter add :false)
|
||||
(:shift-enter add :true)
|
||||
(:del del :false)
|
||||
(:shift-del del :true)
|
||||
(:comma note/length :prev-note-length)
|
||||
(:period note/length :next-note-length)
|
||||
(:plus note/range :next-note-range)
|
||||
(:underscore note/range :prev-note-range)
|
||||
(:up note/point :next-note-point)
|
||||
(:down note/point :prev-note-point)
|
||||
(:left time/point :next-time-point)
|
||||
(:right time/point :prev-time-point)
|
||||
(:z time/lock :next-time-lock)
|
||||
(:equal time/zoom :next-time-zoom)
|
||||
(:minus time/zoom :prev-time-zoom)
|
||||
(:space clock/play :play-current)
|
||||
(:shift-space clock/play :play-start)
|
||||
(:u history :history-prev)
|
||||
(:r history :history-next)
|
||||
(:tab compact :next-compact)
|
||||
(@up note/pos :note-pos-next)
|
||||
(@down note/pos :note-pos-prev)
|
||||
|
||||
(@left time/pos :time-pos-next)
|
||||
(@right time/pos :time-pos-prev)
|
||||
|
||||
(@enter add :false)
|
||||
(@shift-enter add :true)
|
||||
(@del del :false)
|
||||
(@shift-del del :true)
|
||||
(@comma note/length :prev-note-length)
|
||||
(@period note/length :next-note-length)
|
||||
(@plus note/range :next-note-range)
|
||||
(@underscore note/range :prev-note-range)
|
||||
(@z time/lock :next-time-lock)
|
||||
(@equal time/zoom :next-time-zoom)
|
||||
(@minus time/zoom :prev-time-zoom)
|
||||
(@space clock/play :play-current)
|
||||
(@shift-space clock/play :play-start)
|
||||
(@u history :history-prev)
|
||||
(@r history :history-next)
|
||||
(@tab compact :next-compact)
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue