Package org.jfugue.pattern
Class TrackTable
- java.lang.Object
-
- org.jfugue.pattern.TrackTable
-
- All Implemented Interfaces:
PatternProducer
public class TrackTable extends java.lang.Object implements PatternProducer
-
-
Field Summary
Fields Modifier and Type Field Description static int
NUM_TRACKS
static int
RHYTHM_TRACK
-
Constructor Summary
Constructors Constructor Description TrackTable(int length, double cellDuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TrackTable
clear(int track, int position)
PatternProducer
get(int track, int position)
int
getLength()
Pattern
getPattern()
Returns a patternPattern
getPatternAt(int column)
java.util.List<PatternProducer>
getTrack(int track)
PatternProducer
getTrackSettings(int track)
TrackTable
put(int track, int start, int end, PatternProducer patternProducer)
As part of JFugue's fluent API, this method returns the instance of this class.TrackTable
put(int track, int position, PatternProducer patternProducer)
TrackTable
put(int track, int start, PatternProducer... patternProducers)
TrackTable
put(int track, java.lang.String periodMeansNo_DashMeansExtend_OtherMeansYes, PatternProducer patternProducer)
Lets you specify which cells in the TrackTable should be populated with the given PatternProducer by using a String in which a period means "not in this cell" and any other character means "in this cell".TrackTable
put(Rhythm rhythm)
TrackTable
putAtIntervals(int track, int first, int nth, int end, PatternProducer patternProducer)
Puts the given pattern in the track table at every 'nth' position, starting with position 'first' and ending with 'end'TrackTable
putAtIntervals(int track, int nth, PatternProducer patternProducer)
Puts the given pattern in the track table at every 'nth' positionTrackTable
reset(int track, int position)
TrackTable
setTrackSettings(int track, java.lang.String s)
TrackTable
setTrackSettings(int track, PatternProducer p)
java.lang.String
toString()
-
-
-
Field Detail
-
NUM_TRACKS
public static final int NUM_TRACKS
- See Also:
- Constant Field Values
-
RHYTHM_TRACK
public static final int RHYTHM_TRACK
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTrack
public java.util.List<PatternProducer> getTrack(int track)
-
put
public TrackTable put(int track, int position, PatternProducer patternProducer)
-
put
public TrackTable put(int track, int start, PatternProducer... patternProducers)
-
putAtIntervals
public TrackTable putAtIntervals(int track, int nth, PatternProducer patternProducer)
Puts the given pattern in the track table at every 'nth' position
-
putAtIntervals
public TrackTable putAtIntervals(int track, int first, int nth, int end, PatternProducer patternProducer)
Puts the given pattern in the track table at every 'nth' position, starting with position 'first' and ending with 'end'
-
put
public TrackTable put(int track, int start, int end, PatternProducer patternProducer)
As part of JFugue's fluent API, this method returns the instance of this class.- Parameters:
track
-start
-end
-patternProducer
-- Returns:
- The instance of this class
-
put
public TrackTable put(int track, java.lang.String periodMeansNo_DashMeansExtend_OtherMeansYes, PatternProducer patternProducer)
Lets you specify which cells in the TrackTable should be populated with the given PatternProducer by using a String in which a period means "not in this cell" and any other character means "in this cell". Example: put(1, pattern, "...XXXX..XX....XXXX..XX....");- Parameters:
track
-periodMeansNoOtherMeansYes
-patternProducer
-- Returns:
-
put
public TrackTable put(Rhythm rhythm)
-
get
public PatternProducer get(int track, int position)
-
clear
public TrackTable clear(int track, int position)
-
reset
public TrackTable reset(int track, int position)
-
getLength
public int getLength()
-
setTrackSettings
public TrackTable setTrackSettings(int track, PatternProducer p)
-
setTrackSettings
public TrackTable setTrackSettings(int track, java.lang.String s)
-
getTrackSettings
public PatternProducer getTrackSettings(int track)
-
getPatternAt
public Pattern getPatternAt(int column)
-
getPattern
public Pattern getPattern()
Description copied from interface:PatternProducer
Returns a pattern- Specified by:
getPattern
in interfacePatternProducer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-