Jump to content

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.

Link to comment
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


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use Privacy Policy