diff options
author | Chris Xiong <chirs241097@gmail.com> | 2022-12-21 23:56:03 -0500 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2022-12-21 23:56:03 -0500 |
commit | 6e5dc4eaee1ffb9474390dbd62a6dae4b90d8f5f (patch) | |
tree | 0d615f2287a4c5ffd10ba9f4a4bdf06950cd07f5 /src/convert.rs | |
parent | 21d891b4a62b54651a92d5f1a6a79d98b9b30110 (diff) | |
download | it2midi-dev.tar.xz |
Diffstat (limited to 'src/convert.rs')
-rw-r--r-- | src/convert.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/convert.rs b/src/convert.rs index 125e687..a96c802 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -3,7 +3,7 @@ use std::cell::RefCell; use std::rc::Rc; use crate::itfile::{ITFile, Cell}; use crate::utils::Rational; -use crate::midifile::{MidiEvent, TimedMidiEvent, MidiTrack, MidiFile, lint_track}; +use crate::midifile::{MidiEvent, TimedMidiEvent, MidiTrack, MidiFile, lint_track, lint_tempo}; use crate::portmod::Effect; #[derive(Debug)] @@ -410,6 +410,7 @@ impl<'a, 'b> Converter<'a, 'b> t: t.last().unwrap_or(&TimedMidiEvent{t: 0, e: MidiEvent::MetaEndOfTrack}).t, e: MidiEvent::MetaEndOfTrack})); + self.trks[0] = lint_tempo(&self.trks[0]); self.trks.iter().for_each(|t| { lint_track(t); }); } pub fn result(self) -> MidiFile |