Jump to content

Recommended Posts

Hello All

 

Can anyone help me develop a function which superimposes a rhythm onto a constant list of pitches?

 

For example, how would I go about superimposing a rhythm like (1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16 3/8)

 

on to list of pitches like (infinity-series 100 '(g4 gs4))

=> (g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4)

 

So that the melody would be:

=> (g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4

      1/2                                        1/16 7/16                              1/8       3/8                             3/16          5/16                      1/4                  1/4                5/16                      3/16           

=> (1/2 g4 1/16 fs4 7/16 a4 1/8 gs4 3/8 f4 3/16 f4 5/16 g4 1/4 fs4 1/4 a4 5/16 g4 3/16 g4)                 

 

I want to set each pitch to a constant value, for e.g 1/16 then superimpose the rhythm so that rather than span the rhythm to the pitches, the rhythm swallows the pitches leaving a resultant melody. I hope this makes sense.

 

Any help gratefully received.

 

Best wishes

 

Brian

 

 

Link to post
Share on other sites

like that?

 

(setf lengths  '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16  3/16))
(setf pitches '(g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4
                gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5
                fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4
                a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4
                g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4
                gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4
                bb4 gs4 g4))

;;; get the pitches
(loop for i in (append (list 0)
                       (cumulative-sums (loop for k in lengths collect (/ k 1/16))))
  collect (nth i pitches))

;;; a function which generates OMN-format
(defun superimpose (lengths pitches)
  (make-omn :length lengths
            :pitch (loop for i in (append (list 0)
                                          (cumulative-sums (loop for k in lengths
                                                             collect (/ k 1/16))))
                     collect (nth i pitches))))

;;; evaluate -> OMN output
(superimpose '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16)
             '(g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4
               b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4
               eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4
               g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4
               b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4
               g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4
               g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4))

 

Link to post
Share on other sites

Hello, All

 

I'm trying to work out André's solution examples to make partitions out of tone rows or infinity series

 

(setf lengths  '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16  3/16))
(setf pitches '(g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4))

;;; get the pitches
 
(setf pitsublist (loop for i in (append (list 0) (cumulative-sums (loop for k in lengths collect (/ k 1/16)))) collect (nth i pitches))

 

; All ok but what I need next is to take the nth order sublist generated in André's solution to chordize it in partitions ala Babbitt.

 

chordize (gen-divide '(2 1 3) '(pitsublist) chordize-list (gen-divide '(2 1 3) '(pitsublist))))

 

Any hint ?

Thanks a lot !

Link to post
Share on other sites

Dear Janusz,

 

This is the closest I get. I suppose it isn't related to Time-point.

I'll try to explain.

1) There is a general list of pitches from a certain source (a row, for example)

2) From this list, we use the rhythm list as a skip list of pitches, picking the notes from a sequence.

3) The sequence of note picks is related to the lenght of note divided by the small quantized value, for example, the 16th note.

4) So, the lenght sequence

(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16  3/16))

Will result in a pick skip note sequence like (8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3)

5) The pick-skip note acts like

 

8 - means pick the first and skip 7 from the first list of pitches

1 - means pick the first and skip 0 from the first list of pitches

7 - means pick the first and skip 6 from the first list of pitches

and so on...

 

This will result in a sublist of first list of pitches, based on the skipped notes, taken every nth notes.

according to the sequence.

 

5) The missed step is that I want to chordize this sublist to an desired HARMONIC partition, like

 for example 2 trichords, 1 dyad, 3 single notes and a tetrachord, using something like this:

 

(chordize (gen-divide '(3 3 2 1 1 1 4) 'pitches sublist))

 

Here is the closer I get.

 

Best,

Julio

 

(setf lengths  '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16  3/16))
(setf pitches '(g5 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4))


(def-score time
           (
            :key-signature 'chromatic
            :time-signature time-sig
            :tempo 112
            :layout (clarinet-layout 'clarinet)
            )

(clarinet
 :length lengths
 :pitch (loop for i in (append (list 0) (cumulative-sums (loop for k in lengths
                                                                        collect (/ k 1/16))))
                       collect (nth i pitches))
 :channel 1
 :sound 'gm
 :program 'piano
 ))

Link to post
Share on other sites

something like this? don't know if it's like this...

you want to project a chord on these "filtered pitches"?

 

(setf lengths  '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16))

(setf pitches '(g5 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4
                gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4
                c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4
                bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4
                cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4
                eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4
                e4 b4 f4 bb4 gs4 g4))

(setf chord-intervals '(3 1 2 2))

(make-omn :length lengths
          :pitch (loop for i in (append (list 0)
                                        (cumulative-sums
                                         (loop for k in lengths
                                           collect (/ k 1/16))))
                   append (chordize
                           (interval-to-pitch chord-intervals :start (nth i pitches)))))

 

Link to post
Share on other sites

I think you are looking for something like that:

(setf length '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16 3/8))

(setf infinity (infinity-series 100 '(g4 gs4)))
=> (g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4
    f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4
    gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4
    fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4
    gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4
    g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4)

(time-swallow 1/16 1 length pitch)
=> (g4 fs4 a4 gs4 f4 f4 g4 fs4 a4 g4 g4 a4)

(make-omn
 :length length
 :pitch (time-swallow 1/16 1 length pitch))
=> (h g4 s fs4 q.. a4 e gs4 q. f4 e. qs g4 q fs4 a4 qs g4 e. q. a4)

(make-omn
 :length length
 :pitch (time-swallow 1/16 '(3 3 2 1) length pitch))
=> (h g4gs4fs4 s fs4a4g4 q.. a4g4 e gs4 q. f4bb4g4 e. f4bb4gs4
      qs g4bb4 q fs4 a4fs4e4 qs g4gs4fs4 e. g4f4 q. a4)

(make-omn
 :length length
 :pitch (time-swallow 1/16 '(3 3 2 1) length pitch :type 2))
=> (h g4gs4fs4 s g4gs4a4 q.. fs4e4 e gs4 q. a4f4bb4
      e. c5fs4a4 qs a4fs4 q fs4 f4bb4a4 qs fs4a4g4 e. fs4b4 q. cs5)

I made some changes the function which allows you now to assign a chord size to the pitch output.

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.

  • Similar Topics

    • By Jorvd
      Hi,

      I've been following this thread in an attempt to build one score from multiple projects:

      https://opusmodus.com/forums/topic/415-working-with-large-pieces-in-multiple-sections/?tab=comments#comment-1014
       
       
      I've tried both the approach from Stephane and Janusz but I can't seem to play back the scores after each other.
      Instead when I compile the three different scores it plays them all back at the same time/on top of each other.
      I'm probably doing something stupid somewhere but I can't figure out what, here's a screenshot of my project:
       
       

    • By Jorvd
      I'm guessing this is a simple one but it has me stuck for almost an hour now.
      I have two different velocity vectors:
      (setf dynamic-rh (vector-to-velocity 0.55 0.62 (gen-white-noise 10 :seed 122) :type :midi)) (setf dynamic-lh (vector-to-velocity 0.33 0.41 (gen-white-noise 10 :seed 67) :type :midi)) Which I want to combine/merge and plot, I've tried all sorts of stuff like this:
       
      (velocity-list-plot '(dynamic-lh dynamics-rh) :point-radius 2) (velocity-list-plot '((dynamic-lh) (dynamics-rh)) :point-radius 2) (velocity-list-plot (list(dynamic-lh dynamics-rh)) :point-radius 2) It's probably quite obvious, but I couldn't write Lisp to save my life..
      Thank you in advance!
    • By terekita
      Hello, newbie question:
       
      I'd like to take an omn list and simply repeat each measure 3 times. If I start with the following code:
      (setf r-transitions1 '((e (e 1)(-e 3)) (-e (e 3)(-e 1)))) (setf marked (gen-markov-from-transitions r-transitions1 :size 120)) ;;conform to timesignature in omn format (setf r1 (length-span (gen-repeat 20 '8/8) marked :omn t)) ;;define the time signatures (setf timesigs (get-time-signature r1)) ;;stream of pitches (setf pitches '(c4 eb4 f4 g4 bb4 c5 eb5)) (setf pitches (chord-interval-add '(12) pitches)) ;;by spanning r1 onto pitches, pitches will repeat as needed (setf pitches (span r1 pitches)) (setf rh (make-omn :length r1 :pitch pitches)) and then try something like:
      (setf rrh (gen-repeat 3 rh)) ;or (setf rrh (gen-repeat '(3) rh)) neither gives me what I'm looking for.
      However, I notice that if I evaluate
       
      (setf rrh (gen-repeat 3 (list (first rh)))) then I get the correct result for the first measure.
       
      Therefore, doing something like this gets me what I was looking for:
       
      (setf rrh (gen-divide 8 (flatten (mapcar #'(lambda (n) (gen-repeat 3 (list n))) rh))))  
      But surely there's a better/simpler way to repeat bars in omn format.
       
      If anyone has insights, I'd be most appreciative.
       
      thanks, Michael
       
       
       
       
×
×
  • Create New...