Jump to content

Stephane Boussuge

Moderators
  • Posts

    1,072
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Stephane Boussuge got a reaction from lviklund in How to apply different voicings over a chord progression   
    I think you can use gen-chord3.
     
    also i have finished the function you asked in another post about a different version of add-interval-if-length.
     
    This one is make-chord-if-length and is based on gen-chord3.
     
    i'll post it here for convenience but will also post it in programming forums section.
     
    ;;; ============================================== ;;; UTILITY FUNCTIONS ;;; (defun make-chord-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12))) (cycle t)(relative nil) seed) (setf seed (rnd-seed seed)) (let ((s-events (single-events omn))) (loop for e in s-events for i in (gen-trim (length s-events) interval-list) when (funcall test (omn-encode (first e)) length-val) append (omn-replace :pitch (gen-chord3 (list (second e)) i :cycle cycle :relative relative :seed (seed)) e ) else append e))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4)) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7)(3 10))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :seed 4) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t :seed 4) ;;; ============================= ;;; MAIN FUNCTION (defun make-chord-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12)))(cycle nil)(relative nil) seed) (setf seed (rnd-seed seed)) (do-verbose ("make-chord-if-length :seed ~s :length-val ~s :interval-list ~s :cycle ~s :relative ~s" seed length-val interval-list cycle relative) (let ((test-fn (case test (> #'>) (< #'<) (= #'=) (otherwise test)))) (if (listp (car omn)) (mapcar #'(lambda (x) (make-chord-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed))) omn) (make-chord-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed)))))) ;;; Tests ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4))) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :seed 8) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :interval-list '((2 9)(7 11))) ;(make-chord-if-length '((q c4 d4 e4 f4 g4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t :seed 8) SB.
  2. Like
    Stephane Boussuge got a reaction from ydepps in make-chord-if-length   
    Here's a new function a bit similar to my old "add-interval-if-length" function but bit more sophisticated.
    It use gen-chord3 to create chord on defined length.
     
    ;;; ============================================== ;;; UTILITY FUNCTIONS ;;; (defun make-chord-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12))) (cycle t)(relative nil) seed) (setf seed (rnd-seed seed)) (let ((s-events (single-events omn))) (loop for e in s-events for i in (gen-trim (length s-events) interval-list) when (funcall test (omn-encode (first e)) length-val) append (omn-replace :pitch (gen-chord3 (list (second e)) i :cycle cycle :relative relative :seed (seed)) e ) else append e))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4)) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7)(3 10))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :seed 4) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t :seed 4) ;;; ============================= ;;; MAIN FUNCTION (defun make-chord-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12)))(cycle nil)(relative nil) seed) (setf seed (rnd-seed seed)) (do-verbose ("make-chord-if-length :seed ~s :length-val ~s :interval-list ~s :cycle ~s :relative ~s" seed length-val interval-list cycle relative) (let ((test-fn (case test (> #'>) (< #'<) (= #'=) (otherwise test)))) (if (listp (car omn)) (mapcar #'(lambda (x) (make-chord-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed))) omn) (make-chord-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed)))))) ;;; Tests ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4))) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :seed 8) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :interval-list '((2 9)(7 11))) ;(make-chord-if-length '((q c4 d4 e4 f4 g4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t :seed 8) i've also attached the original file to this post.
    SB.
    make-chord-if-length.lisp
  3. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in Pattern for Piano   
    Now, finally it's done by myself.
     
    .
    SB
  4. Like
    Stephane Boussuge got a reaction from AM in How to apply different voicings over a chord progression   
    I think you can use gen-chord3.
     
    also i have finished the function you asked in another post about a different version of add-interval-if-length.
     
    This one is make-chord-if-length and is based on gen-chord3.
     
    i'll post it here for convenience but will also post it in programming forums section.
     
    ;;; ============================================== ;;; UTILITY FUNCTIONS ;;; (defun make-chord-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12))) (cycle t)(relative nil) seed) (setf seed (rnd-seed seed)) (let ((s-events (single-events omn))) (loop for e in s-events for i in (gen-trim (length s-events) interval-list) when (funcall test (omn-encode (first e)) length-val) append (omn-replace :pitch (gen-chord3 (list (second e)) i :cycle cycle :relative relative :seed (seed)) e ) else append e))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4)) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7)(3 10))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :seed 4) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t :seed 4) ;;; ============================= ;;; MAIN FUNCTION (defun make-chord-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12)))(cycle nil)(relative nil) seed) (setf seed (rnd-seed seed)) (do-verbose ("make-chord-if-length :seed ~s :length-val ~s :interval-list ~s :cycle ~s :relative ~s" seed length-val interval-list cycle relative) (let ((test-fn (case test (> #'>) (< #'<) (= #'=) (otherwise test)))) (if (listp (car omn)) (mapcar #'(lambda (x) (make-chord-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed))) omn) (make-chord-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed)))))) ;;; Tests ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4))) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :seed 8) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :interval-list '((2 9)(7 11))) ;(make-chord-if-length '((q c4 d4 e4 f4 g4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t :seed 8) SB.
  5. Thanks
    Stephane Boussuge got a reaction from lviklund in Resetting Articulations and Dynamics to none   
    i did a "default" articulation with no display in my opmo user attributes file.
     
    (add-program-attributes '(default) ) SB.
  6. Like
    Stephane Boussuge got a reaction from JulioHerrlein in How to apply different voicings over a chord progression   
    I think you can use gen-chord3.
     
    also i have finished the function you asked in another post about a different version of add-interval-if-length.
     
    This one is make-chord-if-length and is based on gen-chord3.
     
    i'll post it here for convenience but will also post it in programming forums section.
     
    ;;; ============================================== ;;; UTILITY FUNCTIONS ;;; (defun make-chord-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12))) (cycle t)(relative nil) seed) (setf seed (rnd-seed seed)) (let ((s-events (single-events omn))) (loop for e in s-events for i in (gen-trim (length s-events) interval-list) when (funcall test (omn-encode (first e)) length-val) append (omn-replace :pitch (gen-chord3 (list (second e)) i :cycle cycle :relative relative :seed (seed)) e ) else append e))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4)) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7)(3 10))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :seed 4) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t :seed 4) ;;; ============================= ;;; MAIN FUNCTION (defun make-chord-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12)))(cycle nil)(relative nil) seed) (setf seed (rnd-seed seed)) (do-verbose ("make-chord-if-length :seed ~s :length-val ~s :interval-list ~s :cycle ~s :relative ~s" seed length-val interval-list cycle relative) (let ((test-fn (case test (> #'>) (< #'<) (= #'=) (otherwise test)))) (if (listp (car omn)) (mapcar #'(lambda (x) (make-chord-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed))) omn) (make-chord-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed)))))) ;;; Tests ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4))) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :seed 8) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :interval-list '((2 9)(7 11))) ;(make-chord-if-length '((q c4 d4 e4 f4 g4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t :seed 8) SB.
  7. Like
    Stephane Boussuge reacted to AM in inserting a sequence by overwriting   
    OVERWRITE FUNCTION: first time i'm working with this function (i coded it a year ago)... to overwrite the output/score => INSERTS....
    - and it's very useful, perhaps JANUSZ could code an official OPMO-version of this which works perfect?
     
    greetings
    andré
    ;;; OVERWRITE!! ---------------------------------------------- (defun memberp (n liste) (not (equal 'nil (member n liste)))) (defun get-resolution2 (be) (cond ((memberp (cadr be) '(3 6 12 24 48)) 1/24) ((memberp (cadr be) '(1 2 4 8 16 32)) 1/16) ((memberp (cadr be) '(5 10 20 40)) 1/20) ((memberp (cadr be) '(7 14 28 56 1)) 1/28))) (defun overwrite (seq &key insert bar/beat) (car (last (let ((bar) (beat) (resolution) (distance)) (progn (setf bar (loop for i in bar/beat collect (car i)) beat (loop for j in bar/beat collect (cadr j))) (loop for ba in bar for be in beat for ins in insert with time-sign = (get-time-signature seq) with ord-time-sign = (get-time-signature seq) do (setf resolution (get-resolution2 be) time-sign (if (listp (car time-sign)) (loop for i in time-sign when (> (caddr i) 1) append (loop repeat (caddr i) collect (list (car i) (cadr i))) else collect (list (car i) (cadr i))) (append time-sign)) distance (if (listp (car time-sign)) (+ (sum (loop repeat (- ba 1) for i in time-sign collect (/ (/ (car i) (cadr i)) (get-resolution2 be)))) (/ (/ (1- (car be)) (cadr be)) (get-resolution2 be))) (+ (/ (* (1- ba) (/ (car time-sign) (cadr time-sign))) (get-resolution2 be)) (/ (/ (1- (car be)) (cadr be)) (get-resolution2 be))))) do (setf seq (omn-to-time-signature (length-rest-merge (omn-merge-ties (flatten (loop repeat (length (omn-to-time-signature seq (list (numerator resolution) (denominator resolution)))) for cnt = 0 then (incf cnt) with new-seq = (omn-to-time-signature seq (list (numerator resolution) (denominator resolution))) with ins-rounded = (append ins (rest (length-rational-quantize (list (apply '+ (omn :length ins))) :round resolution))) when (= cnt distance) collect ins-rounded and do (setf cnt (+ (/ (get-span (flatten ins-rounded)) resolution) cnt -1)) else collect (nth cnt new-seq))))) ord-time-sign)) do (setf time-sign ord-time-sign) collect seq))))))  
     
     
    TWO EXAMPLES:
     
    ;;; in a 3/4 (setf seq1 '((e c6 a5 h b5 tie) (q b5 b5 a5 tie) (h a5 q a5) (h. g5))) (overwrite seq1 :insert '((3q c5 b4 bb4 a4) (3q c4 b3 bb3 a3)) :bar/beat '((2 (2 12)) (3 (7 12)))) ;;; with changing time-signatures (setf seq2 '((e c6 a5 h b5 q tie) (q b5 b5 a5 tie) (q a5 q a5) (h. g5))) (overwrite seq2 :insert '((3q c5 b4 bb4 a4) (3q c4 b3 bb3 a3)) :bar/beat '((1 (2 12)) (3 (1 12))))  
     
     
     
  8. Like
    Stephane Boussuge reacted to JulioHerrlein in PAT MARTINO Idiomatic Jazz Lines Generator   
    This is for generating some jazz licks in the style of the LINEAR EXPRESSIONS, by jazz guitarist PAT MARTINO.
    The rhythm slots of the example contain the same 16th value, but it can be worked out as Rhythmic Cells. I was testing straight 16th lines.
     
    https://www.amazon.com/Linear-Expressions-Pat-Martino/dp/1423460898/ref=sr_1_1?ie=UTF8&amp;qid=1539901867&amp;sr=8-1&amp;keywords=linear+expression+martino
     
    ;;; PAT MARTINO LINEAR Expressions Lick Generator JAZZ IDIOMS (setf r0 '(s) r1 '(s s s s) r2 '(s s s s s s s s) r3 '(s s s s) r4 '(s s s s) r5 '(s s s s s s s s) r6 '(s s s s s s s s) r7 '(s s s s s s s s) r8 '(s s s s s s s s) r9 '(s s s s s s s s) r10 '(s s s s s s s s)) (setf p0 '(g3 a3 bb3 c4 cs4 d4 f4 d4) p1 '(e4 fs4 g4 a4 c5 a4 bb4 d5) p2 '(f5 a5 ab5 e5 g5 f5 e5 d5) p3 '(c5 a4 bb4 d5 a4 bb4 a4 g4) p4 '(a3 bb3 d4 f4 a4 bb4 a4 ab4) p5 '(g4 a4 bb4 c5 d5 f5 a5 c6) p6 '(bb5 d5 f5 a5 g5 gb5 f5 g5) p7 '(e5 f5 e5 d5 c5 a4 g4 a4) p8 '(d4 e4 fs4 a4 fs4 g4 a4 c5) p9 '(a4 bb4 d5 f5 a5 bb5 a5 ab5) p10 '(g5 f5 d5 ds5 e5 g5 bb5 d6)) (setf v0 '(f) v1 '(mp) v2 '(f) v3 '(pp) v4 '(p f mf) v5 '(fff) v6 '(fff) v7 '(mf) v8 '(p) v9 '(f) v10 '(ff)) (setf sec (gen-repeat 10 (rnd-unique 12 '(0 1 2 3 4 5 6 7 8 9 10) ))) (setf r-list (assemble-section 'r sec)) (setf p-list (assemble-section 'p sec)) (setf v-list (assemble-section 'v sec)) (setf phrases (make-omn :length r-list :pitch p-list :velocity v-list)) (def-score collage (:key-signature 'atonal :time-signature '(2 4) :tempo 144 :layout (piano-grand-layout 'piano)) (piano :omn phrases :channel 1 :sound 'gm :program 0) )  
  9. Like
    Stephane Boussuge got a reaction from torstenanders in MIDI-pitch-bend-messages   
    I own the 2 library and for me ConTimbre is indeed much better (much complete)  than IRCAM instruments lib.
     
    SB.
  10. Like
    Stephane Boussuge reacted to Andy in IDE..powerful stuff   
    So I didn't really know what an IDE was..it's an Integrated Development Environment..is that right?
    Well anyhow I just wanted to share my enthusiasm for Opusmodus' idea of an integrated workspace...being able to have pdf books available full screen with a shortcut is amazing...and pictures and audio etc. I am a big fan of Wooden Books for instance and bam..there they are in my composing space for reference. 
    I'm kind of thinking this is how all "composing" software should be..but mostly now it seems to me to be about a graphical interface that is irrelevant alongside a multitrack recorder paradigm.
     
    Anyhow happy to be on this journey (())
     
  11. Like
    Stephane Boussuge reacted to JulioHerrlein in Giant Steps Improvisation generator   
    Hello, All
     
    The idea is to generate some improvised lines over the Giant Steps progression.
    Every time the code is evaluated, a different comping and improvisation is generated.
    In this first effort, the improvisation is generated by the arpeggios resultating from the voice-leading of the progression.
    After that, I want to code some superimpositions of other chord substitutions.
     
    This is something I came with after studying the Harmonic-Path Function ( through some example by Stephane Boussuge)
    I also got some Drums from Jazz Trio, by Janusz Podrazik.
    Below is the commented code and an mp3 showing the result.
     
    All the best,
     
    Julio
     
    gsteps_GEN2.mp3
     
    ;; Giant Steps Progression provided as Harmonic Path. ;; Some chords are repeated (the chords that last more time). (setf harmpath '((h (b3 maj7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (gb3 7)) (h (b3 maj7) (b3 maj7)) (h (f3 m7) (bb3 7)) (h (eb3 maj7) (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (g3 maj7)) (h (cs3 m7) (fs3 7)) (h (b3 maj7) (b3 maj7)) (h (f3 m7) (bb3 7)) (h (eb maj7) (eb maj7)) (h (cs3 m7) (fs3 7))) ;; Just the Roots from the chord progression: for building the bassline later. basshpath (pitch-demix 4 harmpath) ;; Taking out the rhythm information of the bassline OMN, ;; organizing sublist of 1 element for repeating the tones twice, ;; preparing for another rhythm purposes. basspitches (gen-repeat 6 (flatten (gen-repeat '(2) (gen-divide 1 (flatten (omn :pitch (ambitus '(e1 g2) basshpath))))))) ;; Using the same harmonic path as a voice leading comping and repeating it ;; in the same way I did with the bass line (twice each chord). ;; Bass line and comping will have the same rhythm kicks. comping (gen-repeat '(2) (gen-divide 1 (flatten (omn :pitch (chord-closest-path '(b3c4e4g4) '((h (b3 maj7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (gb3 7)) (h (b3 maj7) (b3 maj7)) (h (f3 m7) (bb3 7)) (h (eb3 maj7) (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (g3 maj7)) (h (cs3 m7) (fs3 7)) (h (b3 maj7) (b3 maj7)) (h (f3 m7) (bb3 7)) (h (eb maj7) (eb maj7)) (h (cs3 m7) (fs3 7)))))))) ;; MELODIZANDO HAR-PATH. Melodizing the same voice-leading of the comping ;; to get the arpeggios for soloing. melodia (flatten (pitch-melodize (chord-closest-path '(b3c4e4g4) '((h (b3 maj7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (gb3 7)) (h (b3 maj7) (b3 maj7)) (h (f3 m7) (bb3 7)) (h (eb3 maj7) (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (g3 maj7)) (h (cs3 m7) (fs3 7)) (h (b3 maj7) (b3 maj7)) (h (f3 m7) (bb3 7)) (h (eb maj7) (eb maj7)) (h (cs3 m7) (fs3 7)))))) ;; Repeating the melody list some times. gstepspitches (gen-repeat 6 (flatten (omn :pitch melodia))) ) ;; Defining and randomizing rhythms. (setf r1 (rnd-order '((s s s s -s -s -s -s))) r2 (rnd-order '((s s s s -s -s -s -s))) r3 (rnd-order '((s s s s -s -s -s -s))) r4 (rnd-order '((s s s s -s -s -s -s))) r5 (rnd-order '((s s s s -s -s -s -s))) r6 (rnd-order '((s s s s -s -s -s -s))) r7 (rnd-order '((s s s s -s -s -s -s))) r8 (rnd-order '((s s s s -s -s -s -s))) r9 (rnd-order '((s -s -s -s))) r9b (rnd-order '((s -s -s -s))) r10 '(s -s -s -s) r11 (rnd-order '((s s s -s))) r12 '(-s -s -s -s) rhy2 (flatten (apply-eval (rnd-order '((r1 r2 r3 r4 r5 r6 r7 r8 r1 r2 r3 r4 r5 r6 r7 r8 r1 r2 r3 r4 r5 r6 r7 r8 r1 r2 r3 r4 r5 r6 r7 r8 r1 r2 r3 r4 r5 r6 r7 r8 r1 r2 r3 r4 r5 r6 r7 r8))))) rhyinv (length-invert rhy2) bdbsch (gen-repeat 6 (flatten (apply-eval (rnd-order '((r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9 r10 r9 r10 r9b r9))))))) ;; Setting Up OMN for each instrument. (setf gssolo (make-omn :length rhy2 :pitch gstepspitches :velocity (rnd-order'(mf p f p ff mf))) bassline (make-omn :length bdbsch :pitch basspitches :velocity (rnd-order'(mf p f p ff mf))) pnocomp (make-omn :length bdbsch :pitch comping :velocity (rnd-order'(mf p f p ff mf))) ) ;;--------------------------------------------------------- ;; Some Drums ;; (From Janusz Jazz Trio, with some tweaks in the hats) ;;--------------------------------------------------------- (setf hh1 (length-span 8/4 '(-s gs2 ff))) ;(setf oh1 (length-span 8/4 '(-s - bb2 ff -))) ;(setf ch1 (length-span 8/4 '(s fs2 ff -))) (setf sn1 (length-span 8/4 '(-e d2 - - a2 - - s = q f2 e))) (setf bd1 (length-span 8/4 '(-s b1 ff e c2 = -e. e = -e. -s))) (setf hh (rnd-order (gen-repeat 18 (list hh1)))) ;(setf oh (rnd-order (gen-repeat 18 (list oh1)))) ;(setf ch (rnd-order (gen-repeat 18 (list ch1)))) (setf sn (pitch-figurate '(3 2) (rnd-order (gen-repeat 18 (list sn1))) :interval '(-1 -2 14))) (setf bd (rnd-order (gen-repeat 18 (list bd1)))) ;; ------- SCORE (adapted from Harmonic Path Study, Boussuge) (def-score giant-steps-vl-improv (:title "giant-steps-vl-improv" :composer "Julio Herrlein" :copyright "Copyright © 2018 HERRLEIN" :key-signature '(c maj) :time-signature '(4 4) :tempo 124 :ignore-velocity t :layout (list (xylophone-single-layout 'i1) (guitar-layout 'i2) (contrabass-layout 'i3))) (i1 :omn gssolo :channel 1 :sound 'gm :program 'Clarinet :volume 100) (i2 :omn pnocomp :channel 2 :sound 'gm :program 'Electric-Piano-1 :volume 80) (i3 :omn bassline :channel 4 :sound 'gm :program 'Electric-Bass-Finger :volume 100) (hh :omn hh :channel 10 :sound 'gm :program 0 :volume 70) ;(oh :omn oh) ;(ch :omn oh) (sn :omn sn) (bd :omn bd) )  
  12. Like
    Stephane Boussuge reacted to torstenanders in gen-rotate extension   
    I agree that this is useful, and therefore I also implemented a similar functionality in my function rotate-omn 🙂  You can find its documentation at https://tanders.github.io/tot/sources/form.html#_g229430 and download the whole library at https://github.com/tanders/tot.
     
    BTW: You meanwhile should also have quite a sizeable collection of custom functions for Opusmodus. While not sharing them together in some kind of library as well? 
     
    Best,
    Torsten
     
  13. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in Pattern for Piano   
    Hi Julio,
    it could be possible but a bit outside my programming capabilities, but Janusz is certainly capable to achieve this.
    And , as  you, i would love this feature 🙂
    S.
     
  14. Like
    Stephane Boussuge reacted to JulioHerrlein in Pattern for Piano   
    Dear Janusz,
     
    It would be great to have this function in the core functions of version 1.3
     
    Best,
    Julio
     
    Dear Stephane,
     
    Can we use this function to add more than one interval to each note ?
    This can add one  interval, but I'm refering to add also two intervals, forming a trichord.
    1) So the interval list would look like this, for adding intervals:
     
    (add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 f4)) :interval-list '(5 4)) 2) And like this, to alternate beetween a major triad and a perfect fourth:
    (add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 f4)) :interval-list '((4 3) 5)) Is it possible ?
    Any suggestion ?
     
    Best,
    Julio
  15. Like
    Stephane Boussuge reacted to opmo in Circle-Pitch-Plot   
    A new CIRCLE-PITCH-PLOT function (examples below) will be part of the forthcoming Opusmodus 1.3.
     
    The function CIRCLE-PIOTCH-PLOT returns a geometrical representation of relationships among the 12 pitch classes of the chromatic scale in pitch class space and provides an easy way to identify patterns and similarities between harmonic structures.
     
    Clockwise motion represents ascending pitch motion, and counterclockwise motion represents descending pitch motion.
     
    Examples:
     
    Major Triad
    (circle-pitch-plot '(c4e4g4))
     
    Minor Triad
    (circle-pitch-plot '(c4f4ab4))
     
    Augmented Triad
    (circle-pitch-plot '(c4e4gs4))
     
    All 4 augmented triads
    (circle-pitch-plot '(c4e4gs4 db4f4a4 d4fs4bb4 eb4g4b4))
     
     
    With :style :fill
    (circle-pitch-plot '(c4e4gs4 db4f4a4 d4fs4bb4 eb4g4b4) :style :fill)
     
    Example with chord names.
    Fully-Diminished 7th Chord
    (circle-pitch-plot 'dim7)
     
    All 3 fully-diminished 7th chords
    (circle-pitch-plot '((c4 dim7) (cs4 dim7) (d4 dim7)))
     
    Whole-Tone Scale
    (circle-pitch-plot '(0 2 4 6 8 10))
     
    The complex of 2 Whole-Tone Scale
    (circle-pitch-plot '((0 2 4 6 8 10) (1 3 5 7 9 11)) :style :fill)
     
    Chromatic Scale
    (circle-pitch-plot 'chromatic :point-radius 4)
     
    The complex of 6 tritones
    (circle-pitch-plot '((0 6) (1 7) (2 8) (3 9) (4 10) (5 11)) :point-radius 4)
     
    Tonalities
    (circle-pitch-plot 'mixolydian-greek :point-radius 4)
    (circle-pitch-plot 'bartok :point-radius 4)
    (circle-pitch-plot 'messiaen-mode3 :point-radius 4)
    (circle-pitch-plot 'hyojo :point-radius 4)
     
    Contrary Motion
    (circle-pitch-plot '(0 1 11 2 10 3 9 4 8 5 7 6)              :sort nil :join-first nil)
    (circle-pitch-plot '((0 1) (0 2) (0 3) (0 4) (0 5) (0 6)                (0 7) (0 8) (0 9) (0 10) (0 11)) :point-radius 4)
     
    Example with Forte notation
    (circle-pitch-plot '(6-32 6-7))
     
    Example with omn-form sequence and :type :pitches
     
    (circle-pitch-plot '(((leg s g2 p dbow+sul d3 sul b3 dig1 a3 b3 d3 b3 d3)                 (leg g2 d3 b3 a3 b3 d3 b3 d3)))              :type :pitches)  

     
    Circle types
    (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9)) :style :fill)
    (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9))              :type :pitches :style :fill)  

    (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9))              :type :fifths :style :fill)  

     
    Examples with :sort and :remove-duplicates set to nil
    (circle-pitch-plot '(0 2 6 0 3 7 0 4 8))
    (circle-pitch-plot '(0 2 6 0 3 7 0 4 8) :sort nil)
    (circle-pitch-plot '(0 2 6 0 3 7 0 4 8)              :sort nil :remove-duplicates nil)
    (circle-pitch-plot '(0 2 6 0 3 7 0 4 8)              :sort nil :remove-duplicates nil :join-first nil)  

    (circle-pitch-plot '(8 4 2 0 10 2 8 10 4 6 8)              :sort nil :remove-duplicates nil)
     
    Best wishes,
    Janusz
  16. Like
    Stephane Boussuge reacted to AM in count-up/down   
    use it or not...
    greetings
    andré
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; count-up/down => not well coded but it works ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; A FUNCTION which counts a integer-list from its values (individual) ;;; to value B (all the same end-value :to (default is 1)) ;;; n => how many output values (approx: depends on input/round... was not important for my project) ;;; up or down (default is 'down) ;;; with variabel STEPS => sequencieally (horizontal) or with steps for each value individiual (vertical) ;;; with COUNT => means how many lists with same values (like "global-steps") ;;; SUB (defun round-to (number precision &optional (what #'round)) (let ((div (expt 10 precision))) (/ (funcall what (* number div)) div))) ;;; MAIN (defun count-up/down (n intlist &key (steps '(1)) (count 1) (type 'horizontal) (direction 'down) (to 1)) (let* ((cycles (round-to (/ (1- n) (length intlist)) 0)) (intlists (cond ((equal type 'horizontal) (loop repeat cycles for cnt = 0 then (incf cnt) for stp in (if (< (length steps) cycles) (filter-first cycles (flatten (gen-repeat cycles steps))) steps) when (= cnt 0) append (loop repeat count collect intlist) when (integerp (/ cnt count)) collect (setf intlist (if (equal direction 'down) (loop for i in intlist when (>= (- i stp) to) collect (- i stp) else collect to) (loop for i in intlist when (<= (+ i stp) to) collect (+ i stp) else collect to))) else collect intlist)) ((equal type 'vertical) (loop repeat cycles for cnt = 0 then (incf cnt) when (= cnt 0) append (loop repeat count collect intlist) when (integerp (/ cnt count)) collect (setf intlist (if (equal direction 'down) (loop for i in intlist for stp in steps when (>= (- i stp) to) collect (- i stp) else collect to) (loop for i in intlist for stp in steps when (<= (+ i stp) to) collect (+ i stp) else collect to))) else collect intlist))))) (loop repeat cycles for x in intlists collect x))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; SIMPLE EXAMPLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 9 8 7 6 7) :to 3 :direction 'down)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (8 7 6 5 6 8 7 6 5 6) (7 6 5 4 5 7 6 5 4 5) (6 5 4 3 4 6 5 4 3 4) (5 4 3 3 3 5 4 3 3 3) (4 3 3 3 3 4 3 3 3 3) (3 3 3 3 3 3 3 3 3 3) (3 3 3 3 3 3 3 3 3 3) (3 3 3 3 3 3 3 3 3 3) (3 3 3 3 3 3 3 3 3 3)) (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 9 8 7 6 7) :count 2 :to 5 :direction 'down)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (9 8 7 6 7 9 8 7 6 7) (8 7 6 5 6 8 7 6 5 6) (8 7 6 5 6 8 7 6 5 6) (7 6 5 5 5 7 6 5 5 5) (7 6 5 5 5 7 6 5 5 5) (6 5 5 5 5 6 5 5 5 5) (6 5 5 5 5 6 5 5 5 5) (5 5 5 5 5 5 5 5 5 5) (5 5 5 5 5 5 5 5 5 5)) (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 9 8 7 6 7) :to 15 :direction 'up)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (10 9 8 7 8 10 9 8 7 8) (11 10 9 8 9 11 10 9 8 9) (12 11 10 9 10 12 11 10 9 10) (13 12 11 10 11 13 12 11 10 11) (14 13 12 11 12 14 13 12 11 12) (15 14 13 12 13 15 14 13 12 13) (15 15 14 13 14 15 15 14 13 14) (15 15 15 14 15 15 15 15 14 15) (15 15 15 15 15 15 15 15 15 15)) (list-plot (flatten (count-up/down 200 '(9 8 7 6 7 9 8 7 6 7) :count 2 :to 15 :direction 'up)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (9 8 7 6 7 9 8 7 6 7) (10 9 8 7 8 10 9 8 7 8) (10 9 8 7 8 10 9 8 7 8) (11 10 9 8 9 11 10 9 8 9) (11 10 9 8 9 11 10 9 8 9) (12 11 10 9 10 12 11 10 9 10) (12 11 10 9 10 12 11 10 9 10) (13 12 11 10 11 13 12 11 10 11) (13 12 11 10 11 13 12 11 10 11) (14 13 12 11 12 14 13 12 11 12) (14 13 12 11 12 14 13 12 11 12) (15 14 13 12 13 15 14 13 12 13) (15 14 13 12 13 15 14 13 12 13) (15 15 14 13 14 15 15 14 13 14) (15 15 14 13 14 15 15 14 13 14) (15 15 15 14 15 15 15 15 14 15) (15 15 15 14 15 15 15 15 14 15) (15 15 15 15 15 15 15 15 15 15) (15 15 15 15 15 15 15 15 15 15)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; MORE COMPLEX/INTERESTING EXAMPLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; horizontal means every cycle has a new step-value (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 15 8 7 6 7) :steps '(1 2 1 1 1 1 1 1 1 1) :type 'horizontal :to 2)) :join-points t) => ((9 8 7 6 7 15 8 7 6 7) (8 7 6 5 6 14 7 6 5 6) (6 5 4 3 4 12 5 4 3 4) (5 4 3 2 3 11 4 3 2 3) (4 3 2 2 2 10 3 2 2 2) (3 2 2 2 2 9 2 2 2 2) (2 2 2 2 2 8 2 2 2 2) (2 2 2 2 2 7 2 2 2 2) (2 2 2 2 2 6 2 2 2 2) (2 2 2 2 2 5 2 2 2 2)) ;; vertical means every value has its individual step (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 30 8 7 6 7) :steps '(1 2 1 1 1 5 1 1 1 1) :type 'vertical :to 2)) :join-points t) => ((9 8 7 6 7 30 8 7 6 7) (8 6 6 5 6 25 7 6 5 6) (7 4 5 4 5 20 6 5 4 5) (6 2 4 3 4 15 5 4 3 4) (5 2 3 2 3 10 4 3 2 3) (4 2 2 2 2 5 3 2 2 2) (3 2 2 2 2 2 2 2 2 2) (2 2 2 2 2 2 2 2 2 2) (2 2 2 2 2 2 2 2 2 2) (2 2 2 2 2 2 2 2 2 2)) (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 30 8 7 6 7) :steps '(1 2 1 3 1 5 3 1 2 1) :type 'vertical :to 1)) :join-points t)  
    could be extended: would be nice if the END-VALUE (:to)  would/could be also "in between" the start values... start '(6 7 5 1 2 3 9 19)  => :to 4  => values incf, and decf to 4
  17. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in replace-articulation-of-a-length   
    You can also use the Opusmodus function length-map for doing that.
     
    SB.
     
  18. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in Background colour   
    😉
     
    SB.
  19. Like
    Stephane Boussuge got a reaction from JulioHerrlein in Background colour   
    I don't know because i am on the beta of the future Opusmodus version and on this one, i can change the background color in real time, ie. move the color cursor and color changes immediately.
    May be try to use the Toggle dark option in preference to see if it works.
     
    SB.
  20. Like
    Stephane Boussuge reacted to AM in Help with seed and semi-colons   
    in my personal view:
     
    - for algorithmic composition ...you have first to be a composer/musician - because it's a lot more about music then about code (i learned a little bit to code, because i was interested in this "kind of thinking" about art and music
     
    - so, i think, if you want to work with algorithms you have to handle some code (like in music you have to handle some pitches/sound/rhythms)
     
    - when you have a look to the history of algorithmic composition you see some software like: common music, open music, pwgl, patchwork, also supercollider or MAX etc, it has always to do with computer/code/algorithm. also PWGL, commonmusic, openmusic... are working with LISP (or parts of it), so i think, that's the thing. mostly i like in OPUSMODUS the direct connection to the SCORE etc... i like it also because it's very OPEN for some own things/code/ideas (because it's close to the basic COMMON LISP)...
     
    - you could work with all the EXAMPLES in the library, take it, do some smooth changes and have a look what happens...
     
    greetings
    andré 
     
  21. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in Theme and development example   
    Here's a Theme and development example (also more generally, song construction example).
    It is the start of one of my composition but i give it here as a pedagogical example.
    Happy reading.
     
    ;;;--------------------------------------------------------- ;;; Parameters ;;;--------------------------------------------------------- ;;; BASIC MATERIAL ;;; PERIOD 1 (setf violin-1 '(#|1|# (s g5 mf leg a5 leg fs5 leg f5 q gs5) #|2|# (e gs5 stacc b5 stacc a5 stacc g5 stacc) #|3|# (h eb5 tr1) #|4|# (q f5 -) #|5|# (h gs5 tr1) #|6|# (s a5 leg b5 leg bb5 leg fs5 q a5) #|7|# (s c6 leg bb5 leg fs5 leg f5 q a5) #|8|# (s e5 leg cs5 leg bb4 leg gs4 q b4) )) (setf viola-1 '(#|1|# (q c5 mf -) #|2|# (q c5 -) #|3|# (q bb4 -) #|4|# (e fs4 stacc eb4 stacc e4 stacc cs4 stacc) #|5|# (s e4 leg d4 leg cs4 leg e4 q f4) #|6|# (q fs4 -) #|7|# (q f4 -) #|8|# (h e4 tr1) )) (setf cello-1 '(#|1|# (h g3 mf tr1) #|2|# (s g3 leg fs3 leg cs3 leg c3 q bb2) #|3|# (s a2 leg d3 leg db3 leg c3 leg q g2) #|4|# (h eb2 tr1) #|5|# (q f2 -) #|6|# (h f2 tr1) #|7|# (h bb2 tr1) #|8|# (q a2 -) )) ;;; PERIOD 2 (setf violin-2 '(#|1|# (e g4 stacc g4 stacc a4 stacc cs5 stacc) #|2|# (h c5 tr1) #|3|# (s b4 leg bb4 leg eb5 leg eb5 leg q fs5) #|4|# (h g5 tr1) #|5|# (h b5 tr1) #|6|# (h d6 tr1) #|7|# (q d6 -) #|8|# (h f6 tr1) )) (setf viola-2 '(#|1|# (q c3 -) #|2|# (q c3 -) #|3|# (q d3 -) #|4|# (e e3 stacc gs3 stacc a3 stacc gs3 stacc) #|5|# (h gs3 tr1) #|6|# (q g3 -) #|7|# (q g3 -) #|8|# (e b3 stacc d4 stacc e4 stacc e4 stacc) )) (setf cello-2 '(#|1|# (q g3 -) #|2|# (q g3 -) #|3|# (q eb3 -) #|4|# (e g3 stacc eb3 stacc g3 stacc gs3 stacc) #|5|# (h d3 tr1) #|6|# (q eb3 -) #|7|# (q g3 -) #|8|# (e c4 stacc fs3 stacc gs3 stacc d3 stacc) )) ;;; INTRO1 (setf violin-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation'- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 violin-1)))))) (setf viola-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 viola-1)))))) (setf cello-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 cello-1)))))) ;;; DEVELOPMENT 1 (setf violin-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) violin-1))) (setf viola-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) viola-1))) (setf cello-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) cello-1))) (setf violin-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) violin-1)))) (setf viola-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) viola-1)))) (setf cello-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) cello-1)))) (setf violin-d1c (pitch-variant (rnd-order violin-1 :list t))) (setf viola-d1c (pitch-variant (rnd-order viola-1 :list t))) (setf cello-d1c (pitch-variant (rnd-order cello-1 :list t))) (setf violin-d1 (assemble-seq violin-d1a violin-d1b violin-d1c)) (setf viola-d1 (assemble-seq viola-d1a viola-d1b viola-d1c)) (setf cello-d1 (assemble-seq cello-d1a cello-d1b cello-d1c)) ;;; SCORE ASSEMBLY (setf violin (assemble-seq violin-i1 violin-1 violin-2 violin-d1 )) (setf viola (assemble-seq viola-i1 viola-1 viola-2 viola-d1 )) (setf cello (assemble-seq cello-i1 cello-1 cello-2 cello-d1 )) ;;; TIME SIGNATURE (setf ts (get-time-signature violin)) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score string-trio (:title "Trio" :composer "S.Boussuge" :copyright "Copyright © 2018 s.boussuge" :key-signature 'chromatic :time-signature ts :tempo 100 :layout (string-trio-layout 'violin 'viola 'cello)) (violin :omn violin :channel 1 :sound 'gm :program 'violin :volume 100 :pan 34 :controllers (91 '(48)) ) (viola :omn viola :channel 2 :sound 'gm :program 'viola :volume 90 :pan 64 :controllers (91 '(60)) ) (cello :omn cello :channel 3 :sound 'gm :program 'cello :volume 90 :pan 94 :controllers (91 '(60)) ) ) S.B
  22. Like
    Stephane Boussuge reacted to loopyc in Theme and development example   
    Your "pedagogical examples" ALWAYS worked through and well-appreciated here Stephane, thank you ;-)
  23. Thanks
    Stephane Boussuge got a reaction from loopyc in Theme and development example   
    Here's a Theme and development example (also more generally, song construction example).
    It is the start of one of my composition but i give it here as a pedagogical example.
    Happy reading.
     
    ;;;--------------------------------------------------------- ;;; Parameters ;;;--------------------------------------------------------- ;;; BASIC MATERIAL ;;; PERIOD 1 (setf violin-1 '(#|1|# (s g5 mf leg a5 leg fs5 leg f5 q gs5) #|2|# (e gs5 stacc b5 stacc a5 stacc g5 stacc) #|3|# (h eb5 tr1) #|4|# (q f5 -) #|5|# (h gs5 tr1) #|6|# (s a5 leg b5 leg bb5 leg fs5 q a5) #|7|# (s c6 leg bb5 leg fs5 leg f5 q a5) #|8|# (s e5 leg cs5 leg bb4 leg gs4 q b4) )) (setf viola-1 '(#|1|# (q c5 mf -) #|2|# (q c5 -) #|3|# (q bb4 -) #|4|# (e fs4 stacc eb4 stacc e4 stacc cs4 stacc) #|5|# (s e4 leg d4 leg cs4 leg e4 q f4) #|6|# (q fs4 -) #|7|# (q f4 -) #|8|# (h e4 tr1) )) (setf cello-1 '(#|1|# (h g3 mf tr1) #|2|# (s g3 leg fs3 leg cs3 leg c3 q bb2) #|3|# (s a2 leg d3 leg db3 leg c3 leg q g2) #|4|# (h eb2 tr1) #|5|# (q f2 -) #|6|# (h f2 tr1) #|7|# (h bb2 tr1) #|8|# (q a2 -) )) ;;; PERIOD 2 (setf violin-2 '(#|1|# (e g4 stacc g4 stacc a4 stacc cs5 stacc) #|2|# (h c5 tr1) #|3|# (s b4 leg bb4 leg eb5 leg eb5 leg q fs5) #|4|# (h g5 tr1) #|5|# (h b5 tr1) #|6|# (h d6 tr1) #|7|# (q d6 -) #|8|# (h f6 tr1) )) (setf viola-2 '(#|1|# (q c3 -) #|2|# (q c3 -) #|3|# (q d3 -) #|4|# (e e3 stacc gs3 stacc a3 stacc gs3 stacc) #|5|# (h gs3 tr1) #|6|# (q g3 -) #|7|# (q g3 -) #|8|# (e b3 stacc d4 stacc e4 stacc e4 stacc) )) (setf cello-2 '(#|1|# (q g3 -) #|2|# (q g3 -) #|3|# (q eb3 -) #|4|# (e g3 stacc eb3 stacc g3 stacc gs3 stacc) #|5|# (h d3 tr1) #|6|# (q eb3 -) #|7|# (q g3 -) #|8|# (e c4 stacc fs3 stacc gs3 stacc d3 stacc) )) ;;; INTRO1 (setf violin-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation'- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 violin-1)))))) (setf viola-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 viola-1)))))) (setf cello-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 cello-1)))))) ;;; DEVELOPMENT 1 (setf violin-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) violin-1))) (setf viola-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) viola-1))) (setf cello-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) cello-1))) (setf violin-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) violin-1)))) (setf viola-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) viola-1)))) (setf cello-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) cello-1)))) (setf violin-d1c (pitch-variant (rnd-order violin-1 :list t))) (setf viola-d1c (pitch-variant (rnd-order viola-1 :list t))) (setf cello-d1c (pitch-variant (rnd-order cello-1 :list t))) (setf violin-d1 (assemble-seq violin-d1a violin-d1b violin-d1c)) (setf viola-d1 (assemble-seq viola-d1a viola-d1b viola-d1c)) (setf cello-d1 (assemble-seq cello-d1a cello-d1b cello-d1c)) ;;; SCORE ASSEMBLY (setf violin (assemble-seq violin-i1 violin-1 violin-2 violin-d1 )) (setf viola (assemble-seq viola-i1 viola-1 viola-2 viola-d1 )) (setf cello (assemble-seq cello-i1 cello-1 cello-2 cello-d1 )) ;;; TIME SIGNATURE (setf ts (get-time-signature violin)) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score string-trio (:title "Trio" :composer "S.Boussuge" :copyright "Copyright © 2018 s.boussuge" :key-signature 'chromatic :time-signature ts :tempo 100 :layout (string-trio-layout 'violin 'viola 'cello)) (violin :omn violin :channel 1 :sound 'gm :program 'violin :volume 100 :pan 34 :controllers (91 '(48)) ) (viola :omn viola :channel 2 :sound 'gm :program 'viola :volume 90 :pan 64 :controllers (91 '(60)) ) (cello :omn cello :channel 3 :sound 'gm :program 'cello :volume 90 :pan 94 :controllers (91 '(60)) ) ) S.B
  24. Thanks
    Stephane Boussuge got a reaction from lviklund in Theme and development example   
    Here's a Theme and development example (also more generally, song construction example).
    It is the start of one of my composition but i give it here as a pedagogical example.
    Happy reading.
     
    ;;;--------------------------------------------------------- ;;; Parameters ;;;--------------------------------------------------------- ;;; BASIC MATERIAL ;;; PERIOD 1 (setf violin-1 '(#|1|# (s g5 mf leg a5 leg fs5 leg f5 q gs5) #|2|# (e gs5 stacc b5 stacc a5 stacc g5 stacc) #|3|# (h eb5 tr1) #|4|# (q f5 -) #|5|# (h gs5 tr1) #|6|# (s a5 leg b5 leg bb5 leg fs5 q a5) #|7|# (s c6 leg bb5 leg fs5 leg f5 q a5) #|8|# (s e5 leg cs5 leg bb4 leg gs4 q b4) )) (setf viola-1 '(#|1|# (q c5 mf -) #|2|# (q c5 -) #|3|# (q bb4 -) #|4|# (e fs4 stacc eb4 stacc e4 stacc cs4 stacc) #|5|# (s e4 leg d4 leg cs4 leg e4 q f4) #|6|# (q fs4 -) #|7|# (q f4 -) #|8|# (h e4 tr1) )) (setf cello-1 '(#|1|# (h g3 mf tr1) #|2|# (s g3 leg fs3 leg cs3 leg c3 q bb2) #|3|# (s a2 leg d3 leg db3 leg c3 leg q g2) #|4|# (h eb2 tr1) #|5|# (q f2 -) #|6|# (h f2 tr1) #|7|# (h bb2 tr1) #|8|# (q a2 -) )) ;;; PERIOD 2 (setf violin-2 '(#|1|# (e g4 stacc g4 stacc a4 stacc cs5 stacc) #|2|# (h c5 tr1) #|3|# (s b4 leg bb4 leg eb5 leg eb5 leg q fs5) #|4|# (h g5 tr1) #|5|# (h b5 tr1) #|6|# (h d6 tr1) #|7|# (q d6 -) #|8|# (h f6 tr1) )) (setf viola-2 '(#|1|# (q c3 -) #|2|# (q c3 -) #|3|# (q d3 -) #|4|# (e e3 stacc gs3 stacc a3 stacc gs3 stacc) #|5|# (h gs3 tr1) #|6|# (q g3 -) #|7|# (q g3 -) #|8|# (e b3 stacc d4 stacc e4 stacc e4 stacc) )) (setf cello-2 '(#|1|# (q g3 -) #|2|# (q g3 -) #|3|# (q eb3 -) #|4|# (e g3 stacc eb3 stacc g3 stacc gs3 stacc) #|5|# (h d3 tr1) #|6|# (q eb3 -) #|7|# (q g3 -) #|8|# (e c4 stacc fs3 stacc gs3 stacc d3 stacc) )) ;;; INTRO1 (setf violin-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation'- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 violin-1)))))) (setf viola-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 viola-1)))))) (setf cello-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 cello-1)))))) ;;; DEVELOPMENT 1 (setf violin-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) violin-1))) (setf viola-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) viola-1))) (setf cello-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) cello-1))) (setf violin-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) violin-1)))) (setf viola-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) viola-1)))) (setf cello-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) cello-1)))) (setf violin-d1c (pitch-variant (rnd-order violin-1 :list t))) (setf viola-d1c (pitch-variant (rnd-order viola-1 :list t))) (setf cello-d1c (pitch-variant (rnd-order cello-1 :list t))) (setf violin-d1 (assemble-seq violin-d1a violin-d1b violin-d1c)) (setf viola-d1 (assemble-seq viola-d1a viola-d1b viola-d1c)) (setf cello-d1 (assemble-seq cello-d1a cello-d1b cello-d1c)) ;;; SCORE ASSEMBLY (setf violin (assemble-seq violin-i1 violin-1 violin-2 violin-d1 )) (setf viola (assemble-seq viola-i1 viola-1 viola-2 viola-d1 )) (setf cello (assemble-seq cello-i1 cello-1 cello-2 cello-d1 )) ;;; TIME SIGNATURE (setf ts (get-time-signature violin)) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score string-trio (:title "Trio" :composer "S.Boussuge" :copyright "Copyright © 2018 s.boussuge" :key-signature 'chromatic :time-signature ts :tempo 100 :layout (string-trio-layout 'violin 'viola 'cello)) (violin :omn violin :channel 1 :sound 'gm :program 'violin :volume 100 :pan 34 :controllers (91 '(48)) ) (viola :omn viola :channel 2 :sound 'gm :program 'viola :volume 90 :pan 64 :controllers (91 '(60)) ) (cello :omn cello :channel 3 :sound 'gm :program 'cello :volume 90 :pan 94 :controllers (91 '(60)) ) ) S.B
  25. Like
    Stephane Boussuge got a reaction from opmo in Theme and development example   
    Here's a Theme and development example (also more generally, song construction example).
    It is the start of one of my composition but i give it here as a pedagogical example.
    Happy reading.
     
    ;;;--------------------------------------------------------- ;;; Parameters ;;;--------------------------------------------------------- ;;; BASIC MATERIAL ;;; PERIOD 1 (setf violin-1 '(#|1|# (s g5 mf leg a5 leg fs5 leg f5 q gs5) #|2|# (e gs5 stacc b5 stacc a5 stacc g5 stacc) #|3|# (h eb5 tr1) #|4|# (q f5 -) #|5|# (h gs5 tr1) #|6|# (s a5 leg b5 leg bb5 leg fs5 q a5) #|7|# (s c6 leg bb5 leg fs5 leg f5 q a5) #|8|# (s e5 leg cs5 leg bb4 leg gs4 q b4) )) (setf viola-1 '(#|1|# (q c5 mf -) #|2|# (q c5 -) #|3|# (q bb4 -) #|4|# (e fs4 stacc eb4 stacc e4 stacc cs4 stacc) #|5|# (s e4 leg d4 leg cs4 leg e4 q f4) #|6|# (q fs4 -) #|7|# (q f4 -) #|8|# (h e4 tr1) )) (setf cello-1 '(#|1|# (h g3 mf tr1) #|2|# (s g3 leg fs3 leg cs3 leg c3 q bb2) #|3|# (s a2 leg d3 leg db3 leg c3 leg q g2) #|4|# (h eb2 tr1) #|5|# (q f2 -) #|6|# (h f2 tr1) #|7|# (h bb2 tr1) #|8|# (q a2 -) )) ;;; PERIOD 2 (setf violin-2 '(#|1|# (e g4 stacc g4 stacc a4 stacc cs5 stacc) #|2|# (h c5 tr1) #|3|# (s b4 leg bb4 leg eb5 leg eb5 leg q fs5) #|4|# (h g5 tr1) #|5|# (h b5 tr1) #|6|# (h d6 tr1) #|7|# (q d6 -) #|8|# (h f6 tr1) )) (setf viola-2 '(#|1|# (q c3 -) #|2|# (q c3 -) #|3|# (q d3 -) #|4|# (e e3 stacc gs3 stacc a3 stacc gs3 stacc) #|5|# (h gs3 tr1) #|6|# (q g3 -) #|7|# (q g3 -) #|8|# (e b3 stacc d4 stacc e4 stacc e4 stacc) )) (setf cello-2 '(#|1|# (q g3 -) #|2|# (q g3 -) #|3|# (q eb3 -) #|4|# (e g3 stacc eb3 stacc g3 stacc gs3 stacc) #|5|# (h d3 tr1) #|6|# (q eb3 -) #|7|# (q g3 -) #|8|# (e c4 stacc fs3 stacc gs3 stacc d3 stacc) )) ;;; INTRO1 (setf violin-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation'- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 violin-1)))))) (setf viola-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 viola-1)))))) (setf cello-i1 (omn-replace :velocity '((pp)) (omn-replace :articulation '- (gen-trim 4 (length-adjust 4/4 (length-augmentation 4 cello-1)))))) ;;; DEVELOPMENT 1 (setf violin-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) violin-1))) (setf viola-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) viola-1))) (setf cello-d1a (pitch-transpose-repeat '(2 4) (find-bar '(1 2) cello-1))) (setf violin-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) violin-1)))) (setf viola-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) viola-1)))) (setf cello-d1b (pitch-transpose-repeat '(1 -2) (pitch-invert (find-bar '(1 2) cello-1)))) (setf violin-d1c (pitch-variant (rnd-order violin-1 :list t))) (setf viola-d1c (pitch-variant (rnd-order viola-1 :list t))) (setf cello-d1c (pitch-variant (rnd-order cello-1 :list t))) (setf violin-d1 (assemble-seq violin-d1a violin-d1b violin-d1c)) (setf viola-d1 (assemble-seq viola-d1a viola-d1b viola-d1c)) (setf cello-d1 (assemble-seq cello-d1a cello-d1b cello-d1c)) ;;; SCORE ASSEMBLY (setf violin (assemble-seq violin-i1 violin-1 violin-2 violin-d1 )) (setf viola (assemble-seq viola-i1 viola-1 viola-2 viola-d1 )) (setf cello (assemble-seq cello-i1 cello-1 cello-2 cello-d1 )) ;;; TIME SIGNATURE (setf ts (get-time-signature violin)) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score string-trio (:title "Trio" :composer "S.Boussuge" :copyright "Copyright © 2018 s.boussuge" :key-signature 'chromatic :time-signature ts :tempo 100 :layout (string-trio-layout 'violin 'viola 'cello)) (violin :omn violin :channel 1 :sound 'gm :program 'violin :volume 100 :pan 34 :controllers (91 '(48)) ) (viola :omn viola :channel 2 :sound 'gm :program 'viola :volume 90 :pan 64 :controllers (91 '(60)) ) (cello :omn cello :channel 3 :sound 'gm :program 'cello :volume 90 :pan 94 :controllers (91 '(60)) ) ) S.B
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy