public class MidiFileFormat extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
byteLength |
protected float |
divisionType |
static int |
HEADER_MThd |
static int |
HEADER_MTrk |
protected long |
microsecondLength |
protected int |
resolution |
protected int |
type |
static int |
UNKNOWN_LENGTH |
Constructor and Description |
---|
MidiFileFormat(int type,
float divisionType,
int resolution,
int bytes,
long microseconds)
Constructor without properties
|
MidiFileFormat(int type,
float divisionType,
int resolution,
int bytes,
long microseconds,
Map<String,Object> properties)
Constructor with properties
|
Modifier and Type | Method and Description |
---|---|
int |
getByteLength()
Get the length of
MidiFileFormat |
float |
getDivisionType()
Get the division type of
MidiFileFormat |
long |
getMicrosecondLength()
Get the length in microseconds of
MidiFileFormat |
Object |
getProperty(String key)
Get the property of
MidiFileFormat |
int |
getResolution()
Get the resolution of
MidiFileFormat |
int |
getType()
Get the type of
MidiFileFormat |
Map<String,Object> |
properties()
Get properties
Map of MidiFileFormat |
public static final int HEADER_MThd
public static final int HEADER_MTrk
public static final int UNKNOWN_LENGTH
protected int byteLength
protected float divisionType
protected long microsecondLength
protected int resolution
protected int type
public MidiFileFormat(int type, float divisionType, int resolution, int bytes, long microseconds)
type
- 0(SMF 0), or 1(SMF 1)divisionType
- Sequence.PPQ
, Sequence.SMPTE_24
, Sequence.SMPTE_25
, Sequence.SMPTE_30DROP
, or Sequence.SMPTE_30
.resolution
- Sequence.PPQ
: 0 - 0x7fff. typically 24, 480Sequence.SMPTE_24
, Sequence.SMPTE_25
, Sequence.SMPTE_30DROP
, Sequence.SMPTE_30
: 0 - 0xffbytes
- the length of filemicroseconds
- the length of time(in micro seconds)public MidiFileFormat(int type, float divisionType, int resolution, int bytes, long microseconds, @NonNull Map<String,Object> properties)
type
- 0(SMF 0), or 1(SMF 1)divisionType
- Sequence.PPQ
, Sequence.SMPTE_24
, Sequence.SMPTE_25
, Sequence.SMPTE_30DROP
, or Sequence.SMPTE_30
.resolution
- Sequence.PPQ
: 0 - 0x7fff. typically 24, 480Sequence.SMPTE_24
, Sequence.SMPTE_25
, Sequence.SMPTE_30DROP
, Sequence.SMPTE_30
: 0 - 0xffbytes
- the length of filemicroseconds
- the length of time(in micro seconds)properties
- the propertiespublic int getByteLength()
MidiFileFormat
public float getDivisionType()
MidiFileFormat
public long getMicrosecondLength()
MidiFileFormat
@Nullable public Object getProperty(String key)
MidiFileFormat
key
- the property namepublic int getResolution()
MidiFileFormat
public int getType()
MidiFileFormat