Jump to content

Lenght-Map Question


Recommended Posts

Dear Friends,

 

I´m working with this Lenght-Map, for articulations and dynamics. It´s not waorking the way I expected. Some are in the map, but won´t map. Some aren´t in the map, but appears...

Stephane use it a lot... What I missed ?

 

;;;FORUM QUESTION

;;;pitches

(setf v1 '(q gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4 gs4 bb4 e4 d4 eb4 fs4 b4 gs4 g4 a4 c5 bb4 a4 cs4 d4 d4 d4 g4 d5 b4 g4 f4 eb4 e4 f4 fs4 c5 bb4 eb5 cs5 fs4 g4 fs4 g4 gs4 a4 d5 b4 g4 a4 a4))

;;; rhythm

(setf rv1 '(w s s s s tie q -q s s s s -q -q -q -q q -q -q h -q h. -e. s s s s s s e s -s e. tie q -q))

;;; Length Map

(setf len-map1 '((e (stacc)) (s (ord)) (h (long)) (h. (long)) (w (long))))
(setf len-map2 '((e (rnd-pick '(ff mf))) (s (mf)) (e. (mf)) (h (p<f)) (h. (p<f)) (w (p<f))))

(setf vh1 (make-omn
:length (span v1 rv1)
:pitch (omn :pitch v1)
:velocity (length-map 
      len-map2
      rv1
      :otherwise '(mf) :repeat t)
:articulation (length-map 
      len-map1
      rv1
      :otherwise '(ord) :repeat t)))

 

image.thumb.png.992b68a8537c2ba5d029d02cfda2e6bb.png

Link to comment
Share on other sites

Interesting... I´m going to check this.

Another possibility would be to process the length-map before the make-omn expression to get more safe results.

Maybe the span expression inside can spoil the length-map list management span inside the make-omn expression.

That ocurred to me....

Thank you !

Best

Link to comment
Share on other sites

Remove the q length from the pitch list.
RND-PICK returns an atom, therefore you need to add a LIST.

 

(setf rv1 '(w s s s qs -q s s s s -q -q -q -q q -q -q h -q h. -e. s s s s s s e s -s q.. -q))
(setf len-map1 '((e (stacc)) (s (ord)) (h (long)) (h. (long)) (w (long))))
(setf len-map2 '((e (list (rnd-pick '(f ff)))) (s (mf)) (e. (mf)) (h (p<f)) (h. (p<f)) (w (p<f))))

(setf vh1 (make-omn
           :length rv1
           :pitch v1
           :span :pitch))
           
(length-map len-map1 vh1 :otherwise '(ord) :repeat t)
(length-map len-map2 vh1 :otherwise '(mf) :repeat t)

 

I would avoid expression with many nested functions - difficult to read and analyse.

Link to comment
Share on other sites

Just for the record...

This way it worked great ! (besides my messy way to build expressions...)

I find it easier to read... My mind is messy...

 

(setf vh1 (make-omn
           :length rv1
           :pitch v1
           :span :pitch
           :velocity (length-map 
                      len-map2
                      rv1
                      :otherwise '(mf) :repeat t)
           :articulation (length-map 
                          len-map1
                          rv1
                          :otherwise '(ord) :repeat t)))

 

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