Jump to content
Sign in to follow this  
o_e

ambitus-pitch-remove

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?)?

code:

(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))

Share this post


Link to post
Share on other sites

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

The function AMBITUS-PITCH-REMOVE has new name AMBITUS-REMOVE.

ambitus-swallow range omn-sequence &key section

 

[Function]

 

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).

 

Description:

 

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.

 

Examples:

 

(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

Share this post


Link to post
Share on other sites

Thank you!

I will find the new function in the next OM update, right (can't wait trying it :-))?

Share this post


Link to post
Share on other sites

Hi,

May I ask politely when the new function(s) will be released (planning my workflow..)?

thanks!

ole

Share this post


Link to post
Share on other sites

I am in Salzburg today. I will release the new update as soon I am back in my studio - tomorrow :-)

Share this post


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.

Sign in to follow this  

×
×
  • Create New...