public double[][] GenerateNotes()
        {
            int[] onsetTime = new int[M];
            int[] peakTime  = PeakPick();
            int   peakCount = 0;

            for (int i = 0; i < M; i++)
            {
                if (peakTime[i] != 0)
                {
                    onsetTime[peakCount++] = peakTime[i] * 256;
                }
            }

            double[][] result      = new double[peakCount][];
            double[]   note_length = generateNoteLength(onsetTime, peakCount);
            for (int i = 0; i < peakCount; i++)
            {
                double[][] noteData = audio.GetNoteFAData(onsetTime[i]);
                int[]      predict  = learningModel.GetNote(noteData);
                result[i] = new double[2];
                // TODO(allenxie): Handle int to float correctly or support float prediction.
                result[i][0] = GetMostMember(predict);
                result[i][1] = note_length[i];
            }
            return(result);
        }