Advertisement
Guest User

Function get-pitches

a guest
Jun 11th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.37 KB | None | 0 0
  1. #(define (get-pitches mus)
  2.  (let* ((p (map
  3.             (lambda (x) (ly:music-property x 'pitch))
  4.             (ly:music-property mus 'elements)))
  5.        (first-p (car p))
  6.        (pitch (ly:pitch-notename first-p))
  7.        (alteration (ly:pitch-alteration first-p))
  8.        (octave -1)
  9.        (px (ly:make-pitch octave pitch alteration)))
  10.   (list #t p (cons px (cdr p)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement