private static void updateKey(KeySignature key, Note note) { if (!note.getAccidental().isInTheKey()) { key.setAccidental(note.getStrictHeight(), note.getAccidental()); } }