public Note nextNote(Note lastNote, MeasureOptions options, NoteLengthEnum noteLength, Note[] elligibleNotes, Random r) {
        int percent = r.nextInt(100);
        int chance = r.nextInt(options.getTotalChance());
        int noteTone = 0;
        int runningChance = 0;
        Note note = null;

        if(null == lastNote) {
            noteTone = elligibleNotes[0].getTone();
        }else if(chance < (runningChance+=options.getRepeatChance())){
            //repeat last note with new duration
            note = new Note(lastNote.getTone(), Constants.NOT_REST, noteLength);
        } else if( chance < (runningChance+=options.getRestChance())){
            //insert a rest with new duration
            return new Note(lastNote.getTone(), Constants.IS_REST, noteLength);
        } else {
            noteTone = randTone(elligibleNotes, r);
        }

        //TODO: Remove if thoroughly handled elsewhere
//        if(null != lastNote){
//            //Only reach this point if changing to a replacement non-rest tone
//            if(r.nextBoolean()){
//                //...rising
//                noteTone = ScaleEnum.nearestNote(noteTone, lastNote.getTone(), RISING);
//            } else {
//                //...falling
//                noteTone =  ScaleEnum.nearestNote(noteTone, lastNote.getTone(), FALLING);
//            }
//        }

        if(null == note){
            note = new Note(noteTone, Constants.NOT_REST, noteLength);
        }

        //Handle chords
        if(percent < options.getChordChance()){
            if(songOptions.getScale().isMajor()){
                note.setChord(ChordEnum.MAJOR_TRIAD);
            } else {
                note.setChord(ChordEnum.MINOR_TRIAD);
            }
        }

        return note;
    }