Exploring the Rules in Species Counterpoint

Similar documents
Title: Species Counterpoint Speaker: Scott Blasco Created by: Scott Blasco. online.wsu.edu

MELODIC AND RHYTHMIC EMBELLISHMENT IN TWO VOICE COMPOSITION. Chapter 10

Doctor of Philosophy

T Y H G E D I. Music Informatics. Alan Smaill. Feb Alan Smaill Music Informatics Feb /1

CHAPTER ONE TWO-PART COUNTERPOINT IN FIRST SPECIES (1:1)

SPECIES COUNTERPOINT

Outline The Study of Counterpoint from Joseph Fux s Gradus Ad Parnassum. Translated & Edited by Alfred Mann

Music 3753 Chant Project Instructions

Composing first species counterpoint with a variable neighbourhood search algorithm

Working with unfigured (or under-figured) early Italian Baroque bass lines

CPU Bach: An Automatic Chorale Harmonization System

Characteristics of Polyphonic Music Style and Markov Model of Pitch-Class Intervals

On Interpreting Bach. Purpose. Assumptions. Results

AUTOMATIC MUSIC COMPOSITION BASED ON COUNTERPOINT AND IMITATION USING STOCHASTIC MODELS

Palestrina Pal: A Grammar Checker for Music Compositions in the Style of Palestrina

Robert Alexandru Dobre, Cristian Negrescu

Proceedings of the 7th WSEAS International Conference on Acoustics & Music: Theory & Applications, Cavtat, Croatia, June 13-15, 2006 (pp54-59)

AP MUSIC THEORY 2006 SCORING GUIDELINES. Question 7

A Model of Musical Motifs

A Model of Musical Motifs

AP MUSIC THEORY 2011 SCORING GUIDELINES

AP MUSIC THEORY 2013 SCORING GUIDELINES

Calculating Dissonance in Chopin s Étude Op. 10 No. 1

NetNeg: A Connectionist-Agent Integrated System for Representing Musical Knowledge

AP Music Theory. Sample Student Responses and Scoring Commentary. Inside: Free Response Question 7. Scoring Guideline.

Practical Rules. Learning Composition Translated from a Work intitled GRADUS AD PARNASSUM JOHN JOSEPH FEUX. The Roman Emperor CHARLES VI

Introduction to Free Counterpoint. ( or Bach Style Counterpoint ) by Glen Halls All rights reserved.

Music Theory. Fine Arts Curriculum Framework. Revised 2008

AP MUSIC THEORY 2015 SCORING GUIDELINES

Chorale Completion Cribsheet

PRACTICE FINAL EXAM. Fill in the metrical information missing from the table below. (3 minutes; 5%) Meter Signature

Music Department Columbia University Ear Training Curriculum, Fall 2012 Sing and Play at the Piano Face the Music

Musical Acoustics Lecture 16 Interval, Scales, Tuning and Temperament - I

AP MUSIC THEORY 2016 SCORING GUIDELINES

Melodic Minor Scale Jazz Studies: Introduction

BIBLIOGRAPHY APPENDIX...

SCHEMATIZING THE TREATMENT OF DISSONANCE IN 16TH-CENTURY COUNTERPOINT

AP MUSIC THEORY 2010 SCORING GUIDELINES

Student Performance Q&A:

Melodic Pattern Segmentation of Polyphonic Music as a Set Partitioning Problem

AP Music Theory. Scoring Guidelines

AP Music Theory 2010 Scoring Guidelines

Analysis of local and global timing and pitch change in ordinary

MELONET I: Neural Nets for Inventing Baroque-Style Chorale Variations

43. Leonard Bernstein On the Waterfront: Symphonic Suite (opening) (For Unit 6: Further Musical Understanding)

Study Guide. Solutions to Selected Exercises. Foundations of Music and Musicianship with CD-ROM. 2nd Edition. David Damschroder

Outline. Why do we classify? Audio Classification

Workbooks for undergraduate counterpoint 1-4

Building a Better Bach with Markov Chains

CSC475 Music Information Retrieval

Student Performance Q&A:

Descending- and ascending- 5 6 sequences (sequences based on thirds and seconds):

Partimenti Pedagogy at the European American Musical Alliance, Derek Remeš

Virginia Commonwealth University MHIS 146 Outline Notes. Open and Closed Positions of Triads Never more than an octave between the upper three voices

Example 1 (W.A. Mozart, Piano Trio, K. 542/iii, mm ):

Lesson Two...6 Eighth notes, beam, flag, add notes F# an E, questions and answer phrases

Student Performance Q&A:

Student Performance Q&A:

Figured Bass and Tonality Recognition Jerome Barthélemy Ircam 1 Place Igor Stravinsky Paris France

AP Music Theory 2013 Scoring Guidelines

AP/MUSIC THEORY Syllabus

Author Index. Absolu, Brandt 165. Montecchio, Nicola 187 Mukherjee, Bhaswati 285 Müllensiefen, Daniel 365. Bay, Mert 93

Composing Fifth Species Counterpoint Music With A Variable Neighborhood Search Algorithm

Credo Theory of Music training programme GRADE 4 By S. J. Cloete

COURSE OUTLINE. Corequisites: None

ALGEBRAIC PURE TONE COMPOSITIONS CONSTRUCTED VIA SIMILARITY

AP Music Theory Syllabus

A probabilistic approach to determining bass voice leading in melodic harmonisation

melodic c2 melodic c3 melodic

AP Music Theory. Sample Student Responses and Scoring Commentary. Inside: Free Response Question 5. Scoring Guideline.

CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER 9...

Music Theory for the Church Musician: Analysis or Paralysis? Narrative Can Help

Curriculum Development In the Fairfield Public Schools FAIRFIELD PUBLIC SCHOOLS FAIRFIELD, CONNECTICUT MUSIC THEORY I

Divisions on a Ground

Consonance perception of complex-tone dyads and chords

All rights reserved. Ensemble suggestion: All parts may be performed by soprano recorder if desired.

Music Theory Courses - Piano Program

AP Music Theory Syllabus

AN ANALYSIS OF PIANO VARIATIONS

Music Theory Syllabus Course Information: Name: Music Theory (AP) School Year Time: 1:25 pm-2:55 pm (Block 4) Location: Band Room

Algorithmic Music Composition

NUMBER OF TIMES COURSE MAY BE TAKEN FOR CREDIT: One

AP MUSIC THEORY 2014 SCORING GUIDELINES

Past papers. for graded examinations in music theory Grade 6

INTERVALS Ted Greene

AP Theory Overview:


Take a Break, Bach! Let Machine Learning Harmonize That Chorale For You. Chris Lewis Stanford University

Melodic Outline Extraction Method for Non-note-level Melody Editing

A Planned Course Statement for. Music Theory, AP. Course # 760 Grade(s) 11, 12. Length of Period (mins.) 40 Total Clock Hours: 120

Readings Assignments on Counterpoint in Composition by Felix Salzer and Carl Schachter

Automatic characterization of ornamentation from bassoon recordings for expressive synthesis

Extracting Significant Patterns from Musical Strings: Some Interesting Problems.

Music Theory Fundamentals/AP Music Theory Syllabus. School Year:

POST-PROCESSING FIDDLE : A REAL-TIME MULTI-PITCH TRACKING TECHNIQUE USING HARMONIC PARTIAL SUBTRACTION FOR USE WITHIN LIVE PERFORMANCE SYSTEMS

Computational Parsing of Melody (CPM): Interface Enhancing the Creative Process during the Production of Music

HST 725 Music Perception & Cognition Assignment #1 =================================================================

AP Music Theory Course Planner

FREEHOLD REGIONAL HIGH SCHOOL DISTRICT OFFICE OF CURRICULUM AND INSTRUCTION MUSIC DEPARTMENT MUSIC THEORY 1. Grade Level: 9-12.

Cadence fingerprints

Transcription:

Exploring the Rules in Species Counterpoint Iris Yuping Ren 1 University of Rochester yuping.ren.iris@gmail.com Abstract. In this short paper, we present a rule-based program for generating the upper part of the first and second species counterpoint. Using this program, we explore the music space/list of the possible answers given a cantus firmus. In future works, we hope to combine rule-based methods and machine learning techniques in algorithmic composition. Keywords: Species counterpoint, music, rule-based, algorithmic composition 1 Introduction Counterpoint is the study of writing melody lines harmonically and rhythmically. Learning how to write counterpoint is required in music theory courses since the counterpoint has been commonly used in classical music, especially in Baroque music. In 1725, Johann Joseph Fux, an Austrian composer, published a book, Gradus ad Parnassum, to teach how to write the counterpoint. For this pedagogical purpose, he developed five species counterpoint of increasing complexity. In the species counterpoint, there is always a given melody (called cantus firmus) and students are supposed to write an accompaniment with several harmonic, melodic and rhythmic rules. Using this method of composing, the creative music writing process starts to resembles a logical/musical game and a dynamical system: to produce a good accompaniment melody, all students have to do is to combine the given information on the existing melody with certain rules. Within each species, there are two types of rules: melodic and harmonic. Melodic rules are those govern the development of the melodic accompaniment line students are writing. For instance, there is a rule that two notes in the line should not be too far away in pitch. Harmonic rules are those govern the relationship between the cantus firmus and the counterpoint. For instance, there is a rule that all notes in the first species have to form consonance intervals. More details will be given in the next section. Practically, one way to solve this puzzle systematically is to list all the harmonic candidates first, as shown in Figure 1, and then consider the melodic motion. To get the right melodic motions is essentially to find a path traversing the black notes with the constraint of the rules. Basically, we need to pick one note from the candidates in each bar and examine if there have been any

2 Iris Yuping Ren Fig. 1. The space created by harmonic(vertical) rules. The red notes are the cantus firmus. The black notes are the harmonic candidates. violations of the melodic rules. We implemented this process in the system to generate all possible answers. More details will be given in Section 3. Since this research is still in its initial phase, we only consider writing the first and second species when the cantus firmus is at the lower part. In [1], the authors just explored the first species using machine learning techniques and got interesting results. In fact, there have been many efforts been made on using machine learning techniques [1 4] to generate species counterpoint. However, there have been less efforts in developing a rule-based system since the job is tedious and requires a lot of computational power. One such system is PRAENESTE [5]. It implemented more comprehensive rules than our system, but did not looked into the size of space of the possible answers. Researches on counterpoint are important since the counterpoint has a fundamental role in classical music. Species counterpoint is particularly interesting because it reflexes the human efforts to summarise explicitly what rules are present in music, which are logical explanations on the human music creativity. Computers, on the other hand, excel at rules and logic but not yet as authentic in creating arts. Therefore, those rules are not only useful for music students, but also have the potential in directing machines to generate music more harmonically and rhythmically, and provide a platform for verifying the rules extracted by machine learning techniques. Eventually, we hope to integrate machine learning techniques with rule-based programming, two avenues for artificial intelligence, since, in human learning, we learn from experience and from explicit rules together all the time. Another purpose is to give clues on the magnitude of the music space when different rules are present. This would help us figure out the size of the data we need to perfectly deduce the rules in counterpoint using machines. More details will be given in Section 4 and Section 5. The structure of the rest of the paper will be as follows: first we give explicitly the rules we used in generate the musical lines; second, the structure of our system is given; next, we show the sample results of the generated music and the size of the constrained music space and give analysis on these results; in the last section, we re-emphasise our conclusions and discuss future works to be done. 2 Rules of Counterpoint Species There are many resources one could find about the counterpoint rules. We use the rules described in [6], which summarises the official book [7]. However, we

Exploring the Rules in Species Counterpoint 3 did find that there are rules from other sources which have more rules than our sources. In addition, we did not implement the soft rules in [7], which are only recommended instead of mandated. To make the paper self-contained and also show clearly which rules we actually implemented, in the following subsections, we give the lists of the rules for all species, the rules for the first species, and the rules for the second species. 2.1 Consideration for All Species The following rules are implemented in both the first and second species generator: Harmonic: The counterpoint must be in the same mode as the cantus firmus. Taken the interpretation from [6], practically, we open the piece with a unison, octave, or perfect fifth interval between the cantus firmus and the counterpoint. There is another rule that the opening should be an octave or unison when the cantus firmus is in the upper part, but since we just consider the case when the cantus firmus is in the lower part, this is not included. Melodic: Augmented fourths/tritones, sevenths, any interval greater than an octave, descending sixths whether major or minor, and ascending major sixths are the skips which are forbidden in the melody of the counterpoint. Melodic: Exposed tritones, the run of notes in a single direction which forms an augmented 4th from end to end, are forbidden in the melody of the counterpoint. Melodic: Leaps of an ascending minor sixth or octave, or a descending octave in the counterpoint melody must be recovered. Recovery here means that such a leap must be followed by a step back into the range covered by the leap. Melodic: Avoid repeated notes. Although in some cases this is not a hard rule, we still implemented this to see the effects of this rule. 2.2 First Species The rhythmic rule of the first species counterpoint is that there is only one counterpoint note for each cantus firmus note. The rules govern the pitch features are as follows: Harmonic: Dissonant intervals between the cantus firmus and the counterpoint are forbidden. Dissonant intervals include the minor second, major second, augmented fourth, and sevenths. Melodic: Parallel fifths and octaves are forbidden. Parallel intervals are the pattern that the interval formed by the counterpoint and the cantus firmus is a fifth/octave at time t and then again a fifth/octave at time t + 1. Harmonic: In the next to the last bar, there must be a major sixth if the cantus firmus is in the lower part.

4 Iris Yuping Ren 2.3 Second Species The rhythmic rule of the second species counterpoint is that there are two counterpoint notes (including a possible rest at the beginning) correspond to each cantus firmus note except the last note, where it is the same with the first species. The rules govern the pitch features are as follows: Harmonic: The first note in each bar (the note on the strong beat) must be consonant with the cantus firmus. Harmonic: The second note in a bar (the note on the weak beat) may be dissonant, but only if it is approached and left by a step. Melodic: Parallel fifths and octaves are forbidden. Harmonic: In the last three notes, we use the formula of a fifth, a sixth, and a octave above the cantus firmus. 3 The System The work-flow is shown in Figure 2. First, we create the cantus firmus using music scoring software like Musescore and Finale, then save the cantus firmus as.xml format. Second, the data is loaded to our main program. As described in Section 1, we select all the harmonic candidates for the first note, the mid notes, and last notes, and then run the melodic rules to sieve out the candidates which do not satisfy the rules. At the same time, we also create a log file which records what were the rules which are violated. In the end of the process, we record all the melodies which satisfy the rules into a single file. Out of the melodies, we select one randomly, display and output a midi file of the melody. Fig. 2. The work-flow of the program We use the music21 package [8] in python to build this system. All the interval and rhythmical calculations are done using the package. Our main contribution is to write the functions which generate harmonic candidates and examine the melodic rules.

Exploring the Rules in Species Counterpoint 5 Our system is not the most efficient, but the code is logical and easy to read, and therefore is more extensible and has more flexibility. Users can add in and change the rules easily as they want. This is important since, as we mentioned before, the sources for species counterpoint rules are not always the equivalent with each other. We plan to optimise the program and put it on Github if there is interest. 4 Results In this section, we show the sample results of the generated music and the size of the constrained music space and analysis these results. 4.1 First Species First species counterpoint follows the rules described in Section 2. Figure 3 shows an example of a first species counterpoint generated by our system. Fig. 3. Generated first species example. The cantus firmus is at the bottom. 4.2 Second Species Second species counterpoint follows the rules described in Section 2. Figure 4 shows a example of a second species counterpoint generated by our system. Fig. 4. Generated second species example. The cantus firmus is at the bottom.

6 Iris Yuping Ren 4.3 Space Size Analysis For first species counterpoint, because we have the one-to-one relationship between the cantus firmus and the counterpoint, the total number of answers of a five note long cantus firmus would be 12 5 = 248832 (only consider the 12 semitones in an octave); for a four note long cantus firmus: 12 4 = 20736; for a three note long cantus firmus: 12 3 = 1728. We can see that the growing pattern is exponential. Similarly for the second species counterpoint: for a five note long cantus firmus, 12 9 = 5159780352; for a four note long one, 12 7 = 35831808, and for a three note long one, 12 5 = 248832. It is also an exponential growth. In Table 1, we give the number of answers of cantus firmus of different length after considering all the rules in Section 2. The actual cantus firmus are shown in Figure 5. The rests of the shorter length ones are not in the input data to generate the counterpoint; they are here for aesthetic reasons. Fig. 5. Three cantus firmus of different length From Table 1, we can see that the rules are particularly effective when the length is small. This is intuitively right since the rules on the first note and the rules from the closing formula are very strict. We can also see that the exponential growth pattern is still there, but the space of constrained music is significantly smaller. Table 1. The size of the counterpoint answer space with varying length of cantus firmus species/length note length = 3 note length = 4 note length = 5 first species 12 60 143 second species 4 532 8030

Exploring the Rules in Species Counterpoint 7 4.4 Constraints In Table 2, we show the number of answers under the effect of different rules. The more eliminations there are, the more powerful the rule is and the violations of the rule are more likely, at least in our special cases provided in Figure 5. As expected, the rules regarding the first note and the last notes are the most powerful. The tritone rule is the weakest. The parallel fifth seems to eliminate more than the parallel octave rule. Forbidden skips, recovery and the step approach rules are very important ones since they are all hard-rules and very likely to happen. The repeat rule also eliminates lots of possibilities but since it is a soft rule, we need to decide on it case-by-case. Table 2. The size of the counterpoint answer space with varying rule components note length = 3 note length = 4 note length = 5 rules/species 1st species 2nd species 1st sp 2nd sp 1st sp 2nd sp first note 1296 165888 15552 23887872 186624 3439853568 forbidden skips 16 2 72 3358 465 35320 tritone run 0 1 0 0 1 1 recover 0 4 28 728 112 10438 repeat 0 0 22 1674 112 11616 step approach NA 6 NA 4388 NA 77480 parallel fifth 0 0 7 400 56 2186 parallel octaves 0 0 7 104 7 286 last notes 1296 248688 15552 35811072 186624 5156794368 For a music student, this table is suggesting that s/he should pay more attention to possible parallel fifth, forbidden skip, recovery and step approach in the second species. From another perspective, if one is to summarise the rules just from data, to get a reasonable confidence on the rules, one would need at least a large proportion of the numbers in the table. Similarly, for machines to learn, to perfectly learn the rules just from data, the magnitude of the data should be of similar magnitude to the numbers in the table. The mystery of how perception of acoustic dissonance and consonance helped Fux with summarising these rules are a yet unsolved one. 5 Conclusion and Future Works In this project, we created a first and second species counterpoint answer generator. We provide the numbers of answers for sample cantus firmus of different length and analyse the numbers: how are they meaningful computationally and musically. In future works, we would like to examine more samples and complete the third, fourth and fifth species counterpoint. Optimisation of the algorithms and

8 Iris Yuping Ren getting more computational power is also on the to-do list. Finally, our goal is to combine a machine learning system with the rule-based system and achieve an integrated intelligent system. Acknowledgments. Many thanks to my advisor at the University of Rochester and the encouragement from Valerio Velardo at the University of Huddersfield. References 1. Kamil Adiloglu and Ferda N Alpaslan. A machine learning approach to two-voice counterpoint composition. Knowledge-Based Systems, 20(3):300 309, 2007. 2. Eduardo Morales and Roberto Morales. Learning musical rules. In Proceedings of the International Joint Conference on Artificial Inteligence, 1995. 3. John Polito, Jason M Daida, and Tommaso F Bersano-Begey. Musica ex machina: Composing 16th-century counterpoint with genetic programming and symbiosis. In Evolutionary Programming VI, pages 113 123. Springer, 1997. 4. Andres Garay Acevedo. Fugue composition with counterpoint melody generation using genetic algorithms. In Computer Music Modeling and Retrieval, pages 96 106. Springer, 2004. 5. R Gjerdingen. Explorations in music, the arts, and ideas: Essays in honor of leonard b. meyer, chap. concrete musical knowledge and a computer program for species counterpoint, 1988. 6. Stoner Ian. Fux workbook. http://www.tc.umn.edu/ston0235/pdf/fux workbook 0.1.pdf, 2007. 7. Johann Joseph Fux. The study of counterpoint from Johann Joseph Fux s Gradus ad Parnassum. WW Norton & Company, 1965. 8. Michael Scott Cuthbert and Christopher Ariza. music21: A toolkit for computeraided musicology and symbolic music data. 2010.