com.groovemanager.sampled.providers
Interface SMPLChunk

All Known Implementing Classes:
RLNDChunk, WAV909OutputStream

public interface SMPLChunk

This interface provides support for reading/writing Roland MC-909 sample data. MC-909 sample files (wav or aiff) have an additional RLND-Chunk that contains specific information about the sample. This Chunk is represented by this interface.

Author:
Manu Robledo

Field Summary
static byte LOOP_FWD
          Possible loop mode values
static byte LOOP_ONE_SHOT
          Possible loop mode values
static byte LOOP_REV
          Possible loop mode values
static byte LOOP_REV_ONE
          Possible loop mode values
static long MODIFIED909
          Constant file modification date used for MC-909 sample files
static java.lang.String RLND_BEGIN
          Constant String used at the beginning of the chunk
static java.lang.String RLND_ID
          Chunk Id of the RLND-chunk
static int RLND_LENGTH
          Length of the RLND chunk without its header
 
Method Summary
 float getBPM()
          Get the bpm
 short getBPM100()
          Get the bpm multiplied by 100
 byte getFineLoopEnd()
          Get the loop fine end
 byte getFineLoopStart()
          Get the loop fine start
 byte getFineStart()
          Get the sample fine start
 byte getLoopMode()
          Get the loop mode
 int getLoopStart()
          Get the loop start position
 byte getLoopTune()
          Get the loop tune
 byte getRootKey()
          Get the root key
 int getSampleEnd()
          Get the sample end position
 int getSampleLength()
          Get the sample length
 java.lang.String getSampleName()
          Get the name of the sample
 int getSampleStart()
          Get sample start position
 short getTimeStretchType()
          Get the timestretch type
 void setBPM(float bpm)
          Set the bpm
 void setBPM100(short bpm100)
          Set the bpm multiplied by 100
 void setFineLoopEnd(byte fine)
          Set the loop fine end
 void setFineLoopStart(byte fine)
          Set the loop fine start
 void setFineStart(byte fine)
          Set the sample fine start
 void setLoopMode(byte mode)
          Set the loop mode
 void setLoopStart(int start)
          Set the llop start position
 void setLoopTune(byte tune)
          Set the loop tune
 void setRootKey(byte key)
          Set the root key
 void setSampleEnd(int end)
          Set the sample end position
 void setSampleLength(int length)
          Set the sample length
 void setSampleName(java.lang.String s)
          Set the name of the sample
 void setSampleStart(int start)
          Set the sample start position
 void setTimeStretchType(short type)
          Set the timestretch type
 

Field Detail

LOOP_FWD

static final byte LOOP_FWD
Possible loop mode values

See Also:
Constant Field Values

LOOP_ONE_SHOT

static final byte LOOP_ONE_SHOT
Possible loop mode values

See Also:
Constant Field Values

LOOP_REV

static final byte LOOP_REV
Possible loop mode values

See Also:
Constant Field Values

LOOP_REV_ONE

static final byte LOOP_REV_ONE
Possible loop mode values

See Also:
Constant Field Values

MODIFIED909

static final long MODIFIED909
Constant file modification date used for MC-909 sample files

See Also:
Constant Field Values

RLND_BEGIN

static final java.lang.String RLND_BEGIN
Constant String used at the beginning of the chunk

See Also:
Constant Field Values

RLND_ID

static final java.lang.String RLND_ID
Chunk Id of the RLND-chunk

See Also:
Constant Field Values

RLND_LENGTH

static final int RLND_LENGTH
Length of the RLND chunk without its header

See Also:
Constant Field Values
Method Detail

getBPM

float getBPM()
Get the bpm

Returns:
The bpm in the range from 5.0 to 300.0

getBPM100

short getBPM100()
Get the bpm multiplied by 100

Returns:
The bpm multiplied by 100 in the range from 500 to 30000

getFineLoopEnd

byte getFineLoopEnd()
Get the loop fine end

Returns:
The loop fine end

getFineLoopStart

byte getFineLoopStart()
Get the loop fine start

Returns:
The loop fine start

getFineStart

byte getFineStart()
Get the sample fine start

Returns:
The sample fine start

getLoopMode

byte getLoopMode()
Get the loop mode

Returns:
The loop mode

getLoopStart

int getLoopStart()
Get the loop start position

Returns:
The loop start position

getLoopTune

byte getLoopTune()
Get the loop tune

Returns:
The loop tune

getRootKey

byte getRootKey()
Get the root key

Returns:
The root key

getSampleEnd

int getSampleEnd()
Get the sample end position

Returns:
The sample end position

getSampleLength

int getSampleLength()
Get the sample length

Returns:
The sample length in sample frames

getSampleName

java.lang.String getSampleName()
Get the name of the sample

Returns:
A String of length 16 containing the sample name

getSampleStart

int getSampleStart()
Get sample start position

Returns:
The sample start position

getTimeStretchType

short getTimeStretchType()
Get the timestretch type

Returns:
The timestretch type

setBPM

void setBPM(float bpm)
Set the bpm

Parameters:
bpm - The bpm in the range from 5.0 to 300.0

setBPM100

void setBPM100(short bpm100)
Set the bpm multiplied by 100

Parameters:
bpm100 - The bpm multiplied by 100 in the range from 500 to 30000

setFineLoopEnd

void setFineLoopEnd(byte fine)
Set the loop fine end

Parameters:
fine - The loop fine end

setFineLoopStart

void setFineLoopStart(byte fine)
Set the loop fine start

Parameters:
fine - The loop fine start

setFineStart

void setFineStart(byte fine)
Set the sample fine start

Parameters:
fine - The sample fine start

setLoopMode

void setLoopMode(byte mode)
Set the loop mode

Parameters:
mode - The loop mode

setLoopStart

void setLoopStart(int start)
Set the llop start position

Parameters:
start - The loop start position

setLoopTune

void setLoopTune(byte tune)
Set the loop tune

Parameters:
tune - The loop tune

setRootKey

void setRootKey(byte key)
Set the root key

Parameters:
key - The root key

setSampleEnd

void setSampleEnd(int end)
Set the sample end position

Parameters:
end - The sample end position

setSampleLength

void setSampleLength(int length)
Set the sample length

Parameters:
length - The sample length in sample frames

setSampleName

void setSampleName(java.lang.String s)
Set the name of the sample

Parameters:
s - A String containing the name. The name will be filled up or shortened to length 16 if needed

setSampleStart

void setSampleStart(int start)
Set the sample start position

Parameters:
start - The sample start position

setTimeStretchType

void setTimeStretchType(short type)
Set the timestretch type

Parameters:
type - The timestretch type