Search the Community
Showing results for tags 'articulation'.
Found 3 results
i didn't find a OM-library-solution for this kind of thing, so i coded it... if you want to REPLACE the articulation of some specific pitches. perhaps all 'd4 sould be PONTE... you could use this. it was necessary to code it like that, because otherwise you get in trouble with the empty parameter-slots... should work fine greetings andré ;;; SUBFUNCTIONS (defun eliminate-nil (alist) (loop for i in alist when (not (null i)) collect i)) (defun complete-event-slots (omn-list) (let ((omn-art (omn :articulation (single-events (flatten omn-list))))) (single-events (omn-replace :articulation (flatten (eliminate-nil (loop for i in omn-art for cnt = 0 then (incf cnt) when (equal (car i) '-) collect (nth (1- cnt) omn-art) else collect i))) omn-list)))) ;(complete-event-slots '(5q a4 ff pizz 5q e3 -e 5q a4 f)) ;;; MAIN FUNCTION (defun replace-articulation-of-a-pitch (omn-list &key pitches articulation (chance 1.0)) (loop for i in (complete-event-slots (flatten omn-list)) when (and (member (car (omn :pitch i)) pitches) (prob? chance)) append (omn-component-replace i (list articulation)) else append i)) ;;; EXAMPLE (replace-articulation-of-a-pitch '(5q a4 ff pizz 5q e3 p -q 5q d4 pizz) :pitches '(a4 d4) :articulation 'ponte :chance 1.0) -> (5q a4 ff ponte 5q e3 p pizz -q 5q d4 p ponte)
Stephane Boussuge posted a topic in forums_forum_36Sometimes 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)) 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) ) SB.
Hi, often when we generate articulation and particularly legato articulation with functions like LENGTH-MAP, the legato slur could finished on marc or stacc notes like that: a possible way for improve this could be to use a post processing of LENGTH-MAP outputs with a MOTIF-MAP function: Attached to this post, a work in progress, Flux for ensemble, as an example of a possible use "in context" of this technique. Have a good day. SB. Flux-Extrait.pdf flux1.mp3 Flux1-02.opmo