|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dguitar.codecs.guitarPro.GPInputStream dguitar.codecs.guitarPro.version2.GP2InputStream
The class GP2InputStream allows to parse an InputStream containing a GTP file which is encoded in the 2.20 or 2.21 format.
Field Summary | |
private static java.util.List |
_files
|
private static int |
_total
|
private static java.lang.String[] |
supportedVersions
The versions this parser supports. |
Fields inherited from class dguitar.codecs.guitarPro.GPInputStream |
__fileName, __version |
Constructor Summary | |
GP2InputStream(GPInputStream gpIn)
Creates a new GP4InputStream by cloning an existing GPInputStream. |
|
GP2InputStream(java.io.InputStream in)
Creates a new GP2InputStream from an existing stream. |
Method Summary | |
private static void |
decodeGP2InDirectory(java.io.File dir)
Decode recursively all the GP2 files in the directory specified. |
static void |
main(java.lang.String[] args)
The main function. |
private GPBeat |
readBeat(int trackNumberOfStrings)
Returns a beat read from a GP2 file. |
private GPBend |
readBend(GPBendType bendType)
Reads a bend from the stream. |
private GPChordDiagram |
readChordDiagram()
Reads a ChordDiagram from the stream. |
private void |
readEffectsOnBeat(GP2EffectsOnBeat gp2effects,
GPEffectsOnBeat eob)
Reads effects on the current beat from the stream. |
private GPEffectsOnNote |
readEffectsOnNote()
Reads effects on the current note from the stream. |
private GPGraceNote |
readGraceNote()
The grace notes are stored in the file with 4 variables, written in the followingorder. |
private void |
readMeasureTrackPairs(java.util.List tracks,
GPMeasure measure,
java.util.List mtpList)
Reads a pair of "measure-track". |
private GPMixTableChange |
readMixTableChange()
Reads a mix table change event from the stream. |
private GPNote |
readNote()
Reads a note (which here means only the fret and the dynamic). |
GPSong |
readPiece()
Reads a piece from the stream. |
private GPMIDIChannel |
readTrack(GPTrack track)
Reads a track from the stream. |
static boolean |
supportedVersion(java.lang.String version)
This method checks if the String version if supported. |
static java.lang.String |
supportedVersions()
This methods returns a String with the supported versions separated by '\n'. |
Methods inherited from class dguitar.codecs.guitarPro.GPInputStream |
assertBytesEqualTo, close, dumpBytes, dumpInts, read, read, readBoolean, readByte, readDouble, readFloat, readInt, readLong, readObject, readStringByte, readStringByteMaxLengthPlusOne, readStringInteger, readStringIntegerPlusOne, readUnsignedByte, skip, supportedExtension |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String[] supportedVersions
private static final java.util.List _files
private static int _total
Constructor Detail |
public GP2InputStream(java.io.InputStream in)
public GP2InputStream(GPInputStream gpIn)
gpIn
- the original GPInputStream.Method Detail |
public static boolean supportedVersion(java.lang.String version)
version
- the version described by a string.
public static java.lang.String supportedVersions()
public GPSong readPiece() throws java.io.IOException
java.io.IOException
private GPBeat readBeat(int trackNumberOfStrings) throws java.io.IOException
trackNumberOfStrings
- the number of strings of the track we are currently reading.
java.io.IOException
private GPBend readBend(GPBendType bendType) throws java.io.IOException
java.io.IOException
private GPChordDiagram readChordDiagram() throws java.io.IOException
java.io.IOException
GPFormatException
private void readEffectsOnBeat(GP2EffectsOnBeat gp2effects, GPEffectsOnBeat eob) throws java.io.IOException
java.io.IOException
private GPEffectsOnNote readEffectsOnNote() throws java.io.IOException
java.io.IOException
private GPGraceNote readGraceNote() throws java.io.IOException
java.io.IOException
private void readMeasureTrackPairs(java.util.List tracks, GPMeasure measure, java.util.List mtpList) throws java.io.IOException
tracks
- a list containing the information about the tracks.measure
- the GPMeasure that will hold the data read from the file.mtpList
- the list of GPMeasureTrackPair.
java.io.IOException
private GPMixTableChange readMixTableChange() throws java.io.IOException
java.io.IOException
private GPNote readNote() throws java.io.IOException
java.io.IOException
private GPMIDIChannel readTrack(GPTrack track) throws java.io.IOException
track
- a GPTrack where the data will be written
java.io.IOException
public static void main(java.lang.String[] args)
args
- private static void decodeGP2InDirectory(java.io.File dir)
dir
- The directory to decode files from.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |