Am 29.09.2012 00:22, schrieb Tim:
> Hi Florian. 
> 
> When I create a New Drum track and point it to a Port which uses
>  the GS or XG instrument, the drum maps in the Drum Editor still
>  show the default GM map. I saw you made maps for GS and XG.

Hi Tim,

you have to set a patch=program=drumkit, too. (such as "electric kit 1",
"jazz kit" etc.)
this is because different kits can have different drum names.

(Don't forget to store it to the track! Just selecting it from the
combobox will not help. More details: The new style drum tracks look at
the *first* program change event on the track. If there are multiple,
the rest gets ignored, and if there is none, then nothing is done.)

> 
> Stepping through the code I see Track::_drummap is still holding the 
>  default GM map, and the drum list's ourDrumMap and so on 
>  depends on _drummap.
> 
> Stepping futher I see _drummap is initialized from the static 
>  iNewDrumMap[ ] which is started with the default GM map, 
> 
>  which seems correct, but nothing happens after that, and I found
>   no references in the code to the port's instrument, where the real 
>  drum maps are located. I'm looking for the place where they 
>  should be copied over to iNewDrumMap[ ]  - or somewhere...


Track::_drummap is updated when you change instrument type or program.
However, if you set no (known) drum program/patch, then MusE will fall
back to some default drum map (can't remember where it's located).

iNewDrumMap is never changed. This is only a default value in case that
the "instrument + patch"-combination is not known to muse (that is, not
mentioned in any file)


(If you also want to know where the _drummap is changed: Whenever
MidiTrack::auto_update_drummap() is called, the track looks which patch
it has, and then _drummap is set accordingly.
MidiTrack::auto_update_drummap() is called from TrackDrummapUpdater (in
trackdrummapupdater.cpp). That's just a helper class which connects to
songChanged(), and iterates through all tracks, calling
auto_update_drummap on its way.)


Greetings,
flo

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to