code: public Note getMiddleNote() {
  		if (m_middleNote == null) {
  			Note ref = getReferenceNote();
  			if ((ref != null) && (getLineNumber() != -1)) {
  				if (m_lineNumber == 3 || isPerc()) {
  					try {
  						m_middleNote = (Note) ref.clone();
  						m_middleNote.setOctaveTransposition((byte)
  							(m_middleNote.getOctaveTransposition()
  									+ m_invisibleOctaveTransp));
  					} catch (CloneNotSupportedException never) {
  						never.printStackTrace();
  					}
  				}
  				else {
  					Interval interval = null;
  					switch(m_lineNumber) {
  					case 1: interval = Interval.PERFECT_FIFTH; break;
  					case 2: interval = Interval.MAJOR_THIRD; break;
  					//case 3: already handled
  					case 4: interval = Interval.reverseOrder(Interval.MAJOR_THIRD); break;
  					case 5: interval = Interval.reverseOrder(Interval.PERFECT_FIFTH); break;
  					}
                      assert interval != null;
                      m_middleNote = interval.calculateSecondNote(ref);
  					m_middleNote.setAccidental(new Accidental());//Accidental.NONE);
  					m_middleNote.setOctaveTransposition((byte)
  							(m_middleNote.getOctaveTransposition()
  									+ m_invisibleOctaveTransp));
  				}
  			}
  		}
  		return m_middleNote;
  	}
docs: Returns the note at the middle of the staff.
  <BR>
  Generally, notes lower or equal will have stems up, and notes
  higher will have stems down.
  <BR>
  Returns :
  <ul><li><TT>B</TT> for treble clef
  <li><TT>C</TT> for alto clef...
  <li><TT>A,</TT> for tenor clef...
  <li><TT>D,</TT> for bass clef...
  <li><TT>B</TT> for "none" clef...
  </ul>
  result may change depending on {@link #getLineNumber()}