(define chords (list (list 60 61 62) (list 61 63 65) (list 63 66 69) (list 66 70 74))) (define (make-chord start duration amplitude pitches) (if (null? pitches) nil (cons (new midi :time start :keynum (car pitches) :duration duration :amplitude amplitude) (make-chord start duration amplitude (cdr pitches))))) (define (make-chord-sequence start duration amplitude chords) (if (null? chords) nil (append (make-chord start duration amplitude (car chords)) (make-chord-sequence (+ start duration) duration amplitude (cdr chords)))))