micromod
Class ProTrackerLFO
java.lang.Object
micromod.ProTrackerLFO
- public class ProTrackerLFO
- extends java.lang.Object
An "LFO" so the Modulator can do vibrato, tremolo etc.
Method Summary |
void |
reset()
Set the LFO to default values. |
void |
setWaveform(int wave,
boolean retrig)
Set the LFO waveform to that which is specified (amazingly) |
int |
update(int speed,
boolean newNote)
Update the oscillator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WF_SINUS
public static final int WF_SINUS
- See Also:
- Constant Field Values
WF_SAWDN
public static final int WF_SAWDN
- See Also:
- Constant Field Values
WF_SQUARE
public static final int WF_SQUARE
- See Also:
- Constant Field Values
WF_RANDOM
public static final int WF_RANDOM
- See Also:
- Constant Field Values
sinTable
protected static int[] sinTable
waveform
protected int waveform
position
protected int position
value
protected int value
retrig
protected boolean retrig
ProTrackerLFO
public ProTrackerLFO()
reset
public void reset()
- Set the LFO to default values.
setWaveform
public void setWaveform(int wave,
boolean retrig)
- Set the LFO waveform to that which is specified (amazingly)
- Parameters:
wave
- The waveform ID. See above.retrig
- If true, retrigger the waveform at new note.
update
public int update(int speed,
boolean newNote)
- Update the oscillator.
- Parameters:
speed
- The amount to advance the LFO.newNote
- If true, the waveform is retriggered if required.
- Returns:
- the current value between -255 and 255.