Define inverted chord with roman numerals with JFugue

75 Views Asked by At

This pdf says that inverted chords can be defined by adding ^ to the end of a chord definition, but this only works with explicit chord definitions as far as I can tell.

For example:

ChordProgression cp = new ChordProgression("I^");
cp.setKey("C");
System.out.println(cp.getChords()[0].getBassNote());
Chord c = new Chord("Cmaj^");
System.out.println(c.getBassNote());

Outputs:

C
E

Even though both should be E

1

There are 1 best solutions below

0
On

Thanks to your suggestion, this is now possible using JFugue 5.0.9.

// This will result in "C4MAJ D4MAJ^ E4MAJ^^ F4MAJ^^^ G4MIN^^^ A4MIN^^ B4MIN^"
// (using C4 as the default root note for each of the chords, unless otherwise
// specified by setRoot("note"). 
ChordProgression cp = new ChordProgression("I II^ III^^ IV^^^ v^^^ vi^^ vii^");