Class CsvFileReader

java.lang.Object
org.jjazz.importers.api.CsvFileReader

public class CsvFileReader extends Object
Read chord symbols from a .csv file.

There are 2 possible formats to specify a chord symbol, BEAT-BASED or TIME-BASED.

BEAT-BASED="bar, beat, chord_symbol"
bar and beat are 0-based by default.

Example:
0, 0, C
1, 0, F7
1, 1.5, Eb7
2, 0, D7
. ..

TIME-BASED="pos_in_seconds, chord_symbol"
The time signature and tempo must be set first so that pos_in_seconds can be converted into bar/beat. If not set, the default values are 4/4 and 120bpm.

Example:
timeSignature=3/4
tempoBPM=60
0, C
3, F7
4.5, Eb7
6, D7
. ..

OTHER FORMAT INFORMATION:
// Put comment after // "title=My song name" : if specified the created song will use this title as name.
"useBase1" : if specified the bar/beat positions start at 1.
Accepted delimiter characters are ',', ';' or space or tab

  • Constructor Details

    • CsvFileReader

      public CsvFileReader(File f)
  • Method Details

    • readSong

      public Song readSong() throws IOException
      Get the song from the current file.

      Construct a Song from the elements available in the file.

      Returns:
      Throws:
      IOException