package chords.expression;
import static chords.util.Escala.getNotaEscalaBemol;
import static chords.util.Escala.getNotaEscalaSustenido;
public class ExpDim extends Nota {
public ExpDim(Nota nota) {
super(nota, "m(b5)");
}
@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, 3),
getNotaEscalaBemol(notaBase, 6));
}
return String.format("%s - %s - %s", getNotaBase().getNota(),
getNotaEscalaSustenido(notaBase, 3),
getNotaEscalaSustenido(notaBase, 6));
}
}