Stephane Boussuge Posted April 16, 2017 Share Posted April 16, 2017 Hello, Here's an example of a possible way for achieve group instrumentation. The idea is to create names of instrumental groups and extract some binary list from this groups for using in do-timeline2 function for apply the instrumentation. The score is also attached to this post. ;;;--------------------------------------------------------- ;;; GROUP INSTRUMENTATION EXAMPLE ;;;--------------------------------------------------------- (setf size 12) ;;; Basic Pitch material generation (setf pmat (integer-to-pitch (rnd-number 24 -4 16))) ;;; Global velocity definition (setf gvel (rnd-sample size '((pp)(p)(mp)(mf)(f)))) ;;; OMN material for each instrument (setf flute (make-omn :pitch (pitch-transpose 12 (rnd-sample-seq (rnd-number size 2 8) (gen-repeat 6 (list pmat)))) :length (euclidean-rhythm (gen-repeat size '(16)) 1 16 's :type '(2)) :velocity gvel )) (setf clarinet (make-omn :pitch (pitch-transpose 7 (rnd-sample-seq (rnd-number size 2 8) (gen-repeat 6 (list pmat)))) :length (euclidean-rhythm (gen-repeat size '(16)) 1 16 's :type '(2)) :velocity gvel )) (setf violin (make-omn :pitch (pitch-transpose 10 (rnd-sample-seq (rnd-number size 2 8) (gen-repeat 6 (list pmat)))) :length (euclidean-rhythm (gen-repeat size '(16)) 1 8 's :type '(2)) :velocity gvel )) (setf violoncello (make-omn :pitch (pitch-transpose -12 (rnd-sample-seq (rnd-number size 2 8) (gen-repeat 6 (list pmat)))) :length (euclidean-rhythm (gen-repeat size '(16)) 1 8 's :type '(2)) :velocity gvel )) (setf piano-rh (make-omn :pitch (pitch-transpose 4 (rnd-sample-seq (rnd-number size 2 8) (gen-repeat 6 (list pmat)))) :length (euclidean-rhythm (gen-repeat size '(16)) 1 8 's :type '(2)) :velocity gvel )) (setf piano-lh (make-omn :pitch (pitch-transpose -17 (rnd-sample-seq (rnd-number size 2 8) (gen-repeat 6 (list pmat)))) :length (euclidean-rhythm (gen-repeat size '(16)) 1 4 's :type '(2)) :velocity gvel )) ;;; GROUP INSTRUMENTATION ;;; the main idea is to generate some binary list ;;; based on the interpretation of "instrumental textures or group names). ;; INSTRUMENTAL GROUPS DEFINITION (setf texture1 '(flute clarinet)) (setf texture2 '(flute violin)) (setf texture3 '(flute clarinet violoncello piano-rh piano lh)) (setf texture4 '(clarinet violin violoncello)) (setf texture5 '(violin violoncello piano-rh piano-lh)) (setf texture6 '(flute)) (setf orch-template '(flute clarinet violin violoncello piano-rh piano-lh )) ;; utility function definition (defun binary-orch1 (orch-template groups) (loop for i in orch-template collect (if (member i groups) 0 1))) ;; main function (defun binary-orch (orch-template groups) (mapcar (lambda(x) (binary-orch1 orch-template x)) groups)) ;; group order choice (setf orchestration1 (apply-eval (rnd-sample size '( texture1 texture2 texture3 texture4 texture5 texture6 )))) ;; generate binary from group order (setf binary-from-orch (binary-orch orch-template orchestration1 )) ;; apply the orchestration (do-timeline2 '(flute clarinet violin violoncello piano-rh piano-lh) (matrix-transpose binary-from-orch) '(gen-pause x) ) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score pierrot-ensemble (:title "Title" :composer "Composer" :copyright "Copyright ©" :key-signature 'chromatic :time-signature '((1 1 1 1) 4) :tempo 71 :layout (list (bracket-group (flute-layout 'flute) (clarinet-layout 'clarinet) (violin-layout 'violin) (violoncello-layout 'violoncello)) (piano-layout 'piano-rh 'piano-lh))) (flute :omn flute :channel 1 :sound 'gm :program 'flute :volume 95 :pan 70 :controllers (91 '(52)) ) (clarinet :omn clarinet :channel 3 :sound 'gm :program 'clarinet :volume 95 :pan 60 :controllers (91 '(57)) ) (violin :omn violin :channel 14 :sound 'gm :program 'violin :volume 100 :pan 16 :controllers (91 '(48)) ) (violoncello :omn violoncello :channel 15 :sound 'gm :program 'cello :volume 90 :pan 95 :controllers (91 '(60)) ) (piano-rh :omn piano-rh :channel 7 :sound 'gm :program 'acoustic-grand-piano :volume 100 :pan 64 :controllers (91 '(60)) ) (piano-lh :omn piano-lh :channel 8 :sound 'gm :program 'acoustic-grand-piano :volume 100 :pan 64 :controllers (91 '(60)) ) ) SB. ExempleForumInstrumentation.opmo AM and opmo 2 Quote Link to comment Share on other sites More sharing options...
opmo Posted April 16, 2017 Share Posted April 16, 2017 Excellent example, thank you Stephane Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.