numPressedKeys and isLegatoInterval with ignoreEvent
-
If there is more than one script in a chain and an earlier script ignores an event then the
numPressedKeys()
andisLegatoInterval
functions cease to be useful in the later scripts.<Processor Type="SynthChain" ID="Master Chain" Bypassed="0" Gain="1" Balance="0" VoiceLimit="64" KillFadeTime="20" IconColour="0" packageName="" views="32.rk1bzA..........hJ....QrAZnnB...B....PA...." currentView="-1"> <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="ScriptProcessor" ID="Script Processor" Bypassed="0" Script="function onNoteOn() { 	Console.print("Script 1: " + Synth.getNumPressedKeys()); 	Message.ignoreEvent(true); } function onNoteOff() { 	 } function onController() { 	 } function onTimer() { 	 } function onControl(number, value) { 	 } "> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0" onNoteOnOpen="1" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0" onControlOpen="0"/> <ChildProcessors/> <Content/> </Processor> <Processor Type="ScriptProcessor" ID="Script Processor2" Bypassed="0" Script="function onNoteOn() { 	Console.print("Script 2: " + Synth.getNumPressedKeys()); } function onNoteOff() { 	 } function onController() { 	 } function onTimer() { 	 } function onControl(number, value) { 	 } "> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0" onNoteOnOpen="1" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0" onControlOpen="0"/> <ChildProcessors/> <Content/> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="1" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <macro_controls> <macro name="Macro 1" value="0" midi_cc="-1"/> <macro name="Macro 2" value="0" midi_cc="-1"/> <macro name="Macro 3" value="0" midi_cc="-1"/> <macro name="Macro 4" value="0" midi_cc="-1"/> <macro name="Macro 5" value="0" midi_cc="-1"/> <macro name="Macro 6" value="0" midi_cc="-1"/> <macro name="Macro 7" value="0" midi_cc="-1"/> <macro name="Macro 8" value="0" midi_cc="-1"/> </macro_controls> <MidiAutomation/> </Processor>
-
If a message gets ignored, it won't trigger the callbacks of script processors after the one that ignored them, but that has nothing to do with the
numPressedKeys()
method. Or are you asking that thegetNumPressedKeys()
method should return the number of unignored notes (so ignoring a note prevents the internal counter to rise?) -
Aha! I misunderstood what was happening. The current behaviour is fine :)