 |
| Name |
Automated Music Generation for Sight Reading |
| Comments |
Background
Sight reading is one of the more challenging skills a beginning music student must learn. The term “sight reading” refers to the ability to read music notation fluently, while playing the instrument correctly and in tempo. Sight reading is similar to language reading. Having learned to read since our childhood, we can read fluently and process what we read in our brain without having to stop after each letter or each word (and usually not even after each sentence). True, different people can read at different speeds and some people have reading disabilities, but the average reader is fluent and does not find reading per-se as big challenge (understanding is a different issue, of course). The same must be true for a skilled musician. No wonder considerable practice is needed to achieve such a goal.
Different instruments pose different sight-reading challenges. Here we use the guitar as an example. On the guitar, almost every note (except the very low and the very high notes) can be played on two or more strings, using different frets. For example, the middle C (known formally as C4) can be played on the 1st fret of the 2nd string, or on the 5th fret of the 3rd string, or on the 10th fret of the 4th string, or on the 15th fret of the 5th string, or on the 20th fret of the 6th string. This is very different from a piano, for example. On the piano, to each note there corresponds a single key; C4, for example, is the white key in the middle of the piano keyboard and can be played only there.
When the guitar player sees a note in the score, he or she must decide on which string/fret pair to play the note, and which left-hand finger to use for fretting the note (index, middle, ring, or pinky). The goal is always to minimize left-hand movements, shifting positions smoothly and only when necessary. Most often there is an “optimal” choice of string/fret/finger combination to achieve this goal. A skilled musician must be able to play a note, simultaneously read the next note to be played, and at the same time read ahead and decide, based on the forthcoming notes, what is the optimal string/fret/finger combination for the next note.
When a child learns to read, he or she learns from a book written by specialists for reading learning, not from a general book (such as “Harry Potter”). Reading learning books must be graded in level and varied in vocabulary and phrasing; in addition they must be interesting. In a similar vein, music material for learning sight reading must have the following features:
1. It must be graded in difficulty.
2. In the case of the guitar (and many other instruments) it must cover all left-hand positions and provide many opportunities for position shifting.
3. It must include practicing material for all major and minor keys (sight-reading of atonal music has its own challenges, but will not be addressed here).
4. It must include accidentals (notes outside the key being played); such accidentals should appear gradually (few in the early stage of learning, more later).
5. At the advanced stage of learning, it should include modulations (changes of key).
6. It should be reasonably musical. While it is not required to be a musical masterpiece, it should at least sound musical and not completely random. To such end, it must follow common rules of music writing (avoid frequent skips, follow a skip by steps in the opposite direction, incorporate scale patterns, chord patterns and sequences, and many more such rules).
It is no wonder that sight-reading books are rare and good ones are almost non-existence (especially for the guitar). Writing a good sight-reading book is a Sisyphean and non-rewarding task. The writer of such a book must balance his/her aspirations for writing pleasing music against the pedagogical demands. The amount of exercises needed for such a book to be comprehensive is in the hundreds or even in the thousands, a mission that only few sane human beings would take upon themselves.
An attractive alternative to human-written sight-reading material is computer software that would generate reading exercises automatically, according to specifications. The main advantage of such an approach is, of course, that the computer has infinite patience and is capable of executing “boring” tasks. The challenge is to develop software that would generate exercises meeting the demands listed above; in particular, be reasonably musical while “covering all bases” of music reading skills.
The next section describes the proposed project in more detail.
Project Description
The following description applies to a first project for automatic generation of sight-reading music. More advanced projects will be proposed later, depending on progress made in the first one.
The first project will concentrate on melody and ignore rhythmic aspects. Consequently, all notes will have uniform duration (e.g., quarter notes) and simple meter (such as 4/4 or 3/4).
The two main components of the project are:
• An algorithm to generate the melody (the sequence of notes of the exercise). The inputs to the algorithm will be described below. The output is a numerical sequence, where each number represents a note, according to some specified translation table.
• A program that takes the numerical sequence and converts it to standard musical notation that can be printed.
The melody-generation algorithm can be programmed in Matlab. The conversion to musical notation can be done in various ways. The proposed way is to write a program (in Matlab or C) that will convert the numerical sequence to a standard MIDI file (SMF). The SMF can then be input to a music notation program such as Finale, which will provide listening as well as printing.
The melody generation algorithm is probabilistic, and takes into account typical statistical properties of good-sounding music. A simple such model is a first-order Markov chain. In this model, the next note is obtained by stepping an interval relative to the current note, where the size of the interval is random and independent of past notes (there are some exceptions, as described below). The interval is relative to the current key and can be simple (up to an octave) or compound (greater than an octave), ascending or descending. Different intervals have different probabilities. A second is the most frequent interval, unisons and thirds are slightly less frequent, fourths are even less frequent, and so on. An interval of fourth or greater in a certain direction is usually followed by one or more smaller intervals (typically seconds) in the opposite direction. Sequences of seconds, which are essentially scale patterns, are common. Also common are sequences of thirds, which are essentially arpeggiated chords. The aforementioned description applies to melodies that are strictly within the key. Melodies also include accidentals, which are notes outside the key. For example, a melody in C major can occasionally include an F#, or a Bb, and so on. Accidentals, as their name imply, are temporary, and revert to the corresponding in-key notes later on. The proposed algorithm will generate accidentals at random, depending on a pre-specified probabilistic model. For example, an accidental that belongs to an adjacent key is more common than an accidental belonging to a remote key. The accidental F# belongs to the key of G major, which is adjacent to C major. The accidental Bb belongs to the key of F, which is also adjacent to C major. On the other hand, when we are in the key of C major, the accidental D# is rare, because it belongs to E major, a key remote from C major.
Minor keys impose additional complexities. In the key of A minor, the note G may be natural or sharpened (G#), and the same is true (though less frequently) for F. In general, a minor key may have a sharpened seventh (the harmonic minor) and possibly a sharpened sixth (the melodic minor).
In consequence, the melody generation algorithm should be provided with following inputs:
• The key.
• The length of the exercise (number of notes).
• The range of notes to be included in the exercise (lowest and highest possible notes). In general, small range will imply playing in a single position where as large range will necessitate position shifting, so it is suitable for more advanced exercises.
• Table of probabilities for the various intervals, from unison to the largest desired interval (e.g., an octave).
• Table of probabilities for accidentals.
The algorithm first randomizes the first note within the range. It then starts a loop of generating intervals for moving from the next note to the other, using the probability tables. Both the size and the direction of the interval are random in general. However, when the next note happens to be outside the permitted range, the direction of movement must be such as to bring it back inside the permitted range. The absolute value of the next note depends on the present note, the interval, and the key. For example, if we are in C major, the present note is C, and the interval is an ascending second, the next note is D, which is a whole tone above C. However, if the interval is a descending second, the next note is B, which is a semitone below C. Before the next note is generated, we randomize the occurrence of an accidental, in which case the note is modified accordingly.
The output is a sequence of numbers, describing the sequence of notes. The standard MIDI numbering of notes offers a convenient representation.
The program that converts the numerical sequence to SMF needs additional inputs, pertaining to playing and printing the music, such as note duration, meter, and such.
|
| WebPage |
Additional Information
|
| Application |
not specified
|
| Appl Deadline |
date not specified
|
| Keywords |
electrical engineering |
 |
 |
| College |
School of Engineering & Applied Science |
| Department |
Electrical and Systems Engineering
|
| Professor |
Nehorai, Arye
[ email ]
[ web page ]
|
 |
 |
| Start Time |
not specified
|
| End Time |
not specified
|
| Hours Per Week |
0 hour(s)
|
| Number Positions |
not specified
|
| Credits |
3 hour(s)
|
| Prerequisites |
No Prerequisites
|
| Internship |
Not an Internship
|
| Stipend |
No stipend available
|
 |
 |
|
 |