AMuSE Grouping

Requirements

Loading the system

 
CL-USER> (asdf:oos 'asdf:load-op 'amuse-grouping) 
... 

Usage

From the README:

Special Variable: amuse-grouping:*undefined* 

  specifies the object used to signify that the boundary strength returned 
  by an algorithm is undefined at a given boundary location (default 0). 

Special Variable: amuse-grouping:*boundary* 

  specifies the object used to signify a boundary at a given boundary
  location (default 0). By convention a boundary is indicated on the event 
  preceding the grouping boundary (i.e., the last event of the segment before 
  the boundary).

Special Variable: amuse-grouping:*boundary* 

  specifies the object used to signify that no boundary occurs at a
  given boundary location (default 0).

Generic Function: (amuse-grouping:boundary-strengths method monody &key ...)

  COMPOSITION is an amuse monody (usually a STANDARD-MONODY) and

  METHOD is a keyword indicating the method to use. Currently
    implemented methods: 

     :gpr2a           Grouping preference rules from Lerdahl & Jackendoff 
     :gpr2b           (1983) as quantified by Frankland and Cohen (2004)
     :gpr2b-revised
     :gpr3a
     :gpr3d

     :lbdm            Local Boundary Detection Model of Cambouropoulos (2001)

     :saffran         Statistical segmentation after Saffran et al. (1999) as
                      quantified by Brent (1999) 

  ... optional keyword arguments particular to each method. 

     :lbdm - weight-pitch, weight-ioi, weight-rest, offset-pitch, offset-rest

     :saffran - statistic, feature, training-set

  BOUNDARY-STRENGTHS returns a list indicating the boundary strength
    associated with each note in the melody. By convention, boundary
    strengths are positive real valued numbers associated with the note
    before the boundary: e.g., 0.9 means that a note is likely to occur  
    directly before a grouping boundary between that note and the
    following one.

Generic Function: (amuse-grouping:boundary-locations strengths method &key ...)

  STRENGTHS is a list as returned by BOUNDARY-STRENGTHS

  METHOD is a keyword indicating the method to use. Currently
    implemented methods: 

    :threshold 
    :threshold-local-maxima
    :proportion 
    :proportion-local-maxima
    :simplepicker 

  ... optional keyword arguments particular to each method. 

  BOUNDARY-LOCATIONS returns a list indicating whether each note in 
    boundary-strength profile derived from a melody is associated with
    a grouping boundary. By convention, the integer 1 indicates that a
    note is followed by a boundary whilst 0 indicates that no boundary
    follows the note.

Examples

 
CL-USER> (amuse-grouping:boundary-strengths 
          :lbdm
          (amuse:monody 
            (amuse:get-composition
             (amuse-mtp:make-mtp-composition-identifier 4 103))))

=> (0 0.75 0.5 0.6666667 0.4166667 0.75 0 0)
 
CL-USER> (amuse-grouping:boundary-locations
          (amuse-grouping:boundary-strengths 
           :lbdm
           (amuse:monody 
            (amuse:get-composition
             (amuse-mtp:make-mtp-composition-identifier 4 103))))
          :threshold-local-maxima
          :threshold 0.5)
=> (0 1 0 1 0 1 0 0)