@@ -0,0 +1,1829 @@
+package tonality;%0A%0Aimport jm.constants.Pitches;%0Aimport jm.music.data.Note;%0A%0Apublic class Tonality %7B%0A    public enum Mode %7B%0A        MAJOR,%0A        MINOR,%0A        HARMONICMINOR,%0A        MELODICMINOR%0A    %7D%0A%0A    private Integer tonic_;%0A    private Mode mode_;%0A%0A    public Tonality(int tonic, Mode mode) %7B%0A        this.tonic_ = tonic;%0A        this.mode_ = mode;%0A    %7D%0A%0A    public Mode getMode() %7B%0A        return this.mode_;%0A    %7D%0A%0A    public Integer getTonic() %7B%0A        return this.tonic_;%0A    %7D%0A%0A    public String toString() %7B%0A        StringBuilder sb = new StringBuilder();%0A        if (mode_ == Mode.HARMONICMINOR)%0A            sb.append(%22Harmonic %22);%0A        else if (mode_ == Mode.MELODICMINOR)%0A            sb.append(%22Melodic %22);%0A%0A        sb.append(pitchToString(tonic_)).append(%22 %22);%0A        if (mode_ == Mode.MAJOR)%0A            sb.append(%22Major%22);%0A        else%0A            sb.append(%22Minor%22);%0A        return sb.toString();%0A    %7D%0A%0A    public static String pitchToString(int pitch) %7B%0A        pitch = pitch %25 12;%0A        switch (pitch) %7B%0A            case Pitches.C0 %25 12:%0A                return %22C%22;%0A            case Pitches.CS0 %25 12:%0A                return %22C#%22;%0A            case Pitches.D0 %25 12:%0A                return %22D%22;%0A            case Pitches.DS0 %25 12:%0A                return %22D#%22;%0A            case Pitches.E0 %25 12:%0A                return %22E%22;%0A            case Pitches.F0 %25 12:%0A                return %22F%22;%0A            case Pitches.FS0 %25 12:%0A                return %22F#%22;%0A            case Pitches.G0 %25 12:%0A                return %22G%22;%0A            case Pitches.GS0 %25 12:%0A                return %22G#%22;%0A            case Pitches.A0 %25 12:%0A                return %22A%22;%0A            case Pitches.AS0 %25 12:%0A                return %22A#%22;%0A            case Pitches.B0 %25 12:%0A                return %22B%22;%0A        %7D%0A        return null;%0A    %7D%0A%7D%0A

add Tonality class