Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Pattern for Piano

Featured Replies

Sounds Great, Stephane! Somewhat jazzy and groovy in my perception. 

Any hint of the code/method used? 

Best! 

 

The chords are also derived from the slonimsky patterns?  Do you remember  wich slonimsky pattern you used?  Im teaching slonimsky patterns to my students and using opusmodus in the class. This is Great! Best Julio 

  • Author

No, chords are rotational intervals addition, dependant to the type of lentgh.

I've used for that my function: add-interval-if-length revised by Torsten.

Here it is:

 

;;; ==============================================
;;; UTILITY FUNCTIONS
;;;
(defun add-interval-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '(4 3 4 7 4 3 5 4 7 3)))
  (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 (chord-interval-add (list i) (list (second e))) e)
      else append e)))

;(add-interval-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '(10 11))

;;; =============================
;;; MAIN FUNCTION
(defun add-interval-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '(4 3 4 7 4 3 5 4 7 3)))
  (do-verbose ("add-interval-if-length")
    (let ((test-fn (case test
                     (> #'>)
                     (< #'<)
                     (= #'=)
                     (otherwise test))))
      (if (listp (car omn))
        (mapcar #'(lambda (x) 
                    (add-interval-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list)) 
                omn)
        (add-interval-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list)))))
  

;(add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 f4)) :interval-list '(10 11))
;(add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 h f4)) :interval-list '(3 4) :test #'>= :length-val 'q)

All the best

 

S.

 

  • 1 month later...

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

  • 3 weeks later...

a release date für 1.3 ?

greetings

2 hours ago, Stephane Boussuge said:

Now, finally it's done by myself.

 

.

SB

 

Thanks, Stephane !!

Best !

Julio

Create an account or sign in to comment

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.