Jump to content

Counterpoint Question - use of variable for harmony keyword


Recommended Posts

Hello, Friends

 

I´m exploring this interesting counterpoint function.

When I write the parameter for the keyword :harmony note for note everything works fine, but when I substitute the chords of the :harmony keyword with the content of the variable setf harmony 2 it won´t work, giving the following error:

 

> Error: (harmony2) is not a tonality or a chord.
> While executing: %make-tonality, in process Listener-1(7).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
 

I´d like to use the :harmony keyword in a way that I can process the chords in other place (by MIDI Entry or generating arrays or pitch-demixing a chorale, etc) and just changing the variable harmony2 to applying different harmonies to the same contrapuntal texture or different texture to the same harmony, etc.

 

Best,

Julio

 

image.thumb.png.1b8fa932236627053bd89fbd072d6227.png

Here is the whole thing, for easy debugging

 

 

(progn
  ;; Global SEED
  (init-seed 15342)
  
  ;; Patterns
  (setf
   ;p1 '((-s c1 p g2 cs3) (3q fs3 - bb3) (-3q eb4 mf a4) (-s b4 d5 f5)
    ;    (-5q gs5 e6 c1 mp g2) (-3q cs3 fs3 mf) (s bb3 - eb4 p a4) (s b4 mp d5 f5 -))
   ;p2 '((5q bb2 mf g3 c4 e3 a3) (5q d4 mp fs4 gs4 b4 p cs5) (s f5 eb6 bb3 g3))
   ;p3 '((5q fs4 p - bb3 f3 e4) (-3q g4 c5) (s eb5 a5 mf cs6 gs6)
   ;     (5q gs6 pp cs6 mf a5 eb5 -) (-s c5 g4 e4))
   ;p4 '((5q bb3 p a4 c6 cs6 cs6) (s g7 mp a6 c6 e5 - d4 cs4 g3 3h fs3 eb3 -)
   ;     (-3q b6 pp a6 5q c6 - d5 bb4 b3 -s gs3 f1 eb3))
   p5 '((5q c2 mf g2 e2 a2 b2) (5q fs5 p gs5 bb5 b5 cs5 mp) (s f5 eb6 c6 p g6))
   p6 '(s a4 p e b5 s gs3 3h f3 3q e2 5h eb4 5q g5 fs2 f4)
   p7 '(5q cs5 mf d5 5h eb5 5q f5 fs5 gs5 5h a5 f 5q bb5 5h b5 5q cs6 5h)
   p8 '(t bb4 mp cs6 c5 b5 bb4 cs6 a3 gs2 3q a2 gs5 fs4)
   )
  
(setf p1 '(e d7 d7 d7 d7 d7 d7 d7 d7 s d6 d6 d6 d6 d6 d6 d6 d6 h))
(setf p2 '(e d5 d5 d5 d5 d5 d5 d5 d5 s d4 d4 d4 d4 d4 d4 d4 d4 h))
(setf p3 '(e d4 d4 d4 d4 d4 d4 d4 d4 s s s s s s s s h d3))
(setf p4 '(e d2 d2 d2 d2 d2 d2 d2 d2 s s s s s s s s h d1))

;(pitch-transpose 2 p4) 

  (setf patterns (list p1 p2 p3 p4 p5 p6 p7 p8))
 (setf harmony2 '((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)))

 (setf
   dictum-a
   '(((1 2 3 4) :harmony harmony2 :tempo 72)
     ((1 2 3 4) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)) :tempo 72)
     ((2 1 3 4) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)):methods (- ri - -) :tempo 72)
     ((3 2 1 4) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)):methods (a d2 r -) :tempo 72)
     ((4 3 2 1) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)) :tempo 72)
     ((4 2 1 4):harmony a3b3e4gs4)
     ((2 3 1 4):harmony a3b3e4gs4)
     ((3 2 1 4):harmony a3b3e4gs4)
     ((- - - -) :span 1/4 :harmony a3b3e4gs4))
   
   dictum-b
   '(((- 5 2 -) :span 3/4 :methods (- ri - -) :tempo 64)
     ((- 2 2 6) :span 3/4 :methods (- d d3 -) :tempo (:rit 80 56 1/64))
     ((4 6 6 8) :span 2/4 :methods (a d2 r -) :tempo 88)
     ((- - - -) :span 1/4))
   
   dictum-c
   '(((7 4 - 5) :methods (a d i ?) :extend (s - s -) :tempo 64)
    ((1 2 2 3) :methods (a d i -) :extend (s - s -)))
   
   dictum-d
   '(((- 3 - -) :methods (- - - -) :tempo 80)
     ((- 2 - -) :methods (- - - -))
     ((- 4 - -) :methods (< - - -))
     ;((1 1 1 1) :methods (da ad (r d5) (i d2)) :polyphony (7 o) :tempo 72)
)
   )
  
  ;; Sections
  (setf sec-a
        (counterpoint
         patterns dictum-a
         :global-methods '((dyn fl) - - -)))
  
  (setf sec-b
        (counterpoint
         patterns dictum-b
         :global-methods '((dyn fl) (dyn cl) (t-12 dyn hn) (t-12 dyn vc))
         :global-polyphony '((10 p) (1 13))
         :iterate t))
  
  (setf sec-c
        (counterpoint
         patterns dictum-c
         :global-methods '((dyn fl) (dyn cl) (t-12 dyn hn) (t-12 dyn vc))
         :global-polyphony '((7 p) (1 13))
         :iterate t))
  
  (setf sec-d
        (counterpoint
         patterns dictum-d
         :global-methods '((dyn fl) (dyn cl) (dyn hn) (dyn vc))))
  
  ;; Assemble Voices 
  (assemble-voices 'voice sec-a sec-b sec-c sec-d)

(ps 'gm
     :sq 
     ;(list (pitch-transpose 12 vh1-2) vh2-2 vh3-2 vh4-2)
(list 

(pitch-transpose 0  voice1) 
(pitch-transpose 0  voice2) 
(pitch-transpose 0 voice3) 
(pitch-transpose 0 voice4)
#|
(pitch-transpose 0 (ambitus 'violin voice1)) 
(pitch-transpose 0 (ambitus 'violin voice2)) 
(pitch-transpose 0 (ambitus 'viola voice3)) 
(pitch-transpose -12 (ambitus 'cello voice4))
|#

)
    :key-signature 'atonal 
     ;;;obs:it´s possible to bypass the time signature we did before opening the time signature here
    ;;time-signature timesig-proc are processed lists of time-signatures
    ;:time-signature timesig
    ;:tempo 90
    :flexible-clef nil
    :title
    ;:flexible-clef nil
"Quartet Harmony Control - JULIO HERRLEIN"
:display :window)

  ;; Global SEED back to NIL
  (init-seed nil)
  )

 

Link to comment
Share on other sites

Try this :

 

(progn
  ;; Global SEED
  (init-seed 15342)
  
  ;; Patterns
  (setf
   ;p1 '((-s c1 p g2 cs3) (3q fs3 - bb3) (-3q eb4 mf a4) (-s b4 d5 f5)
    ;    (-5q gs5 e6 c1 mp g2) (-3q cs3 fs3 mf) (s bb3 - eb4 p a4) (s b4 mp d5 f5 -))
   ;p2 '((5q bb2 mf g3 c4 e3 a3) (5q d4 mp fs4 gs4 b4 p cs5) (s f5 eb6 bb3 g3))
   ;p3 '((5q fs4 p - bb3 f3 e4) (-3q g4 c5) (s eb5 a5 mf cs6 gs6)
   ;     (5q gs6 pp cs6 mf a5 eb5 -) (-s c5 g4 e4))
   ;p4 '((5q bb3 p a4 c6 cs6 cs6) (s g7 mp a6 c6 e5 - d4 cs4 g3 3h fs3 eb3 -)
   ;     (-3q b6 pp a6 5q c6 - d5 bb4 b3 -s gs3 f1 eb3))
   p5 '((5q c2 mf g2 e2 a2 b2) (5q fs5 p gs5 bb5 b5 cs5 mp) (s f5 eb6 c6 p g6))
   p6 '(s a4 p e b5 s gs3 3h f3 3q e2 5h eb4 5q g5 fs2 f4)
   p7 '(5q cs5 mf d5 5h eb5 5q f5 fs5 gs5 5h a5 f 5q bb5 5h b5 5q cs6 5h)
   p8 '(t bb4 mp cs6 c5 b5 bb4 cs6 a3 gs2 3q a2 gs5 fs4)
   )
  
(setf p1 '(e d7 d7 d7 d7 d7 d7 d7 d7 s d6 d6 d6 d6 d6 d6 d6 d6 h))
(setf p2 '(e d5 d5 d5 d5 d5 d5 d5 d5 s d4 d4 d4 d4 d4 d4 d4 d4 h))
(setf p3 '(e d4 d4 d4 d4 d4 d4 d4 d4 s s s s s s s s h d3))
(setf p4 '(e d2 d2 d2 d2 d2 d2 d2 d2 s s s s s s s s h d1))

;(pitch-transpose 2 p4) 

  (setf patterns (list p1 p2 p3 p4 p5 p6 p7 p8))
 (setf harmony2 '((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)))

 (setf
   dictum-a
   `(((1 2 3 4) :harmony ,harmony2 :tempo 72)
     ((1 2 3 4) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)) :tempo 72)
     ((2 1 3 4) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)):methods (- ri - -) :tempo 72)
     ((3 2 1 4) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)):methods (a d2 r -) :tempo 72)
     ((4 3 2 1) :harmony ((a3b3e4gs4) (b3e4gs4a3) (e4gs4a3b3)(gs4a3b3e4)) :tempo 72)
     ((4 2 1 4):harmony a3b3e4gs4)
     ((2 3 1 4):harmony a3b3e4gs4)
     ((3 2 1 4):harmony a3b3e4gs4)
     ((- - - -) :span 1/4 :harmony a3b3e4gs4))
   
   dictum-b
   '(((- 5 2 -) :span 3/4 :methods (- ri - -) :tempo 64)
     ((- 2 2 6) :span 3/4 :methods (- d d3 -) :tempo (:rit 80 56 1/64))
     ((4 6 6 8) :span 2/4 :methods (a d2 r -) :tempo 88)
     ((- - - -) :span 1/4))
   
   dictum-c
   '(((7 4 - 5) :methods (a d i ?) :extend (s - s -) :tempo 64)
    ((1 2 2 3) :methods (a d i -) :extend (s - s -)))
   
   dictum-d
   '(((- 3 - -) :methods (- - - -) :tempo 80)
     ((- 2 - -) :methods (- - - -))
     ((- 4 - -) :methods (< - - -))
     ;((1 1 1 1) :methods (da ad (r d5) (i d2)) :polyphony (7 o) :tempo 72)
)
   )
  
  ;; Sections
  (setf sec-a
        (counterpoint
         patterns dictum-a
         :global-methods '((dyn fl) - - -)))
  
  (setf sec-b
        (counterpoint
         patterns dictum-b
         :global-methods '((dyn fl) (dyn cl) (t-12 dyn hn) (t-12 dyn vc))
         :global-polyphony '((10 p) (1 13))
         :iterate t))
  
  (setf sec-c
        (counterpoint
         patterns dictum-c
         :global-methods '((dyn fl) (dyn cl) (t-12 dyn hn) (t-12 dyn vc))
         :global-polyphony '((7 p) (1 13))
         :iterate t))
  
  (setf sec-d
        (counterpoint
         patterns dictum-d
         :global-methods '((dyn fl) (dyn cl) (dyn hn) (dyn vc))))
  
  ;; Assemble Voices 
  (assemble-voices 'voice sec-a sec-b sec-c sec-d)

(ps 'gm
     :sq 
     ;(list (pitch-transpose 12 vh1-2) vh2-2 vh3-2 vh4-2)
(list 

(pitch-transpose 0  voice1) 
(pitch-transpose 0  voice2) 
(pitch-transpose 0 voice3) 
(pitch-transpose 0 voice4)
#|
(pitch-transpose 0 (ambitus 'violin voice1)) 
(pitch-transpose 0 (ambitus 'violin voice2)) 
(pitch-transpose 0 (ambitus 'viola voice3)) 
(pitch-transpose -12 (ambitus 'cello voice4))
|#

)
    :key-signature 'atonal 
     ;;;obs:it´s possible to bypass the time signature we did before opening the time signature here
    ;;time-signature timesig-proc are processed lists of time-signatures
    ;:time-signature timesig
    ;:tempo 90
    :flexible-clef nil
    :title
    ;:flexible-clef nil
"Quartet Harmony Control - JULIO HERRLEIN"
:display :window)

  ;; Global SEED back to NIL
  (init-seed nil)
  )

SB

The trick is here with backquote:

 

`(((1 2 3 4) :harmony ,harmony2 :tempo 72)
Link to comment
Share on other sites

Please, note that harmony in counterpoint is the application of the harmonic-path function, who allow you to keep voice leading in chords

as I showed several times in my lessons, and it is very different than tonality-map function.

 

Btw, if you use scale in :harmony parameter you will get scalar motive in counterpoint but if you use chords with well defined voices leading from chord to chord, the result could become much interesting in terms of harmonic control and voice leading control 

SB.

Link to comment
Share on other sites

Thanks a lot, Stephane !

 

This is interesting ! 

I´m trying to just provide some general countour in a series of patterns and then manipulate the pitches using this harmony keyword.

Sometimes., looks like providing just the general contour in the motives in the patters (or even the rhythms with repeated notes) is enough, because the notes are rounded to the harmony proovided.

 

I just wanted to know how the notes of the patterns are rounded to the harmonic-path in the counterpoint. It´s rounded around the closest path ? 

 

Best and thanks again !

PS

Maybe this is the best way for composing stuff in Opusmodus (specially longer and structured music).

Julio

Link to comment
Share on other sites

The notes in patterns are not really rounded, they are the harmonic path itself, they are played sequentially in order from the notes given to :harmony parameter , so if you want to use closest path or any voices leading technique, you need to prepare your :harmony sequence of pitches right to be what you need.

 

This :harmony could be also useful for serial or pitch-class composers who want to play the pitches from some row/Pcs in order, kind of horizontal distribution of pitches for motivic design.  

 

For vertical distribution across voices, I would probably prefer to use the distribute-seq function or a similar approach.

 

It is also possible to use tonality-map function after the counterpoint but it would be nice to be able to use it also directly into counterpoint dictum like the :harmony keyword,

something like :tonality keyword.  Janusz ?  🙂

 

Best !

 

Stf

 

 

Link to comment
Share on other sites

Thanks again, Stephane !

 

Yes, this is the way I was thinking: preparing the notes beforehand and use the counterpoint function to have a more flexible way to control the harmony.

I was doing everything manually, using mechanisms and processes to control the things, but this way can be easier.

For harmony control is just a matter of distributing the chord tones on the harmony lists.

 

The rest is finding appropriate textures.

 

Stephane, if you permit, I have one more question:

 

How the :global-methods "dyn" works

 

(setf sec-b
        (counterpoint
         patterns dictum-b
         :global-methods '((dyn fl) (dyn cl) (t-12 dyn hn) (t-12 dyn vc))
         :global-polyphony '((10 p) (1 13))
         :iterate t))

 

I see expressions like that in counterpoint examples, but I don´t how "dyn" is defined. I found something like this, in example 4

 

(setf globals '((q12345 dyn fl)
                  (q12345 dyn ob)
                  (q12345 t-12 dyn bcl)
                  (q12345 dyn hp)))

 

Thanks a lot !

Julio

Link to comment
Share on other sites

:group velocity
          dyn (:velocity (velocity-to-dynamic x))

 

Check the doc velocity-to-dynamic function.

(velocity-to-dynamic '(p p mp mp f ff mp mp p f))
=> (p< < mp< < f< ff> mp> > p< f)

(velocity-to-dynamic '(p p mp mp f ff mp mp p f) :extend t)
=> (p< < < < < ff> > > p< f)

(velocity-to-dynamic '(p p mp mp f ff mp mp p f) :end 'pp)
=> (p< < mp< < f< ff> mp> > p> pp)

(velocity-to-dynamic
'((pppp ppp ppp pp ppp p p mp mf mf) (f ff mf mp p ppp pppp)))
=> ((pppp< ppp< < pp> ppp< p< < mp< mf< <) (f< ff> mf> mp> p> ppp> pppp))

 

Link to comment
Share on other sites

  • 3 months later...

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.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy