com.frinika.synth
Class PreOscillator

java.lang.Object
  extended by com.frinika.voiceserver.Voice
      extended by com.frinika.synth.Oscillator
          extended by com.frinika.synth.PreOscillator

public class PreOscillator
extends Oscillator

Author:
Peter Johan Salomonsen

Field Summary
 int pitchBend
           
 float pitchBendFactor
           
 float[] sampleBuffer
           
 
Fields inherited from class com.frinika.synth.Oscillator
frequency, increment, level, position, release, sampleRate, synth, triggeredRelease
 
Fields inherited from class com.frinika.voiceserver.Voice
interrupts, nextVoice, startFramePos
 
Constructor Summary
PreOscillator(Synth synth)
           
 
Method Summary
 void fillBuffer(int startBufferPos, int endBufferPos, float[] buffer)
          This is where the raw audio data should be produced.
 int getAmount()
           
 float[] getLfoBuffer()
           
 void setVibratoAmount(int amount)
           
 void setVibratoFrequency(float frequency)
           
protected  void updateIncrement()
           
 
Methods inherited from class com.frinika.synth.Oscillator
getFrequency, release, setNoteNumber, setVelocity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sampleBuffer

public float[] sampleBuffer

pitchBend

public int pitchBend

pitchBendFactor

public float pitchBendFactor
Constructor Detail

PreOscillator

public PreOscillator(Synth synth)
Method Detail

setVibratoAmount

public void setVibratoAmount(int amount)

updateIncrement

protected void updateIncrement()
Overrides:
updateIncrement in class Oscillator

getLfoBuffer

public final float[] getLfoBuffer()

setVibratoFrequency

public void setVibratoFrequency(float frequency)

fillBuffer

public void fillBuffer(int startBufferPos,
                       int endBufferPos,
                       float[] buffer)
Description copied from class: Voice
This is where the raw audio data should be produced. The passed in buffer contains the audio data from the previous voice in the chain, thus new data should just be added to the buffer. It's important to just fill within the start and stop positions, because this is how the interrupt functions control that parameter modification occur at the right place.

Specified by:
fillBuffer in class Voice

getAmount

public final int getAmount()
Returns: