com.vwp.sound.mod.modplay.player.autoeffect
Class VolumeEnvelope

java.lang.Object
  extended by com.vwp.sound.mod.modplay.player.autoeffect.VolumeEnvelope
All Implemented Interfaces:
AutoEffect, Envelope

public class VolumeEnvelope
extends java.lang.Object
implements Envelope

an effect controlling the volume of an instrument


Field Summary
static int LOOP
           
static int ON
           
static int SUSTAIN
           
 
Constructor Summary
VolumeEnvelope(int[] offset, double[] volume, int numberOfPoints, int sustainPoint, int loopStart, int loopEnd, int type)
           
 
Method Summary
 void doEffect(TrackState state, int track)
          perform the effect
 boolean isActive()
           
 void keyOff(int track)
          signal to the autoeffect that a key-off note/effect was played
 void newNote(double note, int track)
          tells the autoeffect that a new note is played.
 void reset(int track)
          reset the effect in the given track
 void setNumberOfTracks(int tracks)
          sets the number of track in a module
 void setPosition(int pos, int track)
          set the position of an envelope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ON

public static final int ON
See Also:
Constant Field Values

SUSTAIN

public static final int SUSTAIN
See Also:
Constant Field Values

LOOP

public static final int LOOP
See Also:
Constant Field Values
Constructor Detail

VolumeEnvelope

public VolumeEnvelope(int[] offset,
                      double[] volume,
                      int numberOfPoints,
                      int sustainPoint,
                      int loopStart,
                      int loopEnd,
                      int type)
Method Detail

setNumberOfTracks

public void setNumberOfTracks(int tracks)
Description copied from interface: AutoEffect
sets the number of track in a module

Specified by:
setNumberOfTracks in interface AutoEffect
Parameters:
tracks - the number of tracks in a module

keyOff

public void keyOff(int track)
Description copied from interface: AutoEffect
signal to the autoeffect that a key-off note/effect was played

Specified by:
keyOff in interface AutoEffect

newNote

public void newNote(double note,
                    int track)
Description copied from interface: AutoEffect
tells the autoeffect that a new note is played.

Specified by:
newNote in interface AutoEffect
Parameters:
note - the new note
track - the track where the note is played

doEffect

public void doEffect(TrackState state,
                     int track)
Description copied from interface: AutoEffect
perform the effect

Specified by:
doEffect in interface AutoEffect
Parameters:
state - the state of the track where the effect is used
track - the number of the track where effect is used

isActive

public boolean isActive()

reset

public void reset(int track)
Description copied from interface: AutoEffect
reset the effect in the given track

Specified by:
reset in interface AutoEffect

setPosition

public void setPosition(int pos,
                        int track)
Description copied from interface: Envelope
set the position of an envelope

Specified by:
setPosition in interface Envelope