org.jfugue.extras
Class FilePlayer

java.lang.Object
  extended by org.jfugue.extras.FilePlayer

public class FilePlayer
extends java.lang.Object

Plays music strings from a text file.

Here's a sample file:

 #
 # "Inventio 13" - Beethoven   (First Measure)
 #

 V1 T160
 V1 Rs  E4s A4s C5s B4s E4s B4s D5s C5i      E5i     G#4i    E5i
 V2 A2i     A3q             G#3i    A3s G#3s A3s C4s B3s E3s B3s D4s

Note the use of # as a comment character when used as the first character of a line.

To use FilePlayer, enter "java org.jfugue.FilePlayer input-filename [output-filename]" from the command prompt, where input-filename is the name of your text file that specifies the music, and output-filename is the name of the MIDI file to create. (If you don't give output-filename, it will default to player.mid)

Version:
2.0
Author:
David Koelle

Constructor Summary
FilePlayer()
           
 
Method Summary
static void main(java.lang.String[] args)
          Given a filename, returns a string of the contents of that file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePlayer

public FilePlayer()
Method Detail

main

public static void main(java.lang.String[] args)
Given a filename, returns a string of the contents of that file. If the file contains properly-formed music strings, then the contents of the file can be placed directly into a Pattern.

This method will regard any line that begins with a # character as a comment, and will not return the commented line. Note - # characters at locations other than the first character of a line will not be seen as comment characters.