Jump to content
Sign in to follow this  
opmo

How to add articulations to a score by hand

Recommended Posts

There are many occasions when we would like to add articulations by hand to our generated scores.
The first thing we need to do is to convert (output) the score into omn format.

 

Algorithmically generated score.

(setf size 200)
(setf vector
      (add-triangle-waves
       4 size 1 0.6
       :modulation (gen-triangle size 1 '(0.5 0.4 0.3 0.6)
        :modulation (gen-triangle size 1 0.3 :phase 180))))
(setf pitches (gen-divide 4 (vector-to-pitch '(g1 g6) vector)))
(setf transpose (pitch-transpose -12 pitches))
(setf variants (pitch-variant transpose :variant '?))
(setf length (rnd-sample 120 '(s e s s)))
(setf time (span pitches length))
(setf dynamics '(p mf ff))

(def-score add-triangle
           (:title "Waves Add-Triangle"
            :composer "OPMO"
            :copyright "© 2014 Opusmodus"
            :key-signature 'chromatic
	        :time-signature (get-time-signature time)
            :tempo 120
            :layout (piano-solo-layout 'rh 'lh :flexible-clef t))
  
  (rh
   :length time
   :pitch pitches
   :velocity (rnd-sample size dynamics)
   :port 0
   :sound 'gm
   :channel 1
   :program 'acoustic-grand-piano)
  
  (lh
   :length time
   :pitch variants
   :velocity (rnd-sample size dynamics)))

 

The expression below will convert the score into omn score format.

(compile-score 'add-triangle :output :score)

 

To get a more readable version of the score add PPRINT (print pretty) at the beginning of the expression.

(pprint (compile-score 'add-triangle :output :score))

 

Output in the Listener:

(def-score add-triangle
           (:title "Waves Add-Triangle" :composer "OPMO" :copyright "© 2014 Opusmodus"
            :key-signature 'chromatic :layout
            '(:brace (:flexible-treble rh) (:flexible-bass lh) :name "" :abbr "" :flexible-clef t)
            :time-signature
            '((1 4 2) (5 16 2) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (3 8 1) (5 16 2) (1 4 1) (5 16 1) (1 4 1)
              (3 8 2) (1 4 1) (3 8 1) (5 16 1) (3 8 1) (5 16 2) (3 8 1) (7 16 1) (1 4 1) (3 8 1) (1 4 1)
              (5 16 1) (1 4 2) (5 16 2) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (3 8 1) (5 16 2) (1 4 1)
              (5 16 1) (1 4 1) (3 8 2) (1 4 1) (3 8 1))
            :tempo '120)
           (rh :omn
            '((s g1 ff gs1 p a1 ff b1) (s c2 mf cs2 ff d2 e2 mf) (e f2 p s fs2 ff g2 p a2)
              (s b2 mf e c3 s cs3 ff eb3) (s e3 mf f3 ff fs3 p a3 mf) (s bb3 ff b3 e c4 p s e4)
              (e e4 ff s f4 e s b4 p) (e b4 s s mf e fs5 ff) (s fs5 mf f5 p mf e cs6)
              (s cs6 c6 p e b5 mf s g6 ff) (s g6 p ff e f6 g6 mf) (s g6 g6 p ff e fs6) (s g6 mf p e s fs6)
              (s fs6 fs6 ff mf ff) (e fs6 p s ff fs6 fs6 mf) (s fs6 fs6 ff p f6) (s fs6 ff mf e e f6)
              (s f6 e fs6 fs6 p s f6) (s f6 mf fs6 fs6 p f6) (e f6 f6 ff s fs6 p f6 ff) (s f6 p e s s)
              (s f6 e mf p s ff) (s f6 mf p mf e ff) (s f6 p e s mf p) (s f6 ff e mf s e p)
              (e f6 s e ff mf) (s f6 p mf e6 ff f6 p) (s f6 ff e6 mf e eb6 p f6 mf) (s f6 e6 d6 f6)
              (s f6 e6 ff d6 e f6 p) (s f6 mf e6 ff cs6 f6 mf) (s f6 ff f6 cs6 mf f6 ff)
              (e f6 mf s s cs6 p fs6 mf) (s f6 ff e e6 p s bb5 mf f6) (s e6 p b5 f5 eb6)
              (s bb5 fs5 ff e cs5 p s a5 mf) (e e5 ff s c5 e gs4 mf s d5) (e bb4 s fs4 d4 e g4)
              (s e4 ff d4 b3 mf e eb4) (s cs4 p bb3 mf e gs3 p s c4 ff) (s a3 a3 mf e b3 ff gs3)
              (s bb3 c4 d4 e b3 mf) (s cs4 p eb4 mf e f4 p s eb4 ff) (s e4 fs4 gs4 p fs4 ff)
              (e g4 p s a4 mf bb4 a4) (s bb4 c5 cs5 p c5 mf) (s cs5 eb5 ff e e5 mf eb5 ff)
              (s e5 mf e fs5 g5 p s fs5 ff) (s g5 mf gs5 a5 p a5) (e bb5 ff b5 mf s c6 ff c6))
            :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 90 :pan 64)
           (lh :omn
            '((s b0 p a0 mf gs1 g1) (s e1 d1 cs1 ff c1) (e a1 mf s g1 p fs1 mf f1)
              (s eb2 ff e cs2 s c2 mf b1 p) (s e2 mf eb2 d2 b1 p) (s e3 mf c3 p e b2 ff s bb2)
              (e b3 p s f3 mf e s e3 ff) (e b3 p s s ff e e3 mf) (s cs5 ff a5 p a5 e gs5 mf)
              (s cs5 ff c5 e b4 mf s g5 ff) (s g5 mf a5 ff e g5 p g5) (s g5 g5 mf g5 e fs5 ff)
              (s g5 p g5 e ff s gs5 mf) (s fs5 fs5 ff mf fs5) (e fs5 s p mf fs5) (s fs5 p ff p f5 mf)
              (s f5 p fs5 mf e e) (s f5 p e e5 e5 ff s f5) (s f5 p e5 e5 f5) (e f5 ff fs5 p s f5 ff f5)
              (s f5 e s p f5) (s f5 ff e e p s ff) (s f5 mf f5 f5 e p) (s f5 e ff s mf ff)
              (s f5 mf e p s e mf) (e f5 s e p f5) (s e5 f5 mf p f5) (s f5 g5 ff e fs5 p f5 ff)
              (s f5 fs5 mf gs5 f5 ff) (s f5 d5 e5 e f5 mf) (s cs5 e5 f5 f5 p) (s f5 ff mf p cs5)
              (e cs5 ff s f5 mf p fs5 mf) (s f5 e fs5 s c6 f5) (s e5 b4 p f4 eb5 mf)
              (s bb4 p a4 mf e fs4 p s cs4 ff) (e e4 mf s gs4 p e c5 mf s fs4 ff) (e bb3 s fs3 d3 e g3 mf)
              (s e3 p d3 b2 e eb3 ff) (s c3 mf e3 p e d3 ff s b2 mf) (s b2 ff a2 p e e gs2)
              (s b2 ff gs2 mf bb2 ff e c3 p) (s cs3 b2 mf e a2 ff s b2 p) (s fs3 e3 mf fs3 p gs3)
              (e g3 ff s f3 e3 p f3 ff) (s c4 mf cs4 c4 bb3) (s cs4 p eb4 mf e e4 eb4)
              (s fs4 p e g4 mf fs4 s e4) (s g4 gs4 p a4 a4) (e c5 ff mf s cs5 ff d5 p))
            :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 90 :pan 64))

 

Copy the score from the Listener and paste it into the Composer panel.
Now we are ready to add articulations etc... to the score by hand.

Share this post


Link to post
Share on other sites

I want to manually revise some score, but I would get lost in a very long list of OMN data. So, I automatically added bar number comments to the pretty printout -- helps me a lot :)

 

(pprint-part 
 '((s g1 ff gs1 p a1 ff b1) (s c2 mf cs2 ff d2 e2 mf) (e f2 p s fs2 ff g2 p a2)
   (s b2 mf e c3 s cs3 ff eb3) (s e3 mf f3 ff fs3 p a3 mf) (s bb3 ff b3 e c4 p s e4)
   (e e4 ff s f4 e s b4 p) (e b4 s s mf e fs5 ff) (s fs5 mf f5 p mf e cs6)
   (s cs6 c6 p e b5 mf s g6 ff) (s g6 p ff e f6 g6 mf) (s g6 g6 p ff e fs6) (s g6 mf p e s fs6)
   (s fs6 fs6 ff mf ff) (e fs6 p s ff fs6 fs6 mf) (s fs6 fs6 ff p f6) (s fs6 ff mf e e f6)
   (s f6 e fs6 fs6 p s f6) (s f6 mf fs6 fs6 p f6) (e f6 f6 ff s fs6 p f6 ff) (s f6 p e s s)
   (s f6 e mf p s ff) (s f6 mf p mf e ff) (s f6 p e s mf p) (s f6 ff e mf s e p)
   (e f6 s e ff mf) (s f6 p mf e6 ff f6 p) (s f6 ff e6 mf e eb6 p f6 mf) (s f6 e6 d6 f6)
   (s f6 e6 ff d6 e f6 p) (s f6 mf e6 ff cs6 f6 mf) (s f6 ff f6 cs6 mf f6 ff)
   (e f6 mf s s cs6 p fs6 mf) (s f6 ff e e6 p s bb5 mf f6) (s e6 p b5 f5 eb6)
   (s bb5 fs5 ff e cs5 p s a5 mf) (e e5 ff s c5 e gs4 mf s d5) (e bb4 s fs4 d4 e g4)
   (s e4 ff d4 b3 mf e eb4) (s cs4 p bb3 mf e gs3 p s c4 ff) (s a3 a3 mf e b3 ff gs3)
   (s bb3 c4 d4 e b3 mf) (s cs4 p eb4 mf e f4 p s eb4 ff) (s e4 fs4 gs4 p fs4 ff)
   (e g4 p s a4 mf bb4 a4) (s bb4 c5 cs5 p c5 mf) (s cs5 eb5 ff e e5 mf eb5 ff)
   (s e5 mf e fs5 g5 p s fs5 ff) (s g5 mf gs5 a5 p a5) (e bb5 ff b5 mf s c6 ff c6)))
=>
? (
    ;; Bar 1
    (s g1 ff gs1 p a1 ff b1)
    ;; Bar 2
    (s c2 mf cs2 ff d2 e2 mf)
    ;; Bar 3
    (e f2 p s fs2 ff g2 p a2)
    ;; Bar 4
    (s b2 mf e c3 s cs3 ff eb3)
    ;; Bar 5
    (s e3 mf f3 ff fs3 p a3 mf)
    ;; Bar 6
    (s bb3 ff b3 e c4 p s e4)
    ;; Bar 7
    (e e4 ff s f4 e s b4 p)
    ;; Bar 8
    (e b4 s s mf e fs5 ff)
    ;; Bar 9
    (s fs5 mf f5 p mf e cs6)
    ;; Bar 10
    (s cs6 c6 p e b5 mf s g6 ff)
    ;; Bar 11
    (s g6 p ff e f6 g6 mf)
    ;; Bar 12
    (s g6 g6 p ff e fs6)
    ;; Bar 13
    (s g6 mf p e s fs6)
    ;; Bar 14
    (s fs6 fs6 ff mf ff)
    ;; Bar 15
    (e fs6 p s ff fs6 fs6 mf)
    ;; Bar 16
    (s fs6 fs6 ff p f6)
    ;; Bar 17
    (s fs6 ff mf e e f6)
    ;; Bar 18
    (s f6 e fs6 fs6 p s f6)
    ;; Bar 19
    (s f6 mf fs6 fs6 p f6)
    ;; Bar 20
    (e f6 f6 ff s fs6 p f6 ff)
    ;; Bar 21
    (s f6 p e s s)
    ;; Bar 22
    (s f6 e mf p s ff)
    ;; Bar 23
    (s f6 mf p mf e ff)
    ;; Bar 24
    (s f6 p e s mf p)
    ;; Bar 25
    (s f6 ff e mf s e p)
    ;; Bar 26
    (e f6 s e ff mf)
    ;; Bar 27
    (s f6 p mf e6 ff f6 p)
    ;; Bar 28
    (s f6 ff e6 mf e eb6 p f6 mf)
    ;; Bar 29
    (s f6 e6 d6 f6)
    ;; Bar 30
    (s f6 e6 ff d6 e f6 p)
    ;; Bar 31
    (s f6 mf e6 ff cs6 f6 mf)
    ;; Bar 32
    (s f6 ff f6 cs6 mf f6 ff)
    ;; Bar 33
    (e f6 mf s s cs6 p fs6 mf)
    ;; Bar 34
    (s f6 ff e e6 p s bb5 mf f6)
    ;; Bar 35
    (s e6 p b5 f5 eb6)
    ;; Bar 36
    (s bb5 fs5 ff e cs5 p s a5 mf)
    ;; Bar 37
    (e e5 ff s c5 e gs4 mf s d5)
    ;; Bar 38
    (e bb4 s fs4 d4 e g4)
    ;; Bar 39
    (s e4 ff d4 b3 mf e eb4)
    ;; Bar 40
    (s cs4 p bb3 mf e gs3 p s c4 ff)
    ;; Bar 41
    (s a3 a3 mf e b3 ff gs3)
    ;; Bar 42
    (s bb3 c4 d4 e b3 mf)
    ;; Bar 43
    (s cs4 p eb4 mf e f4 p s eb4 ff)
    ;; Bar 44
    (s e4 fs4 gs4 p fs4 ff)
    ;; Bar 45
    (e g4 p s a4 mf bb4 a4)
    ;; Bar 46
    (s bb4 c5 cs5 p c5 mf)
    ;; Bar 47
    (s cs5 eb5 ff e e5 mf eb5 ff)
    ;; Bar 48
    (s e5 mf e fs5 g5 p s fs5 ff)
    ;; Bar 49
    (s g5 mf gs5 a5 p a5)
    ;; Bar 50
    (e bb5 ff b5 mf s c6 ff c6)
  )

 

I revise only a single part at a time, as I will also re-bar the music. If I later want to update bar number comments, I can just call pprint-part on the result again. BTW: get-time-signature is useful to extract the time signatures for def-score from the part data.

 

The function pprint-part is defined below.

 

Best,

Torsten

 

;; based on https://groups.google.com/forum/#!topic/comp.lang.lisp/_NP7Ub6hLsE
(setf *print-pretty* t
      *print-miser-width* 0
      *print-right-margin* 80)
(defun pprint-part (part &optional (stream *standard-output*))
  "Pretty prints a part one bar a time, adding a bar line comment before each bar.

  Args: 
  part: nested OMN list.

  Example:
  (pprint-part '((q c4 d4 e4) (h f4 q e4) (h. d2)))"
  (pprint-logical-block 
      (stream nil :prefix "(" :suffix ")") 
    (pprint-logical-block (stream part) 
      (loop 
        for bar-no from 1 to (length part)
        for bar in part
        do (progn 
             (pprint-indent :block 1 stream)
             (pprint-newline :mandatory stream)
             (format stream ";; Bar ~A" bar-no)
             (pprint-newline :mandatory stream)
             (prin1 bar stream))))
    (pprint-indent :block -1 stream) 
    (pprint-newline :mandatory stream)))

 

Share this post


Link to post
Share on other sites
On 9/10/2015 at 0:46 PM, opmo said:

To get a more readable version of the score add PPRINT (print pretty) at the beginning of the expression.


(pprint (compile-score 'add-triangle :output :score))

 

 

The new PPRINT-SCORE function will print the bar numbers in each of the instruments:

(pprint-score (compile-score 'add-triangle :output :score))

Result:

(def-score add-triangle
        (:title "Waves Add-Triangle"
         :composer "OPMO"
         :copyright "© 2014 Opusmodus"
         :key-signature 'chromatic
         :layout '(:brace (:flexible-treble rh) (:flexible-bass lh) :name ""
                   :abbr "" :flexible-clef t)
         :rewrite-lengths 't
         :time-signature '((1 4 1) (3 8 1) (5 16 1) (3 8 2) (1 4 3) (5 16 2)
                           (3 8 1) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (1 4 2)
                           (3 8 1) (1 4 1) (3 8 1) (7 16 1) (5 16 2) (7 16 1)
                           (1 4 1) (5 16 1) (1 4 3) (3 8 1) (5 16 1) (3 8 2)
                           (1 4 3) (5 16 2) (3 8 1) (1 4 1) (5 16 1) (3 8 2)
                           (5 16 2) (1 4 2) (3 8 1))
         :tempo '120)
      (rh
       :omn '(#|1|# (s g1 ff gs1 mf a1 p b1 mf)
              #|2|# (e c2 p cs2 ff s d2 p e2 mf)
              #|3|# (e f2 s fs2 ff g2 p a2 ff)
              #|4|# (e b2 ff c3 s cs3 eb3)
              #|5|# (e e3 mf f3 ff s fs3 a3 mf)
              #|6|# (s bb3 b3 ff c4 mf e4 ff)
              #|7|# (s e4 p f4 ff mf b4 p)
              #|8|# (s b4 mf ff mf fs5)
              #|9|# (s fs5 p e f5 mf s p cs6)
              #|10|# (s cs6 mf c6 b5 ff e g6 mf)
              #|11|# (s g6 ff e e f6 s g6)
              #|12|# (s g6 p ff g6 fs6)
              #|13|# (s g6 ff g6 e s fs6)
              #|14|# (e fs6 mf s e p s ff)
              #|15|# (s fs6 p e s e mf)
              #|16|# (s fs6 ff e s s f6 mf)
              #|17|# (e fs6 ff s mf p f6 mf)
              #|18|# (s f6 ff fs6 fs6 mf f6 ff)
              #|19|# (s f6 ff fs6 p ff f6 p)
              #|20|# (e f6 p s ff e fs6 mf s f6)
              #|21|# (s f6 ff mf p ff)
              #|22|# (s f6 ff mf e p ff)
              #|23|# (e f6 ff f6 f6 p s mf)
              #|24|# (s f6 f6 e ff s)
              #|25|# (s f6 p f6 e mf s)
              #|26|# (e f6 p mf s p e)
              #|27|# (s f6 p f6 e6 f6 mf)
              #|28|# (s f6 ff e6 p e eb6 s f6 ff)
              #|29|# (s f6 mf e6 ff d6 f6 p)
              #|30|# (s f6 mf e6 d6 ff f6)
              #|31|# (s f6 mf e6 p cs6 ff f6 p)
              #|32|# (e f6 p mf s cs6 ff f6 mf)
              #|33|# (e f6 s p cs6 fs6 ff)
              #|34|# (e f6 ff e6 p s bb5 f6 mf)
              #|35|# (e e6 p b5 ff s f5 mf eb6 p)
              #|36|# (s bb5 mf fs5 p cs5 mf a5 ff)
              #|37|# (s e5 p c5 mf gs4 p d5 mf)
              #|38|# (s bb4 ff fs4 p d4 g4)
              #|39|# (s e4 ff e d4 mf s b3 p eb4)
              #|40|# (s cs4 ff bb3 p gs3 mf e c4)
              #|41|# (s a3 ff e p b3 s gs3 mf)
              #|42|# (s bb3 ff c4 d4 mf b3 ff)
              #|43|# (s cs4 p eb4 e f4 mf s eb4 ff)
              #|44|# (e e4 mf s fs4 e gs4 p s fs4 mf)
              #|45|# (s g4 p e a4 s bb4 ff e a4 mf)
              #|46|# (s bb4 p e c5 ff s cs5 p c5)
              #|47|# (e cs5 p s eb5 e5 eb5 mf)
              #|48|# (s e5 ff fs5 g5 mf fs5 p)
              #|49|# (s g5 mf gs5 a5 p mf)
              #|50|# (e bb5 p s b5 e c6 s))
       :channel 1
       :sound 'gm
       :program 'acoustic-grand-piano
       :volume 90
       :pan 64)
      (lh
       :omn '(#|1|# (s gs1 p g1 b0 mf a0 ff)
              #|2|# (e c1 p cs1 mf s d1 p e1 mf)
              #|3|# (e a1 p s g1 mf fs1 f1)
              #|4|# (e b1 ff c2 s cs2 mf eb2)
              #|5|# (e e2 ff f2 mf s fs2 a2 p)
              #|6|# (s e3 mf c3 p b2 mf bb2 ff)
              #|7|# (s b3 mf f4 f4 ff fs4)
              #|8|# (s b3 ff p mf fs4 p)
              #|9|# (s cs5 mf e a5 s p gs5 mf)
              #|10|# (s g5 ff eb6 p d6 mf e cs6 ff)
              #|11|# (s g5 p e a5 mf g5 ff s)
              #|12|# (s fs5 p g5 mf g5 g5 ff)
              #|13|# (s g5 ff mf e p s fs5 ff)
              #|14|# (e fs5 p s ff e p s mf)
              #|15|# (s fs5 p e s mf e p)
              #|16|# (s f5 mf e fs5 ff s s mf)
              #|17|# (e f5 ff s fs5 mf fs5 fs5)
              #|18|# (s f5 e5 p e5 f5 ff)
              #|19|# (s f5 ff e5 e5 mf f5 ff)
              #|20|# (e f5 ff s fs5 mf e f5 ff s mf)
              #|21|# (s f5 ff mf ff f5)
              #|22|# (s f5 ff f5 e e)
              #|23|# (e f5 mf ff p s ff)
              #|24|# (s f5 p ff e p s)
              #|25|# (s f5 mf ff e mf s ff)
              #|26|# (e f5 mf f5 s p e mf)
              #|27|# (s f5 p f5 fs5 f5 ff)
              #|28|# (s f5 ff fs5 p e g5 s f5)
              #|29|# (s f5 mf f5 e5 p d5 mf)
              #|30|# (s f5 gs5 fs5 p f5 mf)
              #|31|# (s f5 p fs5 a5 ff f5)
              #|32|# (e f5 ff p s a5 f5 mf)
              #|33|# (e fs5 s f5 p ff cs5)
              #|34|# (e f5 ff fs5 p s c6 ff f5)
              #|35|# (e e5 ff b4 s f4 mf eb5 p)
              #|36|# (s bb4 mf d5 p g5 ff b4 mf)
              #|37|# (s e4 p gs4 c5 fs4 mf)
              #|38|# (s g3 p d3 mf fs3 p bb3)
              #|39|# (s e3 mf e fs3 ff s a3 p f3 mf)
              #|40|# (s c3 ff gs2 mf bb2 p e cs3)
              #|41|# (s b2 p e a2 ff mf s gs2)
              #|42|# (s b2 gs2 p bb2 mf c3)
              #|43|# (s eb3 f3 p e eb3 mf s cs3 ff)
              #|44|# (e fs3 ff s gs3 e fs3 s e3 p)
              #|45|# (s g3 p e a3 ff s bb3 mf e a3)
              #|46|# (s c4 ff e cs4 s c4 mf bb3 ff)
              #|47|# (e e4 p s eb4 eb4 cs4 ff)
              #|48|# (s e4 mf fs4 ff g4 p fs4 ff)
              #|49|# (s a4 mf p bb4 mf b4 ff)
              #|50|# (e bb4 p s a4 e gs4 s))
       :channel 1
       :sound 'gm
       :program 'acoustic-grand-piano
       :volume 90
       :pan 64))

 

You don't need to use the function PPRINT-SCORE.
After the evaluation of the score just press ⌥⌘⇥

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  

×