|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dixshtix.niff.ToMidi
Dump chunk information about a niff file.
Based on code placed in the Public Domain 1995,1996 Timothy Butler.
Field Summary | |
protected java.util.List |
conductor
|
protected java.lang.Object |
current
|
protected FourByteConstant |
currentChunk
|
protected int |
measureTimeSlice
|
protected int |
noteEnd
|
protected int |
noteMidiValue
|
protected boolean |
notePending
|
protected int |
noteStaffStep
|
protected int |
noteStart
|
protected int |
noteVelocity
|
protected int |
otherTimeSlice
|
protected java.io.BufferedOutputStream |
out
Output stream. |
protected int |
partAbbreviation
|
protected int |
partCable
|
protected int |
partChannel
|
protected java.lang.Integer |
partID
|
protected int |
partName
|
protected java.util.Map |
parts
|
protected int |
partTranspose
|
static java.lang.String |
Progname
Program name. |
static java.lang.String |
rcsid
Source file update. |
protected Opus |
smf
|
protected int |
tempoNoteValue
|
protected int |
tempoNoteValueBottom
|
protected int |
tempoNoteValueTop
|
protected int |
timeSignatureTopNumber
|
protected int |
timeSliceType
|
Constructor Summary | |
ToMidi(java.io.BufferedOutputStream out)
Constructor. |
Method Summary | |
void |
addEvent(java.util.List events,
int time,
EventType type,
java.lang.Object[] params,
boolean prepend)
|
void |
beginContainerChunk(FourByteConstant containerType,
FourByteConstant chunkType,
NiffParserContext context)
|
void |
beginMiscChunk(java.lang.String chunkType,
NiffParserContext context)
|
void |
beginNiffChunk(FourByteConstant chunkType,
int expectedLength,
NiffParserContext context)
Handle known-length Niff Chunks which may have Tags appended to them. |
void |
beginNiffTag(byte tagID,
NiffParserContext context)
|
void |
beginRiffChunk(FourByteConstant chunkType,
NiffParserContext context)
|
void |
byteAttribute(java.lang.String attribute,
int value,
NiffParserContext context)
|
static int |
cvtStaffStepToMidiNote(byte staffStep,
java.util.Map part)
Convert staff step (7 note names) to Midi notes (12 semitones). |
void |
dataBytes(byte[] data,
int offset,
int length,
NiffParserContext context)
|
void |
endContainerChunk(FourByteConstant containerType,
FourByteConstant chunkType,
NiffParserContext context)
|
void |
endMiscChunk(java.lang.String chunkType,
NiffParserContext context)
|
void |
endNiffChunk(FourByteConstant chunkType,
NiffParserContext context)
Finish Niff Chunk and any Tags. |
void |
endNiffTag(byte tagID,
NiffParserContext context)
|
void |
endRiffChunk(FourByteConstant chunkType,
NiffParserContext context)
|
void |
fillMiscChunk(java.lang.String chunkType,
NiffParserContext context)
|
void |
fillNiffChunk(FourByteConstant chunkType,
NiffParserContext context)
|
void |
fillNiffTag(byte tagID,
NiffParserContext context)
|
void |
fillRiffChunk(FourByteConstant chunkType,
NiffParserContext context)
|
void |
fontidxAttribute(java.lang.String attribute,
int value,
NiffParserContext context)
|
void |
fourccAttribute(java.lang.String attribute,
FourByteConstant value,
NiffParserContext context)
|
void |
longAttribute(java.lang.String attribute,
int value,
NiffParserContext context)
|
static void |
main(java.lang.String[] args)
Main routine for opening a RIFF file and dumping schematic of contents to the System.out; |
void |
rationalAttribute(java.lang.String attribute,
int top,
int bottom,
NiffParserContext context)
|
void |
shortAttribute(java.lang.String attribute,
int value,
NiffParserContext context)
Handle short (2-byte signed integer) attributes. |
void |
signedbyteAttribute(java.lang.String attribute,
byte value,
NiffParserContext context)
Handle signedbyte (1-byte signed integer) attributes. |
void |
stringAttribute(java.lang.String attribute,
java.lang.String value,
NiffParserContext context)
|
java.lang.String |
stringOffsetToString(int stroffset,
byte[] strings)
|
void |
stroffsetAttribute(java.lang.String attribute,
int value,
NiffParserContext context)
|
(package private) static void |
usage(java.io.PrintStream ps)
List program arguments for user. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static java.lang.String rcsid
public static java.lang.String Progname
protected java.io.BufferedOutputStream out
protected java.lang.Object current
protected FourByteConstant currentChunk
protected Opus smf
protected java.lang.Integer partID
protected int partChannel
protected int partCable
protected int partTranspose
protected int partName
protected int partAbbreviation
protected java.util.Map parts
protected java.util.List conductor
protected int timeSliceType
protected int measureTimeSlice
protected int otherTimeSlice
protected int timeSignatureTopNumber
protected int tempoNoteValue
protected int tempoNoteValueTop
protected int tempoNoteValueBottom
protected boolean notePending
protected int noteVelocity
protected int noteMidiValue
protected int noteStaffStep
protected int noteStart
protected int noteEnd
Constructor Detail |
public ToMidi(java.io.BufferedOutputStream out)
Method Detail |
public static int cvtStaffStepToMidiNote(byte staffStep, java.util.Map part)
public void addEvent(java.util.List events, int time, EventType type, java.lang.Object[] params, boolean prepend)
public java.lang.String stringOffsetToString(int stroffset, byte[] strings)
static void usage(java.io.PrintStream ps)
public static void main(java.lang.String[] args)
public void beginContainerChunk(FourByteConstant containerType, FourByteConstant chunkType, NiffParserContext context)
beginContainerChunk
in interface NiffParserListener
public void beginMiscChunk(java.lang.String chunkType, NiffParserContext context)
beginMiscChunk
in interface NiffParserListener
public void beginNiffChunk(FourByteConstant chunkType, int expectedLength, NiffParserContext context)
If ChunkLengthTable.NiffInfo
then Opus.setFormat(int)
to 1.
beginNiffChunk
in interface NiffParserListener
public void beginNiffTag(byte tagID, NiffParserContext context)
beginNiffTag
in interface NiffParserListener
public void beginRiffChunk(FourByteConstant chunkType, NiffParserContext context)
beginRiffChunk
in interface NiffParserListener
public void endContainerChunk(FourByteConstant containerType, FourByteConstant chunkType, NiffParserContext context)
endContainerChunk
in interface NiffParserListener
public void endMiscChunk(java.lang.String chunkType, NiffParserContext context)
endMiscChunk
in interface NiffParserListener
public void endNiffChunk(FourByteConstant chunkType, NiffParserContext context)
If ChunkLengthTable.Part
then create part, with placeholders
for strings.
endNiffChunk
in interface NiffParserListener
public void endNiffTag(byte tagID, NiffParserContext context)
endNiffTag
in interface NiffParserListener
public void endRiffChunk(FourByteConstant chunkType, NiffParserContext context)
endRiffChunk
in interface NiffParserListener
public void fillMiscChunk(java.lang.String chunkType, NiffParserContext context)
fillMiscChunk
in interface NiffParserListener
public void fillNiffChunk(FourByteConstant chunkType, NiffParserContext context)
fillNiffChunk
in interface NiffParserListener
public void fillNiffTag(byte tagID, NiffParserContext context)
fillNiffTag
in interface NiffParserListener
public void fillRiffChunk(FourByteConstant chunkType, NiffParserContext context)
fillRiffChunk
in interface NiffParserListener
public void byteAttribute(java.lang.String attribute, int value, NiffParserContext context)
byteAttribute
in interface NiffParserListener
public void dataBytes(byte[] data, int offset, int length, NiffParserContext context)
dataBytes
in interface NiffParserListener
public void fontidxAttribute(java.lang.String attribute, int value, NiffParserContext context)
fontidxAttribute
in interface NiffParserListener
public void fourccAttribute(java.lang.String attribute, FourByteConstant value, NiffParserContext context)
fourccAttribute
in interface NiffParserListener
public void longAttribute(java.lang.String attribute, int value, NiffParserContext context)
longAttribute
in interface NiffParserListener
public void rationalAttribute(java.lang.String attribute, int top, int bottom, NiffParserContext context)
rationalAttribute
in interface NiffParserListener
public void shortAttribute(java.lang.String attribute, int value, NiffParserContext context)
If ChunkLengthTable.NiffInfo
then Opus.setTicks(int)
to "midiClocksPerQuarter" unless -1.
If ChunkLengthTable.Part
then save partID for part Creation.
shortAttribute
in interface NiffParserListener
public void signedbyteAttribute(java.lang.String attribute, byte value, NiffParserContext context)
If ChunkLengthTable.Part
then save midiChannel, midiCable
and transpose for part Creation.
signedbyteAttribute
in interface NiffParserListener
public void stringAttribute(java.lang.String attribute, java.lang.String value, NiffParserContext context)
stringAttribute
in interface NiffParserListener
public void stroffsetAttribute(java.lang.String attribute, int value, NiffParserContext context)
stroffsetAttribute
in interface NiffParserListener
|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |