for (int i = 0; i < allChords.length; i++) {
boolean returner = true;
Motion bass = new Motion(chord.getVoice(VoiceType.BASS),
allChords[i].getVoice(VoiceType.BASS));
Motion tenor = new Motion(chord.getVoice(VoiceType.TENOR),
allChords[i].getVoice(VoiceType.TENOR));
Motion alto = new Motion(chord.getVoice(VoiceType.ALTO),
allChords[i].getVoice(VoiceType.ALTO));
Motion soprano = new Motion(chord.getVoice(VoiceType.SOPRANO),
allChords[i].getVoice(VoiceType.SOPRANO));
//check for invlalid parallel motion
if (bass.compareTo(tenor)) {
if (tenor.isValidInterval(bass) == false)
returner = false;
}
if (bass.compareTo(alto)) {
if (alto.isValidInterval(bass) == false)
returner = false;
}
if (bass.compareTo(soprano)) {
if (soprano.isValidInterval(bass) == false)
returner = false;
}
if (tenor.compareTo(alto)) {
if (alto.isValidInterval(tenor) == false)
returner = false;
}
if (tenor.compareTo(soprano)) {
if (soprano.isValidInterval(tenor) == false)
returner = false;
}
if (alto.compareTo(soprano)) {
if (soprano.isValidInterval(alto) == false)
returner = false;
}
//check for cross voicing
int allChordBassNote = allChords[i].getNoteNumeric(VoiceType.BASS);
int allChordTenorNote = allChords[i].getNoteNumeric(VoiceType.TENOR);
int allChordAltoNote = allChords[i].getNoteNumeric(VoiceType.ALTO);
int allChordSopranoNote = allChords[i].getNoteNumeric(VoiceType.SOPRANO);
int bassNote = chord.getNoteNumeric(VoiceType.BASS);
int tenorNote = chord.getNoteNumeric(VoiceType.TENOR);
int altoNote = chord.getNoteNumeric(VoiceType.ALTO);
int sopranoNote = chord.getNoteNumeric(VoiceType.SOPRANO);
if (allChordBassNote > allChordTenorNote)
returner = false;
if (allChordTenorNote > allChordAltoNote)
returner = false;
if (allChordAltoNote > allChordSopranoNote)
returner = false;
//check for cross voicing in between chords
if (allChordBassNote > tenorNote)
returner = false;
if (allChordTenorNote < bassNote)
returner = false;
if (allChordTenorNote > altoNote)
returner = false;
if (allChordAltoNote < tenorNote)
returner = false;
if (allChordAltoNote > sopranoNote)
returner = false;
if (allChordSopranoNote < altoNote)
returner = false;
//check for invalid skips
if (bass.getDistance() > 7)
returner = false;
if (tenor.getDistance() > 4)
returner = false;
if (alto.getDistance() > 4)
returner = false;
if (soprano.getDistance() > 5)
returner = false;
//iii
if (allChords[i].getSymbol().equals("iii")) {