# Comparing variable-length pitch contours

Robert Morris defined a contour segment of a set of `n` pitches as a list of numbers from 0 to `n`, where each number corresponds to the relative height of its corresponding pitch (for instance, <142320> indicates that the second note is the highest, the last note is the lowest, and the third and fifth notes are the same height). He also defined a reduction of a contour segment as four numbers describing the relative position of just the first, last, highest, and lowest pitches.

I am interested in a measure of similarity between contour segments of varying numbers of pitches. I do not want to just reduce each segment to four numbers. How can I retain the information in the pitch sets while comparing them to each other in a meaningful way?

• Do you mean like have a distinct number for each pitch? Are you aware of MIDI note numbers? – Todd Wilcox Jul 24 '19 at 21:09

It's in the nature of metrics that any individual metric will ignore a lot of the information relating to the specimen. But for the purposes of comparison, don't think of evaluating a metric as throwing away information; think of it as gathering one piece of information. If you need more information, take more metrics.

It may be that your particular notion of similarity requires the use of more than one metric at a time. We can see this from the reduction that you describe - it actually in itself contains four different metrics. Perhaps none of those individual metrics seem to say much about a segment; together, they may seem more informative.

It's fairly straightforward to think of more metrics that you can do on a segment. In fact in googling "Robert Morris pitch contours", most of the highest hits relate to people making their own extensions to the ideas. In general, people aren't shy about proposing their own ideas on what might be considered important metrics, in many cases without particularly rigorous psychoacoustic underpinnings. So feel free to make up your own!

Some ideas:

• Number of local minima
• Number of local maxima
• Overall range (highest pitch to lowest pitch)
• Start-pitch to end-pitch range
• longest number of consecutive +, or -
• Longest repeating pattern of +/- movements - e.g. if a segment moves: +--+--, it has two repeating patterns of length 3
• ratio of + to - movements
• average pitch (mean, median, mode)
• statistical deviation from average pitch
• largest difference between consecutive pitches