From 9fbaa58e87a63749ff1694bdb9f4d1241db98689 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Mon, 17 Oct 2022 18:39:08 +0300 Subject: Improved the multi-song XMI support - Allow selecting every individual song of the XMI file - Allow dynamic song switch without re-opening of a file - Fixed XMI2MID converter with adding an ability to export every individual song - Added hooks for loop start and end events - Added an option to immediately stop the song processing on loop end reaching (needed to perform dynamic song switch at the loop end point) --- src/midi_sequencer.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/midi_sequencer.hpp') diff --git a/src/midi_sequencer.hpp b/src/midi_sequencer.hpp index 8872fde..2cba080 100644 --- a/src/midi_sequencer.hpp +++ b/src/midi_sequencer.hpp @@ -387,6 +387,12 @@ private: //! Set the number of loops limit. Lesser than 0 - loop infinite int m_loopCount; + //! The number of track of multi-track file (for exmaple, XMI) to load + int m_loadTrackNumber; + + //! The XMI-specific list of raw songs, converted into SMF format + std::vector > m_rawSongsData; + /** * @brief Loop stack entry */ @@ -611,6 +617,12 @@ public: */ void setSoloTrack(size_t track); + /** + * @brief Set the track number of a multi-track file (such as XMI) + * @param trackNumber Identifier of the track to load (or -1 to mix all tracks as one song) + */ + void setLoadTrack(int track); + /** * @brief Defines a handler for callback trigger events * @param handler Handler to invoke from the sequencer when triggered, or NULL. -- cgit v1.2.3