diff options
| author | Florian Jung <flo@windfisch.org> | 2011-10-09 13:20:51 +0000 |
|---|---|---|
| committer | Florian Jung <flo@windfisch.org> | 2011-10-09 13:20:51 +0000 |
| commit | 159a2b58fd28c7a00b9b723dcea77e6c2ec2e874 (patch) | |
| tree | ac8427059e7786cf63e33949201394e88a6222da /muse2/muse/midiedit | |
| parent | 9cd7615aaa5bc2818ae5f9425173f08673bbc194 (diff) | |
updated MidiTrack::read and ::write
Diffstat (limited to 'muse2/muse/midiedit')
| -rw-r--r-- | muse2/muse/midiedit/drummap.cpp | 9 | ||||
| -rw-r--r-- | muse2/muse/midiedit/drummap.h | 1 | ||||
| -rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/muse2/muse/midiedit/drummap.cpp b/muse2/muse/midiedit/drummap.cpp index 43e66345..47232011 100644 --- a/muse2/muse/midiedit/drummap.cpp +++ b/muse2/muse/midiedit/drummap.cpp @@ -43,6 +43,15 @@ namespace MusECore { const DrumMap blankdm = { QString(""), 100, 16, 32, 9, 0, 70, 90, 127, 110, 127, 127, false }; +// this map must have 128 entries, as it's used for initalising new-style-drummaps as well. +// new-style-drummaps only have 128 entries. also, the every "out-note" ("anote") must be +// represented exactly once in that map, and there may be no duplicate or unused "out-notes". +// reason: the track's drummap are inited as follows: iterate through the full idrumMap[], +// tracks_drummap[ idrumMap[i].anote ] = idrumMap[i] +// if you ever want to change this, you will need to go through track.cpp/.h and +// {dlist,dcanvas,drumedit,drummap}{.cpp,.h} (and possibly some more) and find every usage +// of idrumMap by new style drummaps, and fix the problem. a possible fix would be duplicating +// idrumMap, change idrumMap, and use the duplicate for the new style stuff instead. const DrumMap idrumMap[DRUM_MAPSIZE] = { { QString("Acoustic Bass Drum"), 100, 16, 32, 9, 0, 70, 90, 127, 110, 35, 35, false }, { QString("Bass Drum 1"), 100, 16, 32, 9, 0, 70, 90, 127, 110, 36, 36, false }, diff --git a/muse2/muse/midiedit/drummap.h b/muse2/muse/midiedit/drummap.h index f3186afa..3b6ffaf3 100644 --- a/muse2/muse/midiedit/drummap.h +++ b/muse2/muse/midiedit/drummap.h @@ -51,6 +51,7 @@ struct DrumMap { bool operator!=(const DrumMap& map) const { return !operator==(map); } }; +// please let this at "128". idrumMap must have length 128 (see drummap.cpp for details) #define DRUM_MAPSIZE 128 extern const DrumMap idrumMap[DRUM_MAPSIZE]; //FINDMICH dummy! diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index 5770ee6c..8f647966 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -4608,7 +4608,7 @@ void ScoreCanvas::add_new_parts(const std::map< MusECore::Part*, std::set<MusECo * o clearly state in the changelog: when having multiple drumeditors open, * the mute-column may not work, because another editor is overriding this. * o respect "_drummap_tied_to_patch": IMPLEMENT - * o save hide, ordering, track's drumlists + * o allow loading and saving track-drumlists to external files * o "copy drumlist" from one track to another * o whenever changing the patch and maintained_automatically==true, * the drumlist is replaced by the according one (for example, "jazz" drum kit's list) @@ -4616,11 +4616,13 @@ void ScoreCanvas::add_new_parts(const std::map< MusECore::Part*, std::set<MusECo * ask the user if he wants to proceed, and then set maintained_automatically to false * o offer some way to set maintained_automatically to true again * o move generation and deletion of ourDrumMap from DCanvas to DrumEditor and remove ugly wrapper functions + * x save hide, ordering, track's drumlists * * x when playing back a flo-drum-track: treat as a MIDI track, * EXCEPT that the drum list's mute entries are respected! * o when recording or echoing a flo-drum-track: watch out for In-Notes! - * o update [midi]track::read/write, readproperties, writeprop... (drumlist etc), operator= + * * update [midi]track::read/write, readproperties, writeprop... (drumlist etc), operator= + * _should_ be okay, but i'm not sure * * IMPORTANT TODO * o all places where i added doubleclick-edits: only react on left-click double clicks! |
