summaryrefslogtreecommitdiff
path: root/muse2/muse/helper.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-12-30 17:55:58 +0000
committerFlorian Jung <flo@windfisch.org>2011-12-30 17:55:58 +0000
commit6f35a1b2b84ab6cfc5d77fd46d5e31887a1590e1 (patch)
treeadece0e0c4fbe63659741539296df9fd32bfcaab /muse2/muse/helper.h
parent4d8477ab60093fc4c1f6190a931d0c2fdc65384c (diff)
instruments can load their patch'es drummaps
automatic setting of drummap according to patch this is turned off when the user manually changes the drummap TODO: let him turn it on again moved MidiTrack::read/writeOurDrummap out to helper.cpp extended xg.idf and gs.idf to ship the drummaps still work in progress, but should be usable and stable, though incomplete
Diffstat (limited to 'muse2/muse/helper.h')
-rw-r--r--muse2/muse/helper.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/muse2/muse/helper.h b/muse2/muse/helper.h
index 8ef39346..2a26c08e 100644
--- a/muse2/muse/helper.h
+++ b/muse2/muse/helper.h
@@ -44,11 +44,21 @@ QString pitch2string(int v);
Part* partFromSerialNumber(int serial);
bool any_event_selected(const std::set<Part*>&, bool in_range=false);
-bool drummaps_almost_equal(DrumMap* one, DrumMap* two, int drummap_size=128);
+bool drummaps_almost_equal(const DrumMap* one, const DrumMap* two, int drummap_size=128);
+
+// drummap_hidden may be NULL.
+void write_new_style_drummap(int level, Xml& xml, const char* tagname,
+ DrumMap* drummap, bool* drummap_hidden=NULL, bool full=false);
+void read_new_style_drummap(Xml& xml, const char* tagname,
+ DrumMap* drummap, bool* drummap_hidden=NULL);
+
QSet<Part*> parts_at_tick(unsigned tick);
QSet<Part*> parts_at_tick(unsigned tick, const Track* track);
QSet<Part*> parts_at_tick(unsigned tick, const QSet<Track*>& tracks);
+
+bool parse_range(const QString& str, int* from, int* to); // returns true if successful, false on error
+
}
namespace MusEGui {