package chords.expression;
import static chords.util.Escala.getNotaEscalaBemol;
import static chords.util.Escala.getNotaEscalaSustenido;
public class ExpAumentada extends Nota {
public ExpAumentada(Nota nota) {
super(nota, "(#5)");
}
@Override
public boolean checaNota() {
return getNotaBase() instanceof ExpNota ||
getNotaBase() instanceof ExpBemol ||
getNotaBase() instanceof ExpSustenido;
}
@Override
public String getFormacaoDaNota() {
String notaBase = getNotaBase().getNota();
if (getNotaBase() instanceof ExpBemol) {
return String.format("%s - %s - %s", notaBase,
getNotaEscalaBemol(notaBase, 4),
getNotaEscalaBemol(notaBase, 8));
}
return String.format("%s - %s - %s", getNotaBase().getNota(),
getNotaEscalaSustenido(notaBase, 4),
getNotaEscalaSustenido(notaBase, 8));
}
}