Music Informatics Alan Smaill Jan 29, 2018 Alan Smaill Music - - PowerPoint PPT Presentation

music informatics
SMART_READER_LITE
LIVE PREVIEW

Music Informatics Alan Smaill Jan 29, 2018 Alan Smaill Music - - PowerPoint PPT Presentation

N I V E U R S E I H T T Y O H F G R E U D I B N Music Informatics Alan Smaill Jan 29, 2018 Alan Smaill Music Informatics Jan 29, 2018 1/1 Today N I V E U R S E I H T T Y O H F G R E U D I B N


slide-1
SLIDE 1

T H E U N I V E R S I T Y O F E D I N B U R G H

Music Informatics

Alan Smaill Jan 29, 2018

Alan Smaill Music Informatics Jan 29, 2018 1/1

slide-2
SLIDE 2

T H E U N I V E R S I T Y O F E D I N B U R G H

Today

Imitating musical style Cope: grammar + signature patterns

Alan Smaill Music Informatics Jan 29, 2018 2/1

slide-3
SLIDE 3

T H E U N I V E R S I T Y O F E D I N B U R G H

Turing test

Alan Turing’s famous paper from 1950 “Computing Machinery and Intelligence” can be found in many places, eg http://www.abelard.org/turpap/turpap.htm He proposed to replace the question “Can a machine think?” with

  • ne where there is a clear way to decide what the outcome is:

Can we distinguish between the behaviour of a human and a machine? It is proposed that a machine may be deemed intelligent, if it can act in such a manner that a human cannot distinguish the machine from another human merely by asking questions via a mechanical link. Turing, 1950

Alan Smaill Music Informatics Jan 29, 2018 3/1

slide-4
SLIDE 4

T H E U N I V E R S I T Y O F E D I N B U R G H

Musical Intelligence

David Cope over many years has worked on a general approach to machine imitation of music in particular styles. There is a corresponding question that he (with Hofstadter) has used Can people tell if music in a particular style they hear is by a composer or by machine? There is literature on the notion of musical intelligence – not only composition in the western tradition, but musical ability in general. See for example Intelligence in traditional music Simha Arom in “What is intelligence?” Jean Khalfa (ed), Cambridge UP.

Alan Smaill Music Informatics Jan 29, 2018 4/1

slide-5
SLIDE 5

T H E U N I V E R S I T Y O F E D I N B U R G H

Cope

Cope has written extensively about the area of machine composition and the associated philosophical debates. His web site is a good place to find out the sorts of things he has been involved in: http: // artsites. ucsc. edu/ faculty/ cope/ In particular, books:

  • 1991. Computers and Musical Style. Madison, WI: A-R

Editions.

  • 1996. Experiments in Musical Intelligence. Madison, WI: A-R

Editions.

  • 2005. Computer Models of Musical Creativity. Cambridge,

MA: MIT Press

Alan Smaill Music Informatics Jan 29, 2018 5/1

slide-6
SLIDE 6

T H E U N I V E R S I T Y O F E D I N B U R G H

The approach

His approach is a mixture of hand-crafted grammars to capture the structure associated with particular style (eg Bach 2 part invention), and machine analysis of local repeated patterns that are used in generating new music. The mark of the composer (or composers) is in the local stylistic markers, not in the structure which is more generic. The patterns here are called signatures. This is yet another version of musical similarity, which again involves various decisions as to how this is defined.

Alan Smaill Music Informatics Jan 29, 2018 6/1

slide-7
SLIDE 7

T H E U N I V E R S I T Y O F E D I N B U R G H

Augmented Transition Networks

The grammar formalism used here is that of ATNs (Augmented Transition Networks), which were developed for natural language analysis. This is a version of finite-state automaton. A graph shows states labelled with grammar categories, and directed edges also labelled. There are a number of such graphs, one for each grammar

  • category. Also special states:

the start state accepting state(s) This defines a language by looking at the possible paths from the initial state to an accepting state, where an edge labelled with a category calls this process recursively with the appropriate graph (or takes a symbol from a given class).

Alan Smaill Music Informatics Jan 29, 2018 7/1

slide-8
SLIDE 8

T H E U N I V E R S I T Y O F E D I N B U R G H

Simple example

Which strings made from “e”, “0”, “1” are accepted/generated by this finite state automaton? (Initial state is q0, final states are q1,q5.)

q0 q2 q1 q3 q4 q5

e e 1 1 1 1

Alan Smaill Music Informatics Jan 29, 2018 8/1

slide-9
SLIDE 9

T H E U N I V E R S I T Y O F E D I N B U R G H

Examples

See natural language and musical examples that follow. (Here a single graph is used, things can get more complicated.) Examples from “Computers and Musical Style”, pp 62–65. The formalism is known as Augmented Transition Network.

Alan Smaill Music Informatics Jan 29, 2018 9/1

slide-10
SLIDE 10

T H E U N I V E R S I T Y O F E D I N B U R G H

ATN: natural language

Alan Smaill Music Informatics Jan 29, 2018 10/1

slide-11
SLIDE 11

T H E U N I V E R S I T Y O F E D I N B U R G H

ATN: music

Alan Smaill Music Informatics Jan 29, 2018 11/1

slide-12
SLIDE 12

T H E U N I V E R S I T Y O F E D I N B U R G H

Learning grammars

To note in passing: Although Cope produces these by hand, there are techniques for learning grammars from sufficiently many examples; this is known as “grammar induction”. See for example: http: // pagesperso. lina. univ-nantes. fr/ ~ cdlh/ papers/ CIAA_ 2005_ long. pdf

Alan Smaill Music Informatics Jan 29, 2018 12/1

slide-13
SLIDE 13

T H E U N I V E R S I T Y O F E D I N B U R G H

Basic algorithm

In the case of Bach inventions, where a grammar is available that ensure the right form (2 voices, phrase structure, cadences, etc): Given two or more pieces in the chosen style: Find pitch motives Look for similarities between the motives, to build dictionary of signatures Classify the signature according to the grammar Pick from motives to fit the grammar

Alan Smaill Music Informatics Jan 29, 2018 13/1

slide-14
SLIDE 14

T H E U N I V E R S I T Y O F E D I N B U R G H

Signatures

A signature is a set of consecutive pitch intervals found in more than one work by the same composer; typically: 2–9 notes melodically generally not influenced by rhythm When looking for similarities, make use of assumptions of WTM eg, transpose into common key. The signature dictionary also records how frequently the signature occurs in the input pieces. There is a detailed account of the program specialised for inventions in “Computers and Musical Style”; it is written is lisp. It fits into the larger-scale composition framework.

Alan Smaill Music Informatics Jan 29, 2018 14/1

slide-15
SLIDE 15

T H E U N I V E R S I T Y O F E D I N B U R G H

Example Signatures

Here are four snippets associated belonging to the same signature (Computers and Musical Style p 151, from Bach Invention no 15):

  • Although these share the same rhythm, the signatures are primarily

given in terms of sequences of intervals.

Alan Smaill Music Informatics Jan 29, 2018 15/1

slide-16
SLIDE 16

T H E U N I V E R S I T Y O F E D I N B U R G H

Analysis and Generation

As Cope says: Composing phrases of language or music is quite different from analyzing them. Finding form in works of art, be they stories or compositions, is not difficult. The reverse . . . is not at all a simple matter. In other words, “grammatical” is usually not enough to ensure that the output makes any sense. It is not clear (to me) to what extent Cope’s programs nudge the result in particular directions, or how selective he is in discarding results on the basis of personal taste.

Alan Smaill Music Informatics Jan 29, 2018 16/1

slide-17
SLIDE 17

T H E U N I V E R S I T Y O F E D I N B U R G H

The EMI algorithm

See handout “Computers and Musical Style”, pp 152–157, for the steps involved in the construction of these pieces at that time. (Will add to course web page.) Notice that a lot of style-specific information is encoded, along with the structural (via grammar) and stylistic (via signatures) information.

Alan Smaill Music Informatics Jan 29, 2018 17/1

slide-18
SLIDE 18

T H E U N I V E R S I T Y O F E D I N B U R G H

Other possibilities

Cope looked for example at combining pieces from different traditions – eg based on Bach first prelude from the 48 preludes and fugues. (See on Cope’s EMI page.) Listen also to the Beethoven example, based on the slow movement from the Moonlight Sonata, where the signatures are gathered from other famous Beethoven sonatas (Appassionata, Pathetique, . . . ).

Alan Smaill Music Informatics Jan 29, 2018 18/1

slide-19
SLIDE 19

T H E U N I V E R S I T Y O F E D I N B U R G H

Music Turing Test

Cope took this round AI conferences, asking people whether they can tell the machine composition from the real things. It did well among those without a background in classical music, not so well with those who knew the styles better.

Alan Smaill Music Informatics Jan 29, 2018 19/1

slide-20
SLIDE 20

T H E U N I V E R S I T Y O F E D I N B U R G H

Summary

Machine stylistic imitation Grammar for structure, patterns for style, . . .

Alan Smaill Music Informatics Jan 29, 2018 20/1