MidiSheetMusic.MidiFile.FindExactHighLowNotes C# (CSharp) Method

FindExactHighLowNotes() private static method

private static FindExactHighLowNotes ( List notes, int startindex, int starttime, int &high, int &low ) : void
notes List
startindex int
starttime int
high int
low int
return void
        private static void FindExactHighLowNotes(List<MidiNote> notes, int startindex, int starttime,
                          ref int high, ref int low)
        {
            int i = startindex;

            while (notes[i].StartTime < starttime) {
            i++;
            }

            while (i < notes.Count && notes[i].StartTime == starttime) {
            if (high < notes[i].Number) {
                high = notes[i].Number;
            }
            if (low > notes[i].Number) {
                low = notes[i].Number;
            }
            i++;
            }
        }