Jump to content

Make arpeggio


Recommended Posts

Dear Opusmodus masters!

 

I Have a chord:

image.thumb.png.158dc0c4a4fc4f735164de7ae60ff7ee.png

 

And I was wondering if i could arpeggiate this chord depending on subdivisions?

For example (e s 3q):

image.thumb.png.d0d9720ed6a3c1ee416e50c4ccfd4c21.png

Or  for example (e s 3q 5q):

image.thumb.png.5a21e05b108d7aeca125a1e3d6238626.png

 

I don't know if Opusmodus is build for this kind of stuff, but i always have to calculate if 2nd note of quintuplet comes before or earlier of 2nd note of triplet.

 

 

For any response I'd be very thankful!

 

Best wishes,

 

Vili 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

here is a possible solution...

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; THE FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun gen-arpeggio (event &key (rhy'(1/28)) (legato nil))
  (let* ((pitches (melodize (omn :pitch event)))
         (length (car (omn :length event)))
         (velo (car (omn :velocity event)))
         (art (car (omn :articulation event)))
         (rhy (gen-repeat 10 rhy))

         (arpeggio-voices (loop repeat (length pitches)
                            for i from 0 to (1- (length pitches))
                            for j in pitches
                            for rhy in rhy
                            collect (if (= i 0)
                                      (length-rational-quantize (list rhy j velo art) :round length)
                                      (length-rational-quantize (append (gen-length (list i) (* -1 rhy)) (list rhy) (list j) 
                                                                        (list velo) (list art))
                                                                :round length)))))
    (assign-variable 'voice 
                     (if (null legato)
                       arpeggio-voices
                       (loop for x in arpeggio-voices
                         collect (length-legato x))))))
    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; IT WORKS LIKE THAT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; type in ONE single-event (l p v a) with CHORD... for example:
(setf event '(q c4e4g4b4 mf ten))

;;; evaluate the function (with a arpeggio-length, for example :ryh 1/28)
(gen-arpeggio event :rhy 1/28)
; now the the result are "bounded" on 4 voices/variables = the number of the chord-pitches
; => (voice1 voice2 voice3 voice4)

;;; list every variable, so you will have the four "arpeggio-rhythm/times", so you can use that for 4 parts on your score 
(list voice1)
(list voice2)
(list voice3)
(list voice4)

;;; VARIANTS AND OPTIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; if you choose ":legato t" => all the voices are like with PEDAL played
(gen-arpeggio event :rhy 1/28 :legato t)


;;; if you want to put/merge all that into ONE VOICE just:
(merge-voices voice1 voice2 voice3 voice4) 
=> (7q c4 ten e4 ten g4 ten b4 ten -7h.)


;;; if you want to have different rhy's just do it like that
(gen-arpeggio event :rhy '(1/28 1/20 1/12 1/8))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

 

Edited by AM
Link to comment
Share on other sites

I am really sorry to bother you again, I am just wondering If is in any way possible that I would get more this effect:

 

image.png.ac6d0e4d1805514e793d8d62244eb497.png

From (gen-arpeggio event :rhy '(1/8 1/12))  I am receiving:

 

image.png.57cf44f7ffef00d396120d6739895a56.png

 

I hope I don't take you too much time, you helped me already a lot!

 

 

 

Link to comment
Share on other sites

here's a correction (bug) and a variant:

okay... you want to "sum" the rests in a sequence 0, 2 ,3, 4 ...  by -1/24 rhy. (a special version)

so i have to code this case as option. take the new version and use :offset 1

 

(defun gen-arpeggio* (event &key (rhy'(1/28)) (legato nil) (offset nil))
  (let* ((pitches (melodize (omn :pitch event)))
         (length (car (omn :length event)))
         (velo (car (omn :velocity event)))
         (art (car (omn :articulation event)))
         (rhy (gen-repeat 10 rhy))

         (arpeggio-voices (loop repeat (length pitches)
                            for i from 0 to (1- (length pitches))
                            for j in pitches
                            for rhy in rhy
                            collect (if (= i 0)
                                      (length-adjust length (list rhy j velo art))
										 (length-adjust length (append (gen-length (if (null offset)
                                                                                    (list i)
                                                                                    (list (+ i offset)))
                                                                                    (* -1 rhy)) (list rhy) (list j) 
                                                                      (list velo) (list art)))))))
    (assign-variable 'voice 
                     (if (null legato)
                       arpeggio-voices
                       (loop for x in arpeggio-voices
                         collect (length-legato x))))))
    

(setf event '(q c4e4g4b4 mf ten))

;;; now it works correct
(gen-arpeggio* event :rhy '(1/8 1/12 1/16 1/20))

(list voice1)
(list voice2)
(list voice3)
(list voice4)


;;; what makes intuitiv sense (old version/result)
(gen-arpeggio* event :rhy '(1/24) :offset nil)
;; with OFFSET nil: the rests at the beginning are: 
;; * 0 rhy
;; * 1 rhy
;; * 2 rhy
;; * 3 rhy

(list voice1)
(list voice2)
(list voice3)
(list voice4)


;;; what are you looking for...
(gen-arpeggio* event :rhy '(1/24) :offset 1)
;; with OFFSET 1: the rests at the beginning are: 
;; * 0 rhy
;; * 2 rhy
;; * 3 rhy
;; * 4 rhy

(list voice1)
(list voice2)
(list voice3)
(list voice4)

 

 

Link to comment
Share on other sites

That's now really working good!! Many thanks..  I just now I have problems with different rhys. 😞

 

I can't get more than 2 voices from that:

(gen-arpeggio* event :rhy '(1/8) :offset nil)  

 

Sorry again.

 

Link to comment
Share on other sites

in general: you have to define exactly what you want (in a limited number of cases), if you change your idea along the way, you have to adapt the CODE again...

look at the CODE, and the EVENT etc...

 

 

;; you have to define al longer length-value in EVENT: (* 4 1/8) = 1/2 => in EVENT '(h c4e4g4b4 mf ten)

(setf event '(h c4e4g4b4 mf ten))
(gen-arpeggio* event :rhy '(1/8) :offset nil)  

 

Link to comment
Share on other sites

Oh yes thats fine now and works really great! But whether I have different rhythms I don't quite get the same effect.

 

I'd like to get somehow polyrhytmical effect. So Id just enter (1/8 1/12) and get sth like this:

 image.png.36534cce8b6716011dbd8fbb1a7698ac.png

 

But notes apreggiates:

image.png.07fc36b3fb752da63228d10df02de534.png

 

 

Or from '(1/16 1/16 1/12 1/16 1/12 1/16:

image.png.a7db4a78c7e2be7c755d921495ea4cd4.png

Arpeggio:

image.thumb.png.8c1a667af0ee9c2e1d1dbde46036a9a2.png

 

 

Best,

 

Vili

 

 

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

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy