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

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

public class XmAutoEffects
extends java.lang.Object
implements Envelope

Tiis class is necessery because the envelopes of an .XM module doesn't operate entirely independently. The only real work done by this class is to, in the constructor, test if the volume envelope is active and, if so, activate the fadeout effect. All other calls are passed on to the individual effects. This should really be reimplemented as a test in Fadeout instead....


Constructor Summary
XmAutoEffects(VolumeEnvelope volEnv, PanningEnvelope panEnv, AutoVibrato autoVib, Fadeout fadeout)
           
 
Method Summary
 void doEffect(TrackState state, int track)
          perform the effect
 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
 

Constructor Detail

XmAutoEffects

public XmAutoEffects(VolumeEnvelope volEnv,
                     PanningEnvelope panEnv,
                     AutoVibrato autoVib,
                     Fadeout fadeout)
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

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

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

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