(define (step-nr pitch)
(let* ((pitch-nr (+ (* 7 (ly:pitch-octave pitch))
(ly:pitch-notename pitch)))
(root-nr (+ (* 7 (ly:pitch-octave (car pitches)))
(ly:pitch-notename (car pitches)))))
(+ 1 (- pitch-nr root-nr))))
(define (step-nr pitch)
(let* ((pitch-nr (+ (* 7 (ly:pitch-octave pitch))
(ly:pitch-notename pitch)))
(root-nr (+ (* 7 (ly:pitch-octave (car pitches)))
(ly:pitch-notename (car pitches)))))
(+ 1 (- pitch-nr root-nr))))