com.vwp.sound.mod.modplay.module
Class Track

java.lang.Object
  extended by com.vwp.sound.mod.modplay.module.Track

public class Track
extends java.lang.Object

A track is a column in a pattern.


Field Summary
static int NO_INSTRUMENT
          a constant that indicates that no new intrument shall be played in a track
 
Constructor Summary
Track(int divisions)
          creates an empty track
 
Method Summary
 int getEffect(int div, int n)
           
 int getEffectArg1(int div, int n)
           
 int getEffectArg2(int div, int n)
           
 java.lang.String getInfo(int div)
           
 int getInstrumentNumber(int div)
           
 int getNote(int div)
           
 int getNumberOfEffects(int div)
           
 void initDivision(int division, int instrumentNumber, int note, int[] effects, int[] effectArg1, int[] effectArg2)
          initializes a division int the track.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_INSTRUMENT

public static final int NO_INSTRUMENT
a constant that indicates that no new intrument shall be played in a track

See Also:
Constant Field Values
Constructor Detail

Track

public Track(int divisions)
creates an empty track

Parameters:
divisions - number of divisions in the track
Method Detail

initDivision

public void initDivision(int division,
                         int instrumentNumber,
                         int note,
                         int[] effects,
                         int[] effectArg1,
                         int[] effectArg2)
initializes a division int the track. Each division can have several effects. It is unsafe to not initialize all the divisions in the track!

Parameters:
division - the division to be initialized
instrumentNumber - the number of the instrument to be played at this division in the track (or NO_INSTRUMENT)
note - the note to be played
effects - the effects to be played (can be null)
effectArg1 - the first argument to the effects (can be null)
effectArg2 - the second argument to the effects (can be null)

getInstrumentNumber

public int getInstrumentNumber(int div)
Returns:
the number of the instrument to be played at the div'th division in this track

getNote

public int getNote(int div)
Returns:
the note to be played in the div'th division.

getNumberOfEffects

public int getNumberOfEffects(int div)
Returns:
the number of effects to be played at division div

getEffect

public int getEffect(int div,
                     int n)
Parameters:
div -
n -
Returns:
the n'th effect at the div'th division

getEffectArg1

public int getEffectArg1(int div,
                         int n)
Parameters:
div -
n -
Returns:
the 1st argument to the n'th effect at the div'th division

getEffectArg2

public int getEffectArg2(int div,
                         int n)
Parameters:
div -
n -
Returns:
the 2nd argument to the n'th effect at the div'th division

getInfo

public java.lang.String getInfo(int div)
Returns:
information about the div'th division of this track in "human readable" form :)