simpler arpeggios, and with steps now

This commit is contained in:
efim 2022-09-21 20:09:22 +00:00
parent e6270ea435
commit adb02840ba
1 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,112 @@
(in-package #:cl-patterns)
;; i want to get arpeggios of configurable speed
;; and configured by chord
;; and configured by places of notes in a chord
;; let's again first do consecutive notes from a chord
;; idea is to have
;; a) endless loop of notes from a chord
;; b) have pdurstutter - for the duration of desired arpeggio, with maybe figuring out to make each part of stutter into a separate item in arpeggio
(all-chords)
(chord-notes (chord "Minor 7th"))
(pdef :at-first-chords
(pbind :note (pseq (chord-notes (chord "Minor 7th")))))
;; (play :at-first-chords)
;; (stop :at-first-chords)
(pdef :initial-stutter
(pdurstutter (pbind
:dur (pseq (list 4) 1)) 16))
;; (play :initial-stutter)
;; (end :initial-stutter)
;; (stop :initial-stutter)
(pb :initial-combination
;; :embed :initial-stutter
;; :arpeggio-chord :minor-6th
:dur (pdurstutter (pseq (list 4) 1) 16)
:note (pseq (pnary #'chord-notes (pk :arpeggio-chord)))
)
;; (next-upto-n (pdef :initial-combination) 32)
;; (play :initial-combination)
;; (end :initial-combination)
;; (stop :initial-combination)
(chord-notes :minor-6th)
;; now do arpegio pattern to play arpegio per each chord?
(pb :with-changing-chords
(parp
(pbind :arpeggio-chord (pseq (list :minor-6th :minor :minor-7th :minor)))
(pdef :initial-combination)))
;; (next-upto-n (pdef :with-changing-chords) 40)
;; (play :with-changing-chords)
;; (stop :with-changing-chords)
;; that's kind of ok if chords have same amount of notes in it?
(mapcar #'chord-notes (list :minor-6th :minor :minor-7th :minor))
(chord :major)
;; would it be better if it's all in single def?
(pb :with-changing-chords-2
(parp
(pbind :arpeggio-chord (pseq (list :major :minor :major :minor) 1)
:chord-root (pseq (list 0 3 2 6) 1))
(pbind
:dur (pdurstutter (pseq (list 4) 1) 24)
:note (pseq (p+ (pk :chord-root) (pnary #'chord-notes (pk :arpeggio-chord)))))))
;; (play :with-changing-chords-2)
;; (end :with-changing-chords-2)
;; now I could use stats of the :arpeggio-chord in the :dur part
;; i guess i'd like to what?
;; to be adding root of the chord
;; and then pattern to be played over the chord
;; let's first make simple endless pattern that takes list of steps, and takes them out of chord-notes
(pb :initial-patterned
:pattern (list 0 1 2 0 3)
:note (pnary (lambda (a) (nth a (chord-notes :major-7th))) (pseq (pk :pattern))))
(next-upto-n (pdef :initial-patterned) 20)
(play :initial-patterned)
(stop :initial-patterned)
;; and now i want what? i want to do pnary? pfunc
(pb :with-patterned-changing-chords
(parp
;;; first part of parp is "base values" for each event whole second pattern will be played
;;; so this pattern produces "settings for each phrase"
(pbind :arpeggio-chord (pseq (list :minor-6th :minor :minor-7th :minor))
:chord-root (pseq (list 0 3 2 6) 1)
:pattern (list 0 1 2 1 2 1 2 0))
;;; this patten would play our fully with settings values
(pbind
:note (pnary (lambda (chord-step chord chord-root)
(+ chord-root (nth chord-step (chord-notes chord))))
(pseq (pk :pattern))
(pk :arpeggio-chord)
(pk :chord-root))
:dur (pdurstutter (pseq (list 8) 1) 32))))
;; (next-upto-n (pdef :with-patterned-changing-chords) 30)
;; (play :with-patterned-changing-chords)
;; (stop :with-patterned-changing-chords)
;; next I'd probably want to what? somehow align chords that have 3 \ 4 \ 5 notes in them
;; not sure what could be done though logically
;; we could have different patterns, based on chord size, yup
(pb :instrumented-play
:instrument :fmbass
:legato 0.5
:octave 2
:embed :with-patterned-changing-chords)
(play :instrumented-play)
(end :instrumented-play)
;; i guess next is making this pattern a function that takes patterns to provice chords, roots and pattrn
;; then could use embed and set attributes in place
;; this is actually fun