private static int DetermineColumn(UnproccessedNote note, UnproccessedNote prevNote, int distance, int prevNoteCol, List <AHNote> ahNotes) { int column; // If both notes are at the same time it's a cord which should be more spread out var sameTime = note.time == prevNote.time; // Prev column is about the same if ((!sameTime && distance <= 2 && distance >= -2) || (sameTime && distance == 0)) { column = prevNoteCol; } // Prev column is lower else if ((distance > 2 || (sameTime && distance > 0)) && distance < 6) { column = Math.Min(4, prevNoteCol + 1); } else if (distance >= 6 && distance < 13) { column = Math.Min(4, prevNoteCol + 2); } else if (distance >= 13) { column = Math.Min(4, prevNoteCol + 3); } // Prev column is higher else if ((distance < -2 || (sameTime && distance < 0)) && distance > -6) { column = Math.Max(1, prevNoteCol - 1); } else if (distance >= -6 && distance > -13) { column = Math.Max(1, prevNoteCol - 2); } else { column = Math.Max(1, prevNoteCol - 3); } return(column); }
/*How many half lines is this note above the other note*/ public int Distance(UnproccessedNote other) { return(this.number - other.number); }