Jump to content

Counterpoint Compilation Time


Recommended Posts

Hello!

 

The example below has been taking several minutes to compile, eventually crashing Opusmodus. Would someone be willing to look at the code and let me know what's causing this? Thank you so much!

 

(setf pattern1 (length-augmentation 2'((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q) (-h. q e4) (q f4 g4 a4 b4) (h. g4 -q))))
(setf pattern1a (length-augmentation 3 '((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q))))

(setf scale '(c4 eb4 f4 g4 ab4))
(setf pattern1-scale (tonality-map '(scale :map octave :closest up) pattern1))
(setf pattern1a-scale (tonality-map '(scale :map octave :closest up) pattern1a))

(setf voicesA
      (counterpoint
       (list pattern1-scale pattern1-scale pattern1a-scale)
       '(((1 2 3)
          :methods (
                    (dl1)
                    (r dl1 t-12 pr1)
                    (d1 t-24 pr1)
                    )
          ))))

(ps 'gm 
    :hn (list (1~ voicesA))
    :tbn (list (2~ voicesA))
    :tbn (list (3~ voicesA))
    :time-signature '(4 4)
    )

 

Link to comment
Share on other sites

The compilation time seems better now. However, I'm still having some difficulty configuring the counterpoint function for small project I'm working on. (I'm posting my question here since it might be relevant to my earlier post.)

I include a brief example below that continues to produce an error message at ;;Assemble Voices section. I wonder if someone could point me in the right direction.

Thank you!

 

(progn
  ;; Global SEED
  (init-seed 15342)
  
(setf melody1a (length-augmentation 2'((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q) (-h. q e4) (q f4 g4 a4 b4) (h. g4 -q))))
(setf melody1b (length-augmentation 3 '((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q))))

;; Patterns
(setf scale '(c4 eb4 f4 g4 ab4))
 (setf
   p1 (tonality-map '(scale :map octave :closest up) melody1a)
   p2 (tonality-map '(scale :map octave :closest up) melody1b)
   )
  
  (setf patterns (list p1 p1 p2))
  
  (setf dictum-a '((1 2 3) :methods ((dl1) (dl1 t-12 pr1) (dl1 t-24)))
   
   )
  
  ;; Sections
  (setf sec-a
        (counterpoint
         patterns dictum-a
        ))
  
  ;; Assemble Voices 
  (assemble-voices 'voice sec-a)
  
  ;; Preview Score
(ps 'gm 
    :hn (list (1~ voice1))
    :tbn (list (2~ voice2))
    :tbn (list (3~ voice3))
    :time-signature '(4 4)
    )
  
  ;; Global SEED back to NIL
  (init-seed nil)
  )

 

Link to comment
Share on other sites

Hi,

 

some small corrections :

 

(progn
  ;; Global SEED
  (init-seed 15342)
  
(setf melody1a (length-augmentation 2'((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q) (-h. q e4) (q f4 g4 a4 b4) (h. g4 -q))))
(setf melody1b (length-augmentation 3 '((-h. q g4) (q. g4 e e4 q e4 -q) (-h. q g4) (q. g4 e d4 q d4 -q))))

;; Patterns
(setf scale '(c4 eb4 f4 g4 ab4))
 (setf
   p1 (tonality-map '(scale :map octave :closest up) melody1a)
   p2 (tonality-map '(scale :map octave :closest up) melody1b)
   )
  
  (setf patterns (list p1 p1 p2))
  
  (setf dictum-a '(((1 2 3) :methods ((dl1) (dl1 t-12 pr1) (dl1 t-24)))))
   
   
  
  ;; Sections
  (setf sec-a
        (counterpoint
         patterns dictum-a
        ))
  
  ;; Assemble Voices 
  (assemble-voices 'voice sec-a)
  
  ;; Preview Score
(ps 'gm 
    :hn (list voice1)
    :tbn (list voice2)
    :tbn (list voice3)
    :time-signature '(4 4)
    )
  
  ;; Global SEED back to NIL
  (init-seed nil)
  )

S.

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.

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