d@74
|
1 (in-package "AMUSE-SEGMENTATION")
|
d@74
|
2
|
d@74
|
3 (defgeneric boundary-strength (segmenter object composition)
|
d@74
|
4 (:documentation "Returns a (positive?) number, with 0
|
d@74
|
5 indicating no boundary. N.B. Whether this indicates a boundary
|
d@74
|
6 before or after moment-designator is the responsibility of the
|
d@74
|
7 caller to know."))
|
d@74
|
8
|
d@74
|
9 (defgeneric boundary-time (segmenter object)
|
d@74
|
10 (:documentation "Returns the moment that the value returned by
|
d@74
|
11 boundary-strength applies to if object is the second input to
|
d@74
|
12 the method. Essentially, this distinguishes between segmenters
|
d@74
|
13 that look to the beginning of a note and those that look at the
|
d@75
|
14 end."))
|
d@74
|
15
|
d@74
|
16 (defgeneric ground-truth-segmenter-before (composition)
|
d@74
|
17 (:documentation "Returns the segmenter that, when put into
|
d@74
|
18 boundary-strength, supplies segmentation as given in a
|
d@74
|
19 ground truth for the composition. N.B. This needs to return one
|
d@74
|
20 segmenter only, so in cases of multiple ground truths, this
|
d@74
|
21 method must arbitrate."))
|
d@74
|
22
|
d@74
|
23 (defgeneric ground-truth-segmenter-after (composition)
|
d@74
|
24 (:documentation "Returns the segmenter that, when put into
|
d@74
|
25 boundary-strength-after, supplies segmentation as given in a
|
d@74
|
26 ground truth for the composition. N.B. This needs to return one
|
d@74
|
27 segmenter only, so in cases of multiple ground truths, this
|
d@74
|
28 method must arbitrate."))
|
d@74
|
29
|
d@75
|
30 (defgeneric ground-truth-segmenterp (segmenter)
|
d@75
|
31 (:method ((s ground-truth-segmenter)) t)
|
d@75
|
32 (:method (s) nil)) ;; prob not necessary?
|
d@75
|
33 (defgeneric segments-beforep (segmenter)
|
d@75
|
34 (:method ((s before-segmenter)) t)
|
d@75
|
35 (:method ((s after-segmenter)) nil))
|
d@74
|
36 (defgeneric segments-afterp (segmenter)
|
d@74
|
37 (:method (s) (not (segments-beforep s))))
|