MI/p1
Alan Smaill 26th February 2018
Music Informatics
Assessed Practical
In this practical you are asked to use and extend a small musical grammar, and to review a paper on the role of probabilistic grammars in music. The review counts for 1/3 of the credit for this assignment.
1 Background Grammar
The grammars are written using Prolog’s built-in grammar formalism.
You should read appropriate background on this, if you don’t know it already — there is no need to know about the language as a whole, however. The formalism allows Prolog procedures to be interleaved with the parsing process; it also allows
generation of grammatical output.
For the grammar formalism in Prolog, see the on-line book on Prolog “Learn Pro-
log Now”:
http://www.learnprolognow.org/
especially lectures 7 & 8. To change rhythmic aspects, it will help to look at the extra features that are possible with such grammars, described at the end of chapter 8.
Music
We are looking at simple melodies, using the abc notation. A quick glance at the web-site will give the basic idea.
http://abcnotation.com/
We will not use repetition symbols.
This notation has been used for fairly large collections of music melodies which
fit more or less in the main western music framework. See
http://abcnotation.com/tunes#historical
for some examples.
2 The tasks
2.1 Developing a new grammar
There is a small grammar with some examples that are parsed by the grammar on the course web page under practicals. These are folk music melodies as jigs which are
common in Scottish and Irish music. Follow the link from the practical page to get the grammar;
(note this is different from the grammar for the previous practical.
This version allows the generation of scores from the output of random melodies, and the generation of midi files; see the notes in the source files.
Using the Grammar
- Give two other examples of melodies that are accepted by the grammar, and two that are not accepted. Say briefly where the parsing breaks down in the latter case, and why.
- Extend the grammar to allow larger coverage. (You may also want to revise or drop some of the given grammar rules.)
You might allow some (not all) of these:• more rhythmical variation,
• more than one harmony per bar,
• a broader notion of notes associated with a particular harmony • some additional harmonies.One way to go about this is to take another piece in a similar style, and see how the grammar can be enlarged to accommodate the new piece. Note that, as things are set up, this will only work if the other piece is in the same key; more precisely, the restriction is that the music is written using the same key signature.
Give two examples of melodies accepted by the new grammar, but not the ori- ginal grammar.
You should also include in your submission a discussion about your choice of extended grammar — why did you pick the extensions you did, and how good do you think it is as a characterisation of music in this style (or some other style)?
2.2 Probabilistic Grammars
Read the paper Abdallah, Gold and Marsden (2016) 1 – the main interest is in section 7 and the experiments reported there.
Summarise concisely the role of probabilistic grammars in music analysis, as de- scribed in the paper. What are the strengths and weaknesses of this approach to ana- lysis?
Such a grammar can be used to generate music, as well as for analysis. Discuss how useful or not this possibility could be for a composer who wants to generate new music using such techniques.
1available visa the University library online, and in restricted section of course web page
Marking
- Asubmissionwhichalterstheinitialgrammarsensibly,showssomeideaofhow to extend grammar, and describes probabilistic grammar clearly will receive a pass mark (at least 50%).
- A submission which produces a new grammar accurately, gives examples, and thinks carefully about probabilistic grammars for amalysis and generation, and gives a well-justified response, will get an A pass (at least 70%).
Deadline
Submission is due on
Submission
Friday 30th March
You should submit your work using the submit system on DICE. Submissions should include the grammars you developed, the example melodies (eg as comments in the code); and also your review of the article.
Put these in a directory, and submit as follows:
submit mi cw1 <yourdirectory>
References
Abdallah, S., Gold, N. & Marsden, A. (2016). Analysing symbolic music with probab- ilistic grammars. In D. Meredith (Ed.), Computational music analysis (Chap. 7, pp. 157–189). Springer. Retrieved from http://www.springer.com/ gb/book/9783319259291