Jump to content
Sign in to follow this  
opmo

Opusmodus 1.3.24711

Recommended Posts

1.3.24711 

 

– Function name changes: 

hexachord-complement to: GET-HEXACHORD-COMPLEMENT
gen-ac-hexachord to: GET-AC-HEXACHORD
ac-hexachord-complement-form-set to: GET-AC-HEXACHORD-COMPLEMENT-FORM-SET

– New functions:

  • get-density
  • filter-density

 

– New directory in System Library: Analysis.

Fixed:
– velocity-to-dynamic

 

 

GET-DENSITY

The function GET-DENSITY returns a density value (between 0.0 and 1.0) derived from quantitative measurements in a given sequence. There are four density types: :length, :pitch, :velocity and nil. The density information can be used in an analytical and compositional manner.

 

Length density:

(get-density '(s s s s s s s s))
=> 1.0
(get-density '(s s -s s -s s -s s))
=> 0.62
(get-density '(-q e -e q. s))
=> 0.33555558
(get-density '(e.. s s s q s s s t -t s t))
=> 0.8336364
(get-density '(-q -e -t t t t t t -q -s. t t t))
=> 0.25
(get-density '((-w) (-w) (-w) (-w)
               (-h -e -t = -s. t -s. t -s)
               (-t = -s. e s = = = = = = = = = -s.)
               (-w) (-w) (-w)
               (-h -e -t = = = = = -s. =)
               (e.. s = = q s = = t - s t)
               (-t s t - s t - s t - s t - s t - s t - s t - = -s)
               (-t = -q -s. e t -s. s -e. t = =)
               (t = = = = = = = = = = = = s -e. s -e. t = =)))
=> (0.0 0.0 0.0 0.0 0.089999974 0.74833333 0.0 0.0 0.0
    0.22666669 0.8336364 0.69 0.3185714 0.62)

 

Pitch density:

(get-density 'c4e4g4)
=> 0.38888893
(get-density 'c4ds4fs4a4)
=> 0.41666666
(get-density '((bb3 e3 bb2 a4 b4 d5)
               (b2 bb2 b3 b4 c7 c5)
               (eb3 gs3 gs2 a5 cs7 cs4)))
=> (0.48333335 0.8166667 0.8833334)

 

Velocity density:

(get-density '(pp pp p p mp mp mf mf f f))
=> 0.30833334
(get-density '((pp< < < ff> > > > >)
               (p< < < < mf< < < <)
               (f> > > > > p p p)))
=> (0.4010417 0.38020834 0.30729166)

 

OMN:

(setf
p00 '(-h.)
p01 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf
      -e 3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)

p02 '(t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc t fs4 mf leg
      gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg eb5 3q bb5 >
      a4 > bb5 > e a4 pp stacc -e)

p03 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc e. cs4 marc
      s gs4 leg q gs4 -q)

p04 '(q. fs5 pp 3e c5 < leg b4 < leg f4 e d5 mf s eb5 leg g5 leg
      bb5 leg a5 e fs5 leg fs5 3e gs4 > stacc c5 > stacc b5 > stacc
      t f5 pp e.. e5)

p05 '(-q. e d4 pp q. eb5 mf e g4 q bb4 a4)
p06 '(q cs4 pp -q t gs4 marc e.. fs4 mf leg e c4 -e t b4 leg f4 q.. e4 pp)
p07 '(-q e d4 leg eb4 h g4 mf leg q. g4 > -e)
p08 '(s bb4 pp leg a4 h. db4 t gs4 mp fs4 < c5 < b4 q f5 marc e5)
)

(setf pattern (assemble-seq p00 p01 p02 p03 p04 p05 p06 p07 p08))

 

density.png

 

Type nil returns a mean value derived from the three main types:

(get-density pattern)
=> (0.0 0.3716961 0.47591507 0.343125 0.49027777
    0.36222222 0.41116783 0.2487963 0.45833334)

 

Length density:

(get-density pattern :type :length)
=> (0.0 0.5680555 0.7047059 0.36791664 0.8072916
    0.25333333 0.44183674 0.24291666 0.73148143)

 

Pitch density:

(get-density pattern :type :pitch)
=> (0.0 0.27272728 0.375 0.33333334 0.36666667
    0.5 0.45833334 0.1388889 0.3333333)

 

Velocity density:

(get-density pattern :type :velocity)
=> (0.0 0.27430555 0.34803924 0.32812503 0.296875
    0.33333334 0.33333334 0.36458337 0.3101852)

 

FILTER-DENSITY

The function FILTER-DENSITY analyses all bars in a given sequence and returns a new sequence based on the list of density values and their order.

 

A short demonstration on how the density information, taken from a number of patterns can be used in a compositional manner.

(setf
 p00 '(-w.)
 p01 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf
       -e 3q gs5 > leg fs5 > leg c5 > b4 pp leg f4 leg e4)
 p02 '(t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc t fs4 mf leg gs4 leg
       e. c5 e b4 t f5 leg e5 leg d5 leg eb5 3q bb5 > a4 > bb5 >
       e a4 pp stacc -e)
 p03 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc e. cs4 marc
       s gs4 leg q gs4 -q)
 p04 '(q. fs5 pp 3e c5 < leg b4 < leg f4 e d5 mf s eb5 leg g5 leg bb5 leg
       a5 e fs5 leg fs5 3e gs4 > stacc c5 > stacc b5 > stacc t f5 pp e.. e5)
 p05 '(-q. e d4 pp q. eb5 mf e g4 q bb4 a4)
 p06 '(q cs4 pp -q t gs4 marc e.. fs4 mf leg e c4 -e t b4 leg f4 q.. e4 pp)
 p07 '(-q e d4 leg eb4 h g4 mf leg q. g4 > -e)
 p08 '(s bb4 pp leg a4 h. db4 t gs4 mp fs4 < c5 < b4 q f5 f marc e5)
 p09 '(h. eb4 pp q g3 -e q gs4 mf -s a5 p tie)
 p10 '(e. a5 -e q bb4 mf -s q cs5 p -s q. e5 mf -e.)
 p11 '(q cs5 p h. d5 mf -q c5 pp tie)
 p12 '(h c5 pp h. gs3 -e a4 p)
 p13 '(h. fs5 mp q bb3 c5 p e4 mf tie)
 p14 '(h e4 -e q cs4 mp h d5 p e f4)

 mat (assemble-seq p00 p01 p02 p03 p04
                   p05 p06 p07 p08 p09
                   p10 p11 p12 p13 p14)
)

(progn
  (setf
   ;bars  1   2   3   4   5   6   7   8   9  10  11  12  13  14
   p1 '(0.2 0.0 0.2 0.0 0.2 0.3 0.8 0.2 0.3 0.0 0.2 0.2 0.0 0.1)
   p2 '(0.0 0.2 0.6 0.3 0.0 0.5 0.2 0.7 0.0 0.2 0.0 0.2 0.3 0.2)
   p3 '(0.2 0.7 0.0 0.0 0.2 0.3 0.2 0.0 0.7 0.0 0.3 0.2 0.5 0.1)
   p4 '(0.1 0.0 0.0 0.2 0.8 0.2 0.0 0.2 0.2 0.0 0.2 0.2 0.3 0.2)
   p5 '(0.0 0.0 0.2 0.0 0.2 0.0 0.1 0.0 0.0 0.8 0.2 0.2 0.2 0.1)
   )
  (setf
   v1 (filter-density p1 mat :type :length :seed 253)
   v2 (filter-density p2 mat :type :length :seed 743)
   v3 (filter-density p3 mat :type :length :seed 545)
   v4 (filter-density p4 mat :type :length :seed 987)
   v5 (filter-density p5 mat :type :length :seed 234)
   )
  (setf
   fl (unfold 'eg '(t7 v? (a0-12 1) dyn fl) v1)
   ob (unfold 'eg '(t7 i (a0-12 (3 6 8)) dyn ob) v2)
   cl (unfold 'eg '(t7 v? (a0-12 (2 9 14)) (ra 9) dyn cl) v3)
   hn (unfold 'eg '(t-5 t-12 ra rol dyn hn) v4)
   bn (unfold 'eg '(t-5 t-12 i rol dyn bn) v5)
   )
  (ps 'gm :w5 (list fl ob cl hn bn) :tempo 68)
  )

 

Best wishes,

JP

Share this post


Link to post
Share on other sites

Thanks Janusz, These tools seem to be very interesting for musical analysis.

Best wishes.

Didier 

Share this post


Link to post
Share on other sites

Yes, for analysis GET-DENSITY and for composition FILTER-DENSITY.

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