Stephane Boussuge

A possible motivic lengths approach to articulation generation

8 posts in this topic


Sometimes we generate some flow of pitch and lengths that we assemble later into OMN material,


It can be tiedous to add manually the articulations particularly the "leg" omn instruction,

 and it can sometimes be useful to have a technique for automated implementation
of part of these task, who it will be always possible to edit more precisely thereafter. 
Below a possible technique based on the recognition and association of patterns of lengths values with articulation instructions.

 

At first, we define a stream of lengths for our phrase:

(setf len '(1/8 1/8 1/16 1/16 -1/16 1/8 1/8 1/8 1/8))

and we generate with the help of the function substitute-motif some articulations based on motivic lengths patterns.

The substitute-motif will search for motives and will replace this motives by other (in that case, replace by motives of articulation instructions)

If the function doesn't find some corresponding motives, it will use the :otherwise clause.

(setf artic (substitute-motif '((1/8 1/8)(1/16))
                              '((leg -)(stacc))
                              len
                              :otherwise '-))
;=> (leg - stacc stacc - leg - leg -)

We have to process this output now with the function gen-swallow for "swallow" the item corresponding to rest values.

(setf artic.swallow (gen-swallow len artic))
=> (leg - stacc stacc leg - leg -)

Finally, we assemble all the parameters into an OMN stream with the make-omn function:

(setf omn (make-omn
            :pitch '((c4 d4 e4 f4 g4))
            :length len
            :velocity '((f))
            :articulation artic.swallow))

Example1.png

Here's a complementary score example:

;;; Length defintion based on euclidean algorithm
(setf basery (euclidean-rhythm (rnd-sample
                                16
                                '(16 18 24))
                               4 16 '1/16
                               :type 2))
;;; Apply the search and substitute process on each of the sublists
;;; with mapcar function
(setf artic (mapcar
             (lambda(x)
               (substitute-motif 
                '((1/16 1/16 1/16 1/16)(1/16 1/16 1/16)(1/16 1/16)(1/8 1/8)
                  (1/4)(1/8)
                  ) ;old
                '((leg leg leg -)(- - -)(leg -)(leg -)
                  (stacc)(stacc)
                  ) ;new
                x
                :otherwise '-
                ))
             basery))
;;;Cleaning with gen-swallow
(setf artic.swa (gen-swallow basery artic))
;;; Pitch generation based on white noise
(setf pch (vector-to-pitch '(g3 c5) (gen-white-noise 64)))
;;; Parameters assembly
(setf p1.omn (make-omn
              :pitch pch
              :length basery
              :velocity '((f))
              :articulation artic.swa
              ))
;;; Get the times signatures 
(setf ts (get-time-signature p1.omn))
;;; Score definition
(def-score solo
           (
            :title "solo"
            :composer "S.Boussuge"       
            :key-signature 'chromatic
            :time-signature ts
            :tempo 108
            :layout (violin-layout 'violon)
            )
(violon :omn p1.omn :channel 1 :sound 'gm :program 'violin)
) 

SoloVnScore.png

 

SB.

opmo and lviklund like this

Share this post


Link to post
Share on other sites

here's a small exemple of using motif-map function for the particular case of legato slurs:

 

(setf len '((e e e e q -q e e)(q e e q s s s s e -e)))

(setf art (motif-map 
           '(((e e e e) (leg leg leg -))
             ((e e) (leg -))
             ((s s s s) (leg leg leg -))
             )
           len
           :otherwise '-
           :swallow t))

(setf phrase (make-omn
             :pitch (rnd-sample 24 (make-scale 'a3 18))
             :length len
             :articulation art
             ))

Capture d’écran 2016-04-19 à 13.51.40.png

opmo likes this

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