Packagede.popforge.audio.processor.bitboy.formats
Classpublic class FormatBase
SubclassesXMFormat

The FormatBase class is an abstract descriptor for formats that are read by a tracker. Usually those formats are MOD, XM, IT or S3M.



Public Properties
 PropertyDefined by
  credits : Array
The credits of a song.
FormatBase
  defaultBpm : uint
Default bpm.
FormatBase
  defaultSpeed : uint
Default speed.
FormatBase
  length : uint
The length of the sequence property.
FormatBase
  numChannels : uint
The number of channels.
FormatBase
  numPatterns : uint
The length of the patterns property.
FormatBase
  restartPosition : uint
Default restart position in sequence once song is completed.
FormatBase
  title : String
The title of the current module.
FormatBase
Protected Properties
 PropertyDefined by
  patterns : Array
An Array of patterns.
FormatBase
  sequence : Array
An Array of pattern identifiers.
FormatBase
Public Methods
 MethodDefined by
  
FormatBase(stream:ByteArray)
Creates a new FormatBase object.
FormatBase
  
getChannels(bitboy:BitBoy):Array
Creates and reurns an array of channels.
FormatBase
  
getPatternLength(patternIndex:uint):uint
Returns the number of rows in the pattern at given index.
FormatBase
  
getSequenceAt(sequenceIndex:uint):uint
Finds the pattern index at given position in the sequence.
FormatBase
  
getTriggerAt(patternIndex:uint, rowIndex:uint, channelIndex:uint):TriggerBase
Finds the trigger object at given indices.
FormatBase
  
toString():String
Creates and returns the string representation of the object.
FormatBase
Protected Methods
 MethodDefined by
  
parse(stream:ByteArray):void
FormatBase
Property detail
creditsproperty
public var credits:Array

The credits of a song. In MOD files the samples are used for the credits while in most of the XM files the instruments hold this information.

defaultBpmproperty 
public var defaultBpm:uint

Default bpm.

defaultSpeedproperty 
public var defaultSpeed:uint

Default speed.

lengthproperty 
public var length:uint

The length of the sequence property. Since length property stores the length of the sequence property it is important to keep in mind that the length given in number of patterns instead of seconds or milliseconds for instance.

numChannelsproperty 
public var numChannels:uint

The number of channels.

numPatternsproperty 
public var numPatterns:uint

The length of the patterns property.

patternsproperty 
protected var patterns:Array

An Array of patterns. A pattern is defined as an Array of rows. Each row is an Array of numChannels channels while each channel holds one trigger object.

restartPositionproperty 
public var restartPosition:uint

Default restart position in sequence once song is completed.

sequenceproperty 
protected var sequence:Array

An Array of pattern identifiers. Each identifier is a uint. The sequence variable holds the order in which the patterns are played.

titleproperty 
public var title:String

The title of the current module.

Constructor detail
FormatBase()constructor
public function FormatBase(stream:ByteArray)

Creates a new FormatBase object. Each property of the FormatBase will be set to its default value.

Parameters
stream:ByteArray
Method detail
getChannels()method
public function getChannels(bitboy:BitBoy):Array

Creates and reurns an array of channels.

Parameters
bitboy:BitBoy

Returns
Array — An array of channels.
getPatternLength()method 
public function getPatternLength(patternIndex:uint):uint

Returns the number of rows in the pattern at given index.

Parameters
patternIndex:uint — The index of the pattern.

Returns
uint — Number of rows.
getSequenceAt()method 
public function getSequenceAt(sequenceIndex:uint):uint

Finds the pattern index at given position in the sequence.

Parameters
sequenceIndex:uint — The index in the sequence table.

Returns
uint — The pattern index at given position in the sequence.
getTriggerAt()method 
public function getTriggerAt(patternIndex:uint, rowIndex:uint, channelIndex:uint):TriggerBase

Finds the trigger object at given indices.

Parameters
patternIndex:uint — The index of the pattern.
 
rowIndex:uint — The index of the row.
 
channelIndex:uint — The index of the channel.

Returns
TriggerBase — The trigger at the given position.
parse()method 
protected function parse(stream:ByteArray):voidParameters
stream:ByteArray
toString()method 
public function toString():String

Creates and returns the string representation of the object.

Returns
String — The string represenation of the object.