diff options
Diffstat (limited to 'muse2/muse/midiedit/drummap.h')
-rw-r--r-- | muse2/muse/midiedit/drummap.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/muse2/muse/midiedit/drummap.h b/muse2/muse/midiedit/drummap.h index 990f8fe2..7f28b068 100644 --- a/muse2/muse/midiedit/drummap.h +++ b/muse2/muse/midiedit/drummap.h @@ -24,7 +24,8 @@ #ifndef __DRUMMAP_H__ #define __DRUMMAP_H__ -class QString; +#include <QString> +#include <QList> namespace MusECore { @@ -48,21 +49,45 @@ struct DrumMap { bool operator==(const DrumMap& map) const; bool operator!=(const DrumMap& map) const { return !operator==(map); } + bool almost_equals(const DrumMap& map) const; }; +// please let this at "128". idrumMap should have length 128 (see drummap.cpp for details) #define DRUM_MAPSIZE 128 +extern DrumMap iNewDrumMap[128]; +extern void initNewDrumMap(); + extern void initDrumMap(); extern void writeDrumMap(int level, Xml& xml, bool external); extern void readDrumMap(Xml& xml, bool external); extern void resetGMDrumMap(); +class MidiTrack; } // namespace MusECore namespace MusEGlobal { extern char drumOutmap[DRUM_MAPSIZE]; extern char drumInmap[DRUM_MAPSIZE]; extern MusECore::DrumMap drumMap[DRUM_MAPSIZE]; + + +class global_drum_ordering_t : public QList< std::pair<MusECore::MidiTrack*,int> > +{ + public: + void cleanup(); + void write(int level, MusECore::Xml& xml); + void read(MusECore::Xml& xml); + + private: + typedef std::pair<MusECore::MidiTrack*,int> entry_t; + + void write_single(int level, MusECore::Xml& xml, const entry_t& entry); + entry_t read_single(MusECore::Xml& xml); +}; + +extern global_drum_ordering_t global_drum_ordering; + } #endif |