com.frinika.voiceserver
Class VoiceInterrupt

java.lang.Object
  extended by com.frinika.voiceserver.VoiceInterrupt

public abstract class VoiceInterrupt
extends java.lang.Object

The voice interrupt is used to alter voice parameters in real time. The reason for why the parameters should be altered through a voice interrupt, is because of latency compensation. An example of this is if you alter the parameters directly - let's say you trigger a release - the sound would end too early. If you modify the parameter through a voice interrupt you're sure that the note will be released exactly when it's supposed to be. The voice server is aware of all scheduled interrupts, and will therefore make sure that it is executed at the right time. How to use? Use this class in your synth on all places where you perform a control change, note off, pitch bend - or other latency sensitive events. Instead of placing the parameter-altering code directly under the method receiving the events, rather create a voiceinterrupt class and place the code under the doInterrupt() method. Then this code will be executed when it's supposed to be.

Author:
Peter Johan Salomonsen

Field Summary
 long interruptFramePos
          Used by the voiceserver to set execution time point
 
Constructor Summary
VoiceInterrupt()
           
 
Method Summary
abstract  void doInterrupt()
          Place your interrupt code in this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interruptFramePos

public long interruptFramePos
Used by the voiceserver to set execution time point

Constructor Detail

VoiceInterrupt

public VoiceInterrupt()
Method Detail

doInterrupt

public abstract void doInterrupt()
Place your interrupt code in this method. Any realtime midi event handling (control changes, pitch-bend, note off etc), should go under here. It will then be executed at the right point of time.