Jump to content
Sign in to follow this  
Avner Dorman

Add pitch classes as text above notes?

Recommended Posts

((eb4 num3 f4 num5 gb4 num8 a4 num9 c4 num0)
 (bb4 num11 c4 num0 eb4 num3 e4 num4 f4 num5))

List of all attributes you find in the '4th Element - Attributes' document.

Of course you can create your own attributes (articulations) as well, with ADD-TEXT-ATTRIBUTES function.

Share this post

Link to post
Share on other sites

Thanks so much!!! This is great!


I wrote the following functions that automatically add the pitch class as text above each note. This is really useful for me when teaching set theory. I am sharing them in case anyone else needs something like this :-)


Also, I'd be curious to know how the text font might be modified. 


;;;convert pitch-classes to nums


(defun pc-to-num (pitches)
  (substitute-map '(num0 num1 num2 num3 num4 num5 num6 num7 num8 num9 num10 num11) '(0 1 2 3 4 5 6 7 8 9 10 11) (modus (pitch-to-integer pitches))))

;;;; interweave two lists

(defun interweave (list1 list2)
  (if (null list1)
    (cons (car list1) (interweave list2 (cdr list1)))))

;;;; add pcs as a num to each pitch

(defun show-pcs (pitches) (interweave pitches (pc-to-num pitches)))


;;;; test


(setf pitches '(c4 bb4 f4 eb4 fs4 d4 g4 b4 e4 a4 cs4 gs4))


(show-pcs pitches)




Pitches with PCS.pdf


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this