Jump to content

Opusmodus 1.2.21756


Recommended Posts

OMN added to LENGTH-MAP function.

I you used the function before please add the :otherwise keyword to the function in your score.

 

--------------------------------

 

length-map map sequence &key repeat otherwise

              section exclude seed

 

[Function]

 

Arguments and Values:

 

map                              a list (<length><item>).

sequence            list of lengths or omn list.

otherwise           an item or list of items.

repeat                                  nil, t and '? (at random).  The default is nil.

section             an integer or list of integers. Selected list or lists to process.

                                                The default is NIL. This keyword is for omn lists only.

exclude             an integer or list of integers. Excluded list or lists from process.

                                                The default is NIL. This keyword is for omn lists only.

seed                                      NIL or an integer. The default is NIL.

 

Description:

 

LENGTH-MAP returns a copy of sequence in which each element that has been mapped (<length><item>) is replaced with a new item, if not, an otherwise item is chosen. If the sequence is omn-list and the otherwise is Nil, then the item is unchanged.

 

(length-map

 '(e (c4fs4 eb4a4))

 '(q q h -s s s s e -q - e - e s s h)

 :otherwise '(c4 cs5 d4 ds5))

=> (c4 cs5 d4 ds5 c4 cs5 c4fs4 eb4a4 c4fs4 cs5 d4 ds5)

 

(length-map

 '(e (c4fs4 eb4a4))

 '(q q h -s s s s e -q - e - e s s h)

 :otherwise '(c4 cs5 d4 ds5) :repeat t)

=> (c4 cs5 d4 ds5 c4 cs5 c4fs4 c4fs4 c4fs4 cs5 d4 ds5)

 

Examples:

 

Mapping pitch to length:

 

(length-map

 '(((s q) (c4db5 eb4d5)))

 '(q q h -s s s s e -q -q -e e -e s s h)

 :otherwise '(c4 cs4 fs4 g4))

=> (c4db5 eb4d5 fs4 c4db5 eb4d5 c4db5 fs4 g4 eb4d5 c4db5 fs4)

 

(length-map

 '(s (c4fs4 eb4a4))

 '(q q h -s s s s e -q -q -e e -e s s h)

 :otherwise (rnd-row :type :pitch))

=> (c4 cs4 d4 c4fs4 eb4a4 c4fs4 e4 gs4 eb4a4 c4fs4 g4)

 

(length-map

 '((s (c4fs4 eb4a4)) (q (fs4c5g5)))

 '(q q h -s s s s e -q -q -e e -e s s h)

 :otherwise (rnd-row :type :pitch) :repeat t)

=> (fs4c5g5 fs4c5g5 fs4 c4fs4 c4fs4 c4fs4 d4 eb4 eb4a4 eb4a4 a4)

 

Mapping velocity to length:

 

(length-map

 '((s f) (q p))

 '(q q h -s s s s e -q -q -e e -e s s h)

 :otherwise '(mp) :repeat t)

=> (p p mp f f f mp mp f f mp)

 

Mapping articulation to length:

 

(length-map 

      '((1/8 (marc mordent2)) (1/16 (ped stacc)) (1/4 (ped leg)))

      '(1/16 1/16 1/8 1/2 1/16 1/16 1/8 1/4 1/2 1/4)

      :otherwise '(tr1 tr2) :repeat t)

=> (ped ped marc tr2 stacc stacc mordent2 ped tr1 leg)

 

(length-map 

      '((1/8 (spicc marc)) (1/16 (pizz stacc)) (1/4 (vib leg)))

      '(1/16 1/16 1/8 1/2 1/16 1/16 1/8 1/4 1/2 1/4)

      :otherwise '(ord))

=> (pizz stacc spicc ord pizz stacc marc vib ord leg)

 

(setf length

      '((1/2 4/5 1/5)

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

        (4/5 1/2 1/4 1/5)

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

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

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

        (1/10 1/5 3/10 1/2 4/5 3/10 1/2 4/5 1/2 3/10 1/5)

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

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

        (1/2 4/5 1/10 3/10 1/5 1/5 3/20)))

 

(length-map

 '((1/2 (pfp-vib-4s detache-short stacc))

   ((1/8 5/16) (tas-detache detache-long))

   ((1/10 3/10) (tas-sus dyn-me-novib-1.5s tas-trem))

   ((2/3 7/6) (tas-sus pfp-vib-4s dyn-me-novib-3s)))

 length :otherwise '(sus-novib))

 

=> ((pfp-vib-4s sus-novib sus-novib)

    (tas-detache sus-novib pfp-vib-4s sus-novib detache-long)

    (sus-novib pfp-vib-4s sus-novib sus-novib)

    (pfp-vib-4s tas-detache sus-novib detache-long sus-novib)

    (sus-novib pfp-vib-4s tas-detache detache-long sus-novib

     tas-detache detache-long detache-short sus-novib sus-novib stacc)

    (pfp-vib-4s tas-detache sus-novib sus-novib detache-long

     sus-novib sus-novib tas-detache detache-short)

    (tas-sus sus-novib dyn-me-novib-1.5s pfp-vib-4s sus-novib

     tas-trem detache-short sus-novib stacc tas-sus sus-novib)

    (tas-detache detache-long sus-novib pfp-vib-4s sus-novib)

    (tas-detache sus-novib pfp-vib-4s sus-novib detache-long)

    (pfp-vib-4s sus-novib tas-sus dyn-me-novib-1.5s sus-novib

     sus-novib sus-novib))

 

OMN:

 

(setf omn '((e c4 fff cs5 f q d4 f ds5 p s f4 p fs5 p c5 p pp)

            (s cs4 p f d4 f e eb5 p f4 p eb4 f h d3 p ff)))

 

Mapping pitch to length:

 

(length-map '((s (c4fs4 fs3f4)) (e c6ds6)

              (q (rnd-sample 12 '(fs4 fs3 gs5) :seed 45)))

            omn :otherwise '(c3fs4g4 gs5))

=> ((e c6ds6 fff f q fs3 fs4 p s c4fs4 fs3f4 c4fs4 fs3f4 pp)

    (s c4fs4 p fs3f4 f c4fs4 e c6ds6 p c6ds6 c6ds6 f

     h c3fs4g4 p gs5 ff))

 

(length-map '((s (c4fs4 fs3f4)) (e c6ds6)

              (q (rnd-sample 12 '(fs4 fs3 gs5) :seed 45)))

            omn :repeat t)

=> ((e c6ds6 fff f q fs3 fs3 p s c4fs4 c4fs4 c4fs4 c4fs4 pp)

    (s c4fs4 p f c4fs4 e c6ds6 p c6ds6 c6ds6 f h d3 p ff))

 

Mapping articulation to length:

 

(length-map '((s stacc) (e ped) (q (rnd-sample 12 '(tr1 marc))))

            omn)

=> ((e c4 fff ped cs5 f ped q d4 tr1 ds5 p tr1

     s f4 stacc fs5 stacc c5 stacc c5 pp stacc)

    (s cs4 p stacc cs4 f stacc d4 stacc

     e eb5 p ped f4 ped eb4 f ped h d3 p ff))

 

Mapping velocity to length:

 

(length-map '((s ff) (e f) (q (rnd-sample 12 '(pp ppp))))

            omn :otherwise '(ppp))

=> ((e c4 f cs5 q d4 ppp ds5 pp s f4 ff fs5 c5 c5)

    (s cs4 ff cs4 d4 e eb5 f f4 eb4 h d3 ppp d3))

 

Best wishes,

JP

 
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy