fix timer of horizontal sequencer

This commit is contained in:
🪞👃🪞 2024-07-03 20:03:00 +03:00
parent 2601592d17
commit 1259176576
6 changed files with 293 additions and 254 deletions

View file

@ -39,16 +39,17 @@ render!(App |self, buf, area| {
}.draw()?.height;
if self.track_cursor > 0 {
let track = self.tracks.get(self.track_cursor - 1);
y = y + ChainView {
focused: self.section == 1,
chain: track,
}.render(buf, Rect { x, y, width, height: height / 3 })?.height;
let track = self.tracks.get(self.track_cursor - 1).unwrap();
y = y + ChainView { focused: self.section == 1, track: Some(track) }
.render(buf, Rect { x, y, width, height: height / 3 })?.height;
y = y + SequencerView {
focused: self.section == 2,
ppq: self.timebase.ppq() as usize,
phrase: track.map(|t|&t.phrases[0]),
now: self.timebase.frames_pulses(self.playhead as f64) as usize,
phrase: track.phrases.get(0),
time_cursor: self.time_cursor,
time_start: self.time_start,
time_zoom: self.time_zoom,