Key Ontology:Development

We seem to have several ways to describe intervals :


 * 1) Number of semitones
 * 2) * The current chord ontology "SemitoneInterval" approach
 * 3) * Good when we don't know any note names (eg. straight from MIDI)
 * 4) * Working at this level doesn't require very smart client apps
 * 5) Degree of major diatonic scale (+ optional modifier)
 * 6) * The current chord ontology "ScaleInterval" approach
 * 7) * Allows naming of notes
 * 8) * Quite confusing (eg. a minor triad has a "flat (major) third" as its middle note)
 * 9) * Still reasonably simple for clients to process (eg. scaleIntervalFromNoteNames in motools/chord/mma2RDF.py)
 * 10) Degree of a given scale
 * 11) * Perhaps the most natural feeling, musically speaking
 * 12) * So eg. a major triad simply has scale=major and intervals=(1,3,5), while a minor triad has scale=minor and intervals=(1,3,5)
 * 13) * Tricky for clients to process ?
 * 14) ** eg. to generate MIDI from such intervals requires quite a lot of knowledge of scales...
 * 15) ** but perhaps not too bad an algorithm if scale ontology describes scales appropriately ?
 * 16) Individuals for standard intervals
 * 17) * eg. define scale:MajorThird, scale:MinorThird which have both "# semitones" and "degree of a given scale" descriptions attached
 * 18) * This means that clients can just work with #semitones if they wish, but the additional semantics are available to smarter clients
 * 19) * Scales in the scale ontology can be defined in a nice way (eg. major scale = unison,tone,maj 3rd,perf 4th,perf 5th,maj 6th,maj 7th)
 * 20) * Chords in the chord ontology can be defined in a nicer way (eg. chord:min has intervals :Unison, :MinorThird and :PerfectFifth, rather than the current (1,b3,5))
 * 21) * For apps not knowing note names or interval names, blank SemitoneInterval nodes can still be used

''I'm leaning towards the last one myself ("Individuals for standard intervals"). It overlays additional semantics on top of the basic #semitones model, and I think that's the right kind of design. I think it also strikes the right balance between providing dumb clients with useful information (#semitones for processing, "major third" etc. for human-readable display) and smarter clients with rich semantics (eg. "fourth degree of the Lydian scale") where appropriate'' --Chris Sutton 03:51, 7 December 2007 (CST)

''I'm also in favour of the fourth option. With literals an intervals we can express easily chords and scales from the root or we can even express interval steps between 2 any degrees (like between the third and the fourth degrees we have a 2nd minor interval). The same could be done having an IntervalDistance expressed in semitones that we can use as relative metric distance between any two notes or associated to a literal interval'' --[DavidPastor] 12:27, 7 December 2007 (CST)

''There is a specification draft of the ontology below. It pretends to be a starting point for discussion'' --[DavidPastor], 8 January 2008

Tonality Ontology


 * 1) Introduction

We present another module for the Music Ontology which is aimed to express important music structures like scales, tonality and modes.

Basically, this ontology pretends to describe the tonality of a piece of music (or some part of it). We want more descriptive tonal information than the key (see definitions), so our ontology relies on music scales as core of the tonality and composition of a piece of music.

The tonality ontology is also pretended to be useful to express harmony information and collaborate with the Chord Ontology to be a framework for harmony content descriptions.

We face a broad and complex music paradigm, so from now on we will assume some definitions which will be helpful for a correct understanding of the ontology.


 * 1) Preliminaries

We initially settled the concept of scale as the centre of the ontology, this may arise some misunderstandings though. Tonality and scale could be considered the same concept as the tonality is the music structure as result of using the intervals of a scale from a specific pitch.


 * Scale: A musical scale is a sequence of intervals which gives a particular structure of the sound and is used for music production. This sequence of intervals in referred to a pitch which is the tonic and first degree of the scale. We can play a scale using any of the degrees as centre of the music composition, we call these combinations modes.


 * Tonality: The tonality is the result of playing a particular scale to create a piece of music. A specific piece of music may have different tonalities as result of the use different modes of a scale producing tonal transitions for example. The tonality has very important harmonic properties. Each degree of the tonality has a harmonic function and a set of valid chords that suits in the current tonality.


 * 1) Ontology description


 * Interval

Interval is the basic concept that will allow us to define scales. The interval is a distance between notes measured in semitones. To be meaningful inside a chord or a scale, we need to know between which two notes (degrees) we are measuring the distance from:

The class interval will have then two properties:

*semitones: Very intuitively the count of semitones in the 12 temperated octave.

*steps: The number of notes of a scale (degree) included in the interval

Examples:

The IV degree of a major scale is a 4th perfect (IV, 5) from the root.

The V degree of a major scale is a 4th perfect (IV, 5) from the II degree.

These 2 values allow us to infer intervals between degrees and get the specific notes given the root among other things

To use intervals easily we define individuals for each interval specifying the value of these two properties. For example:

2nd major: steps = 2; semitones = 2 5th perfect: steps = 5; semitones = 7

We can express then the relations between the 12 temperated sounds of the western music with these individuals. For example a maj chord will be:

Chord:maj: unison, 3rd minor, 5th perfect

We can even define another interesting property: inverseOf (Interval), so we can define:

2nd major is the inverse of 7th minor

This may be useful to define a mode of a scale, a chord inversion and so on. Actually the intervals of a scale are melodic intervals and the intervals of a chord are harmonic, but we don�t need to make this distinction.

By defining these two properties we can use intervals only by specifying the number of semitones. For example:

Between A and A sharp there is an Interval:semitones = 1


 * Degree

By defining Degree as a class we can assign properties to each of the members of the tonality (and to the underlying scale members). Let us see which properties are interesting:

*name: The name of the degree already contains important information. For example the first degree of the tonality is the Tonic where the stability relies

*position: The position of this degree in the tonality (may not have a name for it), so we can refer to them by the IV degree or the V degree.

*note: It is also useful to know each note of the tonality. We can infer all of them given the underlying scale (interval structure) and tonic pitch.

*validChord: For each degree we have a number of valid chords that can be played using the note of the degree as chord root that sounds good within the tonality. Thus, we spread the harmonic field of each tonality within the ontology

Tonality and Scale as we said are in many senses the same thing, so it could be interesting to define degrees in scales if we only want to give some information about each of the elements of a specific abstract scale.

Degrees have many other uses:

Express a mode: Mode (Eolic) played on VI degree of diatonic scale

Express a chord inversion: Chord:Chord is maj7 played on the III degree.


 * Tonality

We build our ontology around this concept. The tonality is the product of using a scale more than the scale itself. The notes belonging to a scale are used to produce music in different ways and the tonality is the underlying support.

We define the following properties. Note that they all are optional as we can define a tonality in several ways:

*scale: The scale is the abstract sequence of intervals which produce a specific tonality when played at a certain pitch. The tonality is then formed by a tonic note and notes that are related to the tonic by the scale intervals. The scale is also the support for the chords of the tonality.

*mode: As we said before we can use the scale in different modes depending on the degree we use as tonic.

\Documents and Settings\David\Escritorio\figure1.jpg

*degree: An alternative or complementary way to express a tonality is by means of its degrees. The class Degree allows us to specify a tonality like this:

This is very interesting because we can define the harmonic properties of a tonality by indicating the valid chords for each Degree of the tonality and their function.

The key is then a simplification of Tonality in which we only consider I, III and V degrees of the Tonality. The key and tonality accepts some adjectives like major, augmented or major depending on the intervals of specific degrees so we may extend them as properties as well, but can be easily extracted by looking the scale or the distances between degrees.


 * Scale

In a very accurate sense a scale is a structure of notes along the octave divided by intervals. Some of them have interesting properties that make them be useful for music creation and therefore are classified and established as scales in that sense.

The scale is then an abstract structure of intervals (we assume that these intervals are defined just by semitones) between different sounds within the octave.

We define the following properties:

*interval: we can associate Intervals to the scale through this property. This is mainly useful to represent abstract structures of intervals as scales as the basic definition says.

Then, the famous diatonic scale can be represented as:

The first mode of the scale (major scale) is still used as reference for the intervals, but the Intervals as individuals allow greater flexibility and it�s a convention for any almost any text in music. We can also express other particular scales like:

Harmonic minor: 2nd maj, 3rd min, 4th perf, 5th perf, 6th min, 7th maj.

*degree: This is very optional in case we want to describe a particular scale and say something about its degrees.


 * Mode

When we use one of the possible combinations of the scale structure we are playing a mode of the scale. For example the same diatonic scale can be played as Ionian, Eolic or Phrygian modes giving completely music sensations. Note that some of the modes of certain scales are so important that are consider as scales like the major scale (first mode of the diatonic scale)

Mode is not a concept free of ambiguity and the names of some modes change from the Greek denominations to the medieval ones. We will be using the medieval and modern ones from here on.

The mode can be uniquely defined by:

*onDegree: This property tells us the position of the degree of the scale which this mode is related to (1-12).

*scale: Again we use this property to specify the scale which this mode belongs to. This should be really optional as we may only be interested in specifying the degree. The scale property is useful when we refer to specific modes of specific scales

It gets clearer with some examples:

The mode played using the diatonic scale on its II degree is the Dorian mode as this mode has been called that way. Not every mode has a specific name though. The mode resulting from the playing MyScale in its IV degree is just the IV mode of MyScale. We only have names for very few modes that we can define as individuals

Locryan mode: VII mode, diatonic scale. (Which is the same mode for the Major Scale, but it is not the same name for the VII mode of the Minor Scale).

So, in some sense we can define every melody phrase in music by belonging to a certain mode of a scale in a certain tonality, we could put the mode in the centre of our representation, but this is not really intuitive as mode is not a well spread name.


 * 1) IMPLICATIONS ON THE CHORD ONTOLOGY

The new redefinitions of interval and degree have consequences on the chord ontology. Fortunately, the basic model of the chord doesn�t need to be changed at all.

Now, the intervals are redefined and not longer expressed by ScalesInterval instances. Instead of this, we have now Intervals composed by DegreeHop and SemitonesDistance and all of them are now individuals of the class Interval, so instead of defining the chords as alterations of the major chord from the diatonic scale we can define each chord by the real harmonic intervals as:

Maj: unison, 3rd major, 5th perfect

Of course, these intervals are known because of the underlying diatonic major scale in which the 3rd degree is a 3rd major (4 semitones) and the 5th degree is a 5th perfect (7 semitones).

As our interval individuals are fully defined by:

3rd major: steps = 3, semitones = 7

We then represent the chord by its natural foundation in the scale intervals harmonically disposed.

The rest of the model seems to fit perfectly to the chord concept. We shouldn�t introduce the :Degree at this point as Degree is part of the underlying scale or of the consequent harmonic field, but not of the chord. Example:

The 2nd note of the major chord is the 3rd degree of the major scale (so 3rd major), but it won�t be accurate to say that the 2nd degree of the chord is a 3rd major (this is maybe obvios).

However, we may associate by means of :note the relation between the root of the chord to the degree of the scale as in this example:

The III Degree of the A minor scale (:note C) is the root note of the third chord in the A minor harmonic field: C major.

The rest of the notes and degrees can be easily inferred by means of the semitonesDistance property of the class Interval.

The main idea here is therefore that we represent chords based on scales, hiding the scale structure (semitones between degrees) by using individuals of the class Interval.

The figure 4 of the chord ontology will be modified changing each ScaleInterval for the correct Interval:individual. So the major scale:

Scale:Maj: unison (I, 0), 2 major (II, 2), 3 major (III, 4), 4 perfect (IV, 7), 5 perfect (V, 7), 6 major (VI, 9), 7 major (VII, 11)

The chords can be also referred to the tonalities they belong to by means of the validChord property in the class Degree.