From 7cb0fe9dad9f7ef24d1142d866450305102bf3a9 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Sat, 7 Jul 2018 02:03:01 +0200 Subject: sequencer API to turn tracks on/off/solo --- src/midi_sequencer.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/midi_sequencer.hpp') diff --git a/src/midi_sequencer.hpp b/src/midi_sequencer.hpp index 6eeefa9..71e06b5 100644 --- a/src/midi_sequencer.hpp +++ b/src/midi_sequencer.hpp @@ -343,6 +343,11 @@ private: //! Are loop points invalid? bool m_invalidLoop; /*Loop points are invalid (loopStart after loopEnd or loopStart and loopEnd are on same place)*/ + //! Whether the nth track has playback disabled + std::vector m_trackDisable; + //! Index of solo track, or max for disabled + size_t m_trackSolo; + //! File parsing errors string (adding into m_errorString on aborting of the process) std::string m_parsingErrorsString; //! Common error string @@ -364,6 +369,26 @@ public: */ FileFormat getFormat(); + /** + * @brief Returns the number of tracks + * @return Track count + */ + size_t getTrackCount() const; + + /** + * @brief Sets whether a track is playing + * @param track Track identifier + * @param enable Whether to enable track playback + * @return true on success, false if there was no such track + */ + bool setTrackEnabled(size_t track, bool enable); + + /** + * @brief Enables or disables solo on a track + * @param track Identifier of solo track, or max to disable + */ + void setSoloTrack(size_t track); + /** * @brief Get the list of CMF instruments (CMF only) * @return Array of raw CMF instruments entries -- cgit v1.2.3