|
From: Aaron W. <aw...@hm...> - 2005-06-21 18:23:51
|
I'm running into a problem figuring out exactly what all these magic
numbers in the gui cpn are. For instance, in TrebleStave.java, on line
467 we have:
if ( notePitchNum == REST || phrase.getNote(i).getRhythmValue() == 0.0) {
// rest or delete
pitchTempPos = notePosOffset[71%12] + bPos - 4 + (( 5-
71/12) * 24) + (( 6- 71/12) * 4);
71%12 corresponds to 11, which is the integer 0 in notePosOffset array. Is
there a reason why just 0 isn't there instead? And what does 5-(71/12)
have to do with anything when you can just put in an actual value? Has
anybody documented what all of the numbers in the gui cpn correspond to,
or better yet tried to clean up the code to use more variables and
constants instead of what appears to be numbers found by guess-and-check?
-Aaron Wolin
|