Jump to content
Sign in to follow this  
Avner Dorman

Add pitch classes as text above notes?

Recommended Posts

Is there an easy way to add the pitch class as text above each note of the score? For example, add a '0' above any 'c' in a score?

Share this post


Link to post
Share on other sites
((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)
    list2 
    (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

Pitches.pdf

Share this post


Link to post
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.

Guest
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.

Sign in to follow this  

  • Similar Topics

    • By AM
      greetings
      andré
      ;;; MODIFY THE PITCH CONTOUR inside a pitchfield or tonality ;;; please evaluate the example and have a look to the contours ;;; subfunction (defun position-items (items alist) (loop for item in items append (position-item item alist))) ;;; function (defun compr/expand-melody (melody field &key (type 'add) (n 1) (shift 0)) (let* ((ints (loop for i in (difference (position-items (pitch-to-midi melody) (pitch-to-midi field))) collect (cond ((equal type 'add) (cond ((<= i -1) (- i n)) ((>= i 1) (+ i n)) (t i))) ((equal type 'fibonacci) (cond ((>= i 1) (+ i (fibonacci i))) ((<= i -1) (- i (fibonacci (abs i)))) (t i))) ((equal type 'summativ) (cond ((>= i 1) (+ i (+ i n))) ((<= i -1) (- i (+ (abs i) n))) (t i))))))) (position-filter (x+b (interval-to-integer ints :start (car (position-items melody field))) shift) field))) ;;; expand 1a (progn (setf seed (random 100)) (pitch-list-plot (list (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 1) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 2) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 3) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 5) (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed)) :join-points t)) ;;; expand 1b => using shift (changed startposition) (progn (setf seed (random 100)) (pitch-list-plot (list (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 1 :shift 1) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 2 :shift 2) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 3 :shift 3) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n 5 :shift 4) (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed)) :join-points t)) ;;; compress (progn (setf seed (random 100)) (pitch-list-plot (list (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n -1) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n -2) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'add :n -3) (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed)) :join-points t)) ;;; expand 2 with fibonacci (progn (setf seed (random 100)) (pitch-list-plot (list (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'fibonacci) (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed)) :join-points t)) ;;; expand 3 summativ (progn (setf seed (random 100)) (pitch-list-plot (list (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'summativ :n 1) (compr/expand-melody (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed) (gen-sieve '(c1 c9) '(2 1 1) :type :pitch) :type 'summativ :n 2) (rnd-sample 7 (gen-sieve '(c4 c5) '(2 1 1) :type :pitch) :seed seed)) :join-points t))  
       
      some evaluations -> different melodic contours (rnd / in a sieve) and its expansions
       
      Bildschirmaufnahme 2019-05-26 um 22.04.38.mov
    • By JulioHerrlein
      In the jazz world, Barry Harris came up with the idea of harmonizing a bebop scale.
      Combining a C6 (C, E, G, A) and a Bdim7 (B, D, F, Ab) chords, we have this scale:
       

       
      From this stantpoint we can alternate tonic and dominant sounds, like this:
       

       
      Every pair of chords have all the 8-note set.
      The notes C,E, G and A are always harmonized with a C6 chord.
      The notes D, F, Ab and B are always harmonized with a Bdim7 chord.
       
      So, from the point of view of sets, there is no problem.
       
      WHAT IS NEEDED:
       
      I want a way to start FROM the melody, and then make a four part block harmonization with this (or any other) harmonic system
       from the melody as an OMN expression.
       
      So, I need a way to filter the notes to aply the right chord:
       
      FOR EXAMPLE:
       
      For the notes C, E, G and A
      If the note is an C (in any register), I will apply a chord like , I will add the notes A, G and E, below the melody.
      If the note is an  (in any register), I will apply a chord like , I will add the notes G, E and C, below the melody.
      And so on...
      For the notes D, F, Ab and B:
       
      If the note is an B (in any register), I will apply a chord like , I will add the notes Ab, F and D, below the melody.
      And so on:
       
      So, to make any procedure:
       
      I need first find a way to apply a specific procedure only over the notes I want, over all the C notes, all the B notes, etc.
       
      How to filter from an OMN expression ?
       
      All the best !
      Julio
       
       
       
       
    • By opmo
      A new CIRCLE-PITCH-PLOT function (examples below) will be part of the forthcoming Opusmodus 1.3.
       
      The function CIRCLE-PIOTCH-PLOT returns a geometrical representation of relationships among the 12 pitch classes of the chromatic scale in pitch class space and provides an easy way to identify patterns and similarities between harmonic structures.
       
      Clockwise motion represents ascending pitch motion, and counterclockwise motion represents descending pitch motion.
       
      Examples:
       
      Major Triad
      (circle-pitch-plot '(c4e4g4))
       
      Minor Triad
      (circle-pitch-plot '(c4f4ab4))
       
      Augmented Triad
      (circle-pitch-plot '(c4e4gs4))
       
      All 4 augmented triads
      (circle-pitch-plot '(c4e4gs4 db4f4a4 d4fs4bb4 eb4g4b4))
       
       
      With :style :fill
      (circle-pitch-plot '(c4e4gs4 db4f4a4 d4fs4bb4 eb4g4b4) :style :fill)
       
      Example with chord names.
      Fully-Diminished 7th Chord
      (circle-pitch-plot 'dim7)
       
      All 3 fully-diminished 7th chords
      (circle-pitch-plot '((c4 dim7) (cs4 dim7) (d4 dim7)))
       
      Whole-Tone Scale
      (circle-pitch-plot '(0 2 4 6 8 10))
       
      The complex of 2 Whole-Tone Scale
      (circle-pitch-plot '((0 2 4 6 8 10) (1 3 5 7 9 11)) :style :fill)
       
      Chromatic Scale
      (circle-pitch-plot 'chromatic :point-radius 4)
       
      The complex of 6 tritones
      (circle-pitch-plot '((0 6) (1 7) (2 8) (3 9) (4 10) (5 11)) :point-radius 4)
       
      Tonalities
      (circle-pitch-plot 'mixolydian-greek :point-radius 4)
      (circle-pitch-plot 'bartok :point-radius 4)
      (circle-pitch-plot 'messiaen-mode3 :point-radius 4)
      (circle-pitch-plot 'hyojo :point-radius 4)
       
      Contrary Motion
      (circle-pitch-plot '(0 1 11 2 10 3 9 4 8 5 7 6)              :sort nil :join-first nil)
      (circle-pitch-plot '((0 1) (0 2) (0 3) (0 4) (0 5) (0 6)                (0 7) (0 8) (0 9) (0 10) (0 11)) :point-radius 4)
       
      Example with Forte notation
      (circle-pitch-plot '(6-32 6-7))
       
      Example with omn-form sequence and :type :pitches
       
      (circle-pitch-plot '(((leg s g2 p dbow+sul d3 sul b3 dig1 a3 b3 d3 b3 d3)                 (leg g2 d3 b3 a3 b3 d3 b3 d3)))              :type :pitches)  

       
      Circle types
      (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9)) :style :fill)
      (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9))              :type :pitches :style :fill)  

      (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9))              :type :fifths :style :fill)  

       
      Examples with :sort and :remove-duplicates set to nil
      (circle-pitch-plot '(0 2 6 0 3 7 0 4 8))
      (circle-pitch-plot '(0 2 6 0 3 7 0 4 8) :sort nil)
      (circle-pitch-plot '(0 2 6 0 3 7 0 4 8)              :sort nil :remove-duplicates nil)
      (circle-pitch-plot '(0 2 6 0 3 7 0 4 8)              :sort nil :remove-duplicates nil :join-first nil)  

      (circle-pitch-plot '(8 4 2 0 10 2 8 10 4 6 8)              :sort nil :remove-duplicates nil)
       
      Best wishes,
      Janusz
×
×
  • Create New...