Editing EWQL Rules: Is there a better way to do this?
Posted: Tue Nov 23, 2010 1:26 pm
As I mentioned in a previous topic, I have encountered a problem with the EWQL lite presets. The way that Notion handles the rules, it goes through from top to bottom and follows every instruction that it encounters, not just the most "complete" one. For example, suppose someone has entered a slurred note with the lyrical technique. If the rules file has a rule that first says activate key switch 24 if the flag is vln1, it activates key switch 24. If there is a later rule that says activate key switch 25 if under a slur, it then activates key switch 25. If there is then yet a later rule that says if the technique is lyrical, activate key switch 33, it does that. If there is then after that yet a later rule that says if the technique is lyrical and under a slur, use key switch 28, it does that too, and is finally on the correct key switch.
This creates a problem, at least on my computer - a quad core 2.8 Ghz machine which should be high powered enough to handle Notion and EW about as well as any other. Basically, you get a very jerky, off-rhythm playback. Some notes don't play on beat, others play on beat but are cut short, etc. This seems to be caused by hitting 3, 4, or 5 key switches at a time in between notes - and it doesn't only happen with fast notes. For quarter notes in a row, or even half notes, can present the same problems at times.
Now I'm fairly certain it's all of the key switching, because when I edit the rules in such a way as to make sure a particular phrase is not being key switched to death (e.g., commenting out all rules except the one I want enforced), the phrase plays smoothly and as it should. My solution, then, has been to start a massive re-edit of the rules adding a long list of tests to every single rule to make sure only one key switch is ever activated per note. Each rule has a long list that looks something like this:
<rule>
<if flag="vln1" />
<if technique="lyri" />
<if not-technique="espr" />
<if not-technique="sost" />
<if not-technique="Qleg" />
<if not-technique="pizz" />
<if not-technique="snap" />
....
etc.
etc.
etc.
<keyswitch type ="note-on-prefix" MIDI pitch="33" Velocity="1" />
</rule>
Is there a better, faster, more code-wise efficient way to do this? Or alternatively, has anyone else run into this "jerky" problem and come up with a different way to overcome it (changing Play's settings, some kind of performance tweak to your system, etc.)?
This creates a problem, at least on my computer - a quad core 2.8 Ghz machine which should be high powered enough to handle Notion and EW about as well as any other. Basically, you get a very jerky, off-rhythm playback. Some notes don't play on beat, others play on beat but are cut short, etc. This seems to be caused by hitting 3, 4, or 5 key switches at a time in between notes - and it doesn't only happen with fast notes. For quarter notes in a row, or even half notes, can present the same problems at times.
Now I'm fairly certain it's all of the key switching, because when I edit the rules in such a way as to make sure a particular phrase is not being key switched to death (e.g., commenting out all rules except the one I want enforced), the phrase plays smoothly and as it should. My solution, then, has been to start a massive re-edit of the rules adding a long list of tests to every single rule to make sure only one key switch is ever activated per note. Each rule has a long list that looks something like this:
<rule>
<if flag="vln1" />
<if technique="lyri" />
<if not-technique="espr" />
<if not-technique="sost" />
<if not-technique="Qleg" />
<if not-technique="pizz" />
<if not-technique="snap" />
....
etc.
etc.
etc.
<keyswitch type ="note-on-prefix" MIDI pitch="33" Velocity="1" />
</rule>
Is there a better, faster, more code-wise efficient way to do this? Or alternatively, has anyone else run into this "jerky" problem and come up with a different way to overcome it (changing Play's settings, some kind of performance tweak to your system, etc.)?