On Dec 28, 2008, at 7:16 PM, Julian Rohrhuber wrote:
The efficiency of #1 has been tested. The current msgFunc performs about the same regardless of how many synth args exist in the event (all or just a few). My proposal performs only very slightly worse in the worst case (all arguments in the event) and significantly faster with fewer arguments in the event. SynthDesc lookup with the match method would definitely be slower, possibly not worth it. I haven't benchmarked. A better approach might be to use \instrument for the def name without variant, and another key \variant for the variant name (allowing \none to bypass the variant, since nil isn't an acceptable return value for a Pbind child stream). Then, put the variant defaults into the event's proto level. But this could be icky because Event protos are not copied and probably there would be garbage from one variant left over after the event played.
I don't recall who added variants. In hindsight I'm not sure it was a good idea to put them in. I don't see any evidence that it's a widely used feature, but there is a maintenance cost in deciding where it will and will not be usable. Either that, or there is inconsistency in having a feature that works in only in basic parts of the platform but not in some important, higher-level areas. hjh : H. James Harkins .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..: "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman |