Jump to content


Recommended Posts

Hi, what I want to do is to use ambitus-pitch-remove in the second voice
but preserving the rhythmical places for the remaining pitches (so that the pitches swallowed by ambitus-pitch-remove are replaced by rests of the same lengths).

Or asking more generally: Is it possible to manipulate on the level where pitches and length are already glued together (omn?)?


(setf mel '(c4 d4 e4 gs4 bb5 eb6))
(setf rhy '(1/4 -1/8 1/8 1/8 -1/8 1/4 1/4 -1/8 1/8 1/8 -1/4))
(setf mel2 (gen-eval 20 '(rnd-sample 6 mel)))
(setf rhy2 (gen-eval 10 '(rnd-sample 12 rhy)))
(setf rhy3 (assemble-seq '(-1/4) rhy2))

(setf eins (make-omn
            :length rhy2
            :pitch mel2))

(setf zwei (make-omn
            :length rhy3
            :pitch mel2))

(def-score hocket         
               (:key-signature atonal
                :time-signature '(8 8)
                :tempo 100)
  (eins :omn eins
        :channel 1
        :sound 'gm
        :program 0)

  (zwei :omn zwei
        :channel 2
        :program 0))
Link to comment
Share on other sites

I have created new function AMBITUS-SWALLOW which is doing what you are looking for.


ambitus-swallow range omn-sequence &key section




Arguments and Values:


range                   an integer (low high), a pitch symbol (low high) or instrument-name.

omn-list            omn sequence

section              an integer (list number selection).




This function swallows pitches, velocities and articulations from the omn-sequence which are outside the given range. The length of the removed pitch is inverted into rest-length. The span of the sequence stays unchanged.




(ambitus-swallow '(-11 21)

                 '((q c4ds3 e c4 c-1 q d5 g9)

                   (q c4 e d6 = = = c8 q d5 g9)))

=> ((q c4ds3 e c4 - q d5 -) (q c4 -e - - - - q d5 -))


With section:


Only the first list is processed (0-based).


(ambitus-swallow '(db3 a5)

                 '((q c4ds3 e c4 c-1 q d5 g9)

                   (q c4 e d6 = = = c8 q d5 g9))

                 :section '(0))

=> ((q c4ds3 e c4 - q d5 -) (q c4 e d6 = = = c8 q d5 g9))


(ambitus-swallow '(c4 f4)

 '((e c4e4g4 h_e c5)

   (q c4 = = - - =)

    (q cs4 = - - = =)

    (e c4 db4d4eb4 d4 db4 c4 cs5)

    (e c4 e4 g4 h_e c5)

    (q c4 = = - - =)

    (q cs4 = - - = =)

    (e c4 db4d6 d4 db4 c4 cs5)))


=> ((e c4e4 -h_e)

    (q c4 c4 c4 - - c4)

    (q cs4 cs4 - - cs4 cs4)

    (e c4 db4d4eb4 d4 db4 c4 -)

    (e c4 e4 - -h_e)

    (q c4 c4 c4 - - c4)

    (q cs4 cs4 - - cs4 cs4)

    (e c4 db4 d4 db4 c4 -))

Edited by opmo
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.

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