Jump to content
Sign in to follow this  
JulioHerrlein

Giant Steps Improvisation generator

Recommended Posts

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)
)

 

Share this post


Link to post
Share on other sites

Just tried your code, it does not compile, I had to change some 'chord-closest-path' into 'closest-path' and add some setf's, then it worked. Maybe you want to correct it..?

 

best

 

ole

 

 

Share this post


Link to post
Share on other sites

Thank you, Ole !

Yes, the function changed.

Here is some discussion about it.

Best,

Julio

 

 

Share this post


Link to post
Share on other sites
On 2/2/2020 at 5:52 AM, o_e said:

Just tried your code, it does not compile, I had to change some 'chord-closest-path' into 'closest-path' and add some setf's, then it worked. Maybe you want to correct it..?

 

best

 

ole

 

 

I'm a beginner and I can't seem to figure out the changes that you made to compile this code.  Could you post your version?

Share this post


Link to post
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.

Sign in to follow this  

  • Similar Topics

    • By JulioHerrlein
      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&qid=1539901867&sr=8-1&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) )  
    • By Stephane Boussuge
      Hi, 
      here are the two functions i use daily in my workflow.
       
      The first gen-pitch-line can be used as this but is also required for the second function svoice1.
       
      svoice1 is a generic omn generator i find useful for my work.
       
      ;;; ------------------------------------------------------------------------------ ;;; GEN-PITCH-LINE ;;; Fonction de génération de hauteurs basées sur une conversion de vecteur de bruit ;;; avec un grand choix de type de bruit, taux de compression du vecteur, filtrage des répétitions et ambitus. (defun gen-pitch-line (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat (type :white)) (setf seed (rnd-seed seed)) (let (pitches) (do-verbose ("gen-pitch-line :seed ~s" seed) (labels ((white-or-pink (nb-pitch seed type) (if (eq type ':pink) (gen-pink-noise nb-pitch :seed seed) (gen-white-noise nb-pitch :seed seed :type (if (eq type ':white) :normal type)))) (process (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat type) (setf pitches (vector-to-pitch ambitus (vector-smooth compress (white-or-pink nb-pitch seed type)))) (when filter-repeat (setf pitches (gen-trim nb-pitch (filter-repeat filter-repeat pitches)))) pitches) ) (process nb-pitch :compress compress :ambitus ambitus :filter-repeat filter-repeat :seed (seed) :type type))))) #| USAGE (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1) (gen-pitch-line 24 :compress 0.42 :type :pink :filter-repeat 1) (gen-pitch-line 24 :compress 0.42 :type :extreme :filter-repeat 1) (gen-eval 8 '(make-omn :pitch (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1) :length (euclidean-rhythm 16 1 16 's :type 2) ) :seed 33) |# ;;; ------------------------------------------------------------------------------ ;;; SVOICE1 ;;; VERSION 0.1 (defun svoice1 (nb-pitch &key (level 16) (low 1) (high 16) (ratio 1/16) (e-type 2)(e-rotate nil)(e-variant nil) (compress 1)(filter-repeat nil)(pline-type :white) (p-divide nil)(articulation nil) (length nil)(pitch nil)(velocity nil) (seed nil)(articulation-map nil) (add-interval-if-length nil) (i-length '1/16) (i-list '(-4 -5 -3 -7)) ) (setf seed (rnd-seed seed)) (do-verbose ("svoice1 :seed ~s" seed) (let* (( pitch (if pitch pitch (if p-divide (gen-divide p-divide (gen-pitch-line nb-pitch :compress compress :seed (seed) :filter-repeat filter-repeat :type pline-type)) (gen-pitch-line nb-pitch :compress compress :seed (seed) :filter-repeat filter-repeat :type pline-type)))) (len (if length length (euclidean-rhythm level low high ratio :type e-type :rotate e-rotate :variant e-variant :seed (seed)))) (art (if articulation articulation (if articulation-map (length-map articulation-map len :otherwise '(default)) ))) (velo (if velocity velocity '(mf))) ) (if add-interval-if-length (add-interval-if-length (make-omn :pitch pitch :length len :velocity velo :articulation art ) :length-val i-length :interval-list i-list ) (make-omn :pitch pitch :length len :velocity velo :articulation art ))))) #| USAGE (svoice1 32) (svoice1 32 :seed 1234) (svoice1 32 :pitch '(c4 d4 e4) :articulation '(marc)) (svoice1 32 :length '((h h)(q q e e e e))) (svoice1 32 :pitch '(c4 g4) :length '((h h)(q q e e e e)) :velocity '((f)(pp))) (svoice1 32 :i-list '(-7 -4 -5 -3) :low 1 :high 4) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :compress 0.16) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 8 :high 8 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 8 :high 8 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)) :add-interval-if-length t) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 2 :high 16 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) (tonality-map '(((0 2 4 6 8 10) :root d4)) (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :low 2 :high 16 :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg))) ) |# S.
    • By AM
      is there another way to code such a function/idea?
      this is (at the moment) a "theoretically function"... no concret use - l'art pour l'art :-)
      thanx for smarter LISP-code-IDEAS!
      andré
       
      ;;; evaluate PROGN (as a reset) (progn (defstruct counter n) (defvar cnt) (setf cnt (make-counter :n -1)) (defun read-list-in-steps (alist) (nth (setf (counter-n cnt) (1+ (counter-n cnt))) alist))) ;;; evaluate a view times, so one value after the other will be in the output ;;; you have to evaluate the progn-seq before every new start!!! (read-list-in-steps '(1 2 3 4 5 6)) (read-list-in-steps '(c4 f4 e4 f4 g5))  
×
×
  • Create New...