(Somehow this bounced so I'm resending it)

I have apparently found and fixed the problem.

Short summary:

When we reset connection, we were inappropriately propagating controller
settings to instruments.  The fix reads Aere's demo file perfectly, with
nuanced pans and volumes.

What was happening:

Not too long ago, I made MidiDevice react to connection resets.  That
fixed certain bugs like expression being reset to 0.  But the code it
called sometimes also reset some Instruments settings.  My fault for
assuming.

 * Connection resets call Device::refreshForConnection, to MidiDevice::
refreshForConnection.
 * Which calls generateDefaultControllers.  That figures out new defaults
for the device and calls addControlParameter to add them.
 * But addControlParameter does more than that:  If
isVisibleControlParameter(con) is true, it also propagates the controller
value to Instruments (calls addControlToInstrument).

The fix:

 * addControlParameter (both signatures) has a new parameter, bool
propagateToInstruments.
 * generateDefaultControllers passes false.  I believe that's always
correct, since it's only called in MidiDevice ctors which then call
deviceToInstrControllerPush and in refreshForConnection.
 * Other calls to addControlParameter pass true to keep their original
semantics.
 * I have doubts about RoseXmlHandler, since it's just reading a
Controllable device at that point so why would it change instruments
settings?  But I conservatively left it with the original semantics.

I will (first get up to speed with the new Sourceforge and then) push this
fix.

        Tom Breton (Tehom)





------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to