7 #include <midi/event.hpp>
15 class AbsoluteMIDIEvent final
19 MIDI::MIDIEvent::EventType Event;
22 class TrackCompilerContext final
25 TrackCompilerContext() = default;
27 explicit TrackCompilerContext(int lastEventTime)
29 SetLastEventTime(lastEventTime);
33 int GetLastEventTime();
34 void SetLastEventTime(int t);
35 void UpdateTime(int relativeTime);
36 void PushEvent(int relativeTime, const MIDI::MIDIEvent::EventType& ev);
38 const std::vector<AbsoluteMIDIEvent>& GetEvents() const;
41 std::vector<AbsoluteMIDIEvent> m_Events;
42 int m_BaseTimeForCurrentBlock = 0;
43 int m_LastEventTime = 0;
46 class IIR2MIDICompiler
49 virtual ~IIR2MIDICompiler() = default;
51 virtual std::string GetSourceName() const = 0;
52 virtual TrackCompilerContext& GetTrackContext(int trackNumber) = 0;
55 } // namespace IR2MIDI