package chords.expression;
import static chords.util.Escala.getNotaEscalaBemol;
import static chords.util.Escala.getNotaEscalaSustenido;
public class Exp7Maior extends Nota {
public Exp7Maior(Nota nota, String setmaior) {
super(nota, setmaior);
}
@Override
public boolean checaNota() {
return true;
}
@Override
public String getFormacaoDaNota() {
Nota notaBase = getNotaBase();
String setMaiorNota;
while (true) {
if (notaBase instanceof ExpNota || notaBase instanceof ExpSustenido) {
String nota = notaBase.getNota();
setMaiorNota = getNotaEscalaSustenido(nota, 11);
break;
} else if (notaBase instanceof ExpBemol) {
String nota = notaBase.getNota();
setMaiorNota = getNotaEscalaBemol(nota, 11);
break;
}
notaBase = notaBase.getNotaBase();
}
return getNotaBase().getFormacaoDaNota() + " - " + setMaiorNota;
}
}