|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vwp.sound.mod.modplay.player.autoeffect.Fadeout
public class Fadeout
an effect controlling how an instrument gradually fades out when it is released (key off) This effect maintains a fadeout value and a counter. The volume is calculated by: new_vol = vol * (1 - fadeout * counter) The counter is increased each tick after the effect is activated.
Constructor Summary | |
---|---|
Fadeout(double fadeout)
cerates an fadeout effect with a given fadeout level |
Method Summary | |
---|---|
void |
activate()
The fadeout effect should only be active if the instrument has an active volume envelope |
void |
deActivate()
The fadeout effect should only be active if the instrument has an active volume envelope |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Fadeout(double fadeout)
fadeout
- Method Detail |
---|
public void setNumberOfTracks(int tracks)
AutoEffect
setNumberOfTracks
in interface AutoEffect
tracks
- the number of tracks in a modulepublic void doEffect(TrackState state, int track)
AutoEffect
doEffect
in interface AutoEffect
state
- the state of the track where the effect is usedtrack
- the number of the track where effect is usedpublic void keyOff(int track)
AutoEffect
keyOff
in interface AutoEffect
public void newNote(double note, int track)
AutoEffect
newNote
in interface AutoEffect
note
- the new notetrack
- the track where the note is playedpublic void reset(int track)
AutoEffect
reset
in interface AutoEffect
public void activate()
public void deActivate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |