From: Joe E. <jo...@em...> - 2005-03-15 22:18:06
|
Brian wrote: > Joe Emenaker wrote: > >> However, if anyone else would like to see this cleaned up, then I'd >> like to discuss ideas for it. > > I think this should be pretty easy to clean up if you are willing. . > The reason patch appears three times is that the Widget itself wants > to see the patch, > the sender wants to see it, and the model wants to see it. My gut > reaction to how to fix it would be to create a method in the > base class for models and senders that does nothing called setPatch > (Patch p). This would be called automatically by addWidget > on the Model and Sender sent to it. Models / Senders could override > this to get at the Patch rather than having to take the Patch > in their constructor. Existing drivers could remain unchanged but new > ones could then get away without having to pass patch three > times. We could always go back and upgrade older drivers later. This is very much like what I was thinking. Here's my next question. Currently, parameter names are passed to the widget, and not to the ParamModel, right? If they were given to the ParamModel instead (and ParamModel had a getName() method so that the widget could get to it), then it creates the possiblity for user-tunable patch mixing, no? For example, if I wanted to combine patches 35 and 37, I could actually tell JSL to use "Filter Envelope" from 35, "Pitch LFO" from 37, and to just numerically average all of the others. Or does JSL already do this? - Joe |