Sarah Smith - Project Page

Music 220C, Spring 2012

 

General Project Description (Name TBD):

My project for this quarter is a real time system for algorithmic counterpoint. The system takes an audio input (in this case cello) and generates upper voices in good counterpoint. For the final project I am hoping to generate 2 upper voices above the cello line in real time: one in first species and another in second species. In order to do this, it may be necessary to make some assumptions regarding the input line (i.e. Tonal, Length of line) due to some of the rules relating to how things must end to remain in good counterpoint. While the real time generation of the two lines is the core of the system, I would ideally like to make it into a performance system that could be more interactive and allow the cellist to play something other than the bass line. One possible implementation of this would be to assume that the bass line continues to repeat and then allow the performer to add their own line/embellish the bass line as desired without interfering with the counterpoint engine.

 

Weekly Updates:

04/18/2012 - Week 2 & 3

-         Work this week was divided between two areas. First, I spent some time reworking the code from DuetYourself to only include the functionality that I would like to expand upon for this project (the additional generated tonal line) and removed some of the other functionality from this version. I also tested the pitch tracking with a cello input (it didn’t work…) and started working on ways to fix this issue. I am hoping that by using a longer input buffer (needed for low pitches) and moving the calculations (currently an autocorrelation) into the frequency domain I can improve the accuracy. If this doesn't work, some additional filtering may be needed to distinguish the fundamental from the harmonics, but hopefully the longer buffer will be sufficient to still do this computation in real time. In order to facilitate testing of this system, I am also working on adding the option of using a wav file as input per Chris' suggestion. This is not fully implemented yet, but is in the works. I also recorded some sample melody lines on the cello that can be used for testing purposes.

-         The second portion of work this week was devoted to trying to bring myself up to date on the existing literature regarding algorithmic counterpoint. Somewhat surprisingly, I did not find much at all on methods for doing this in real time. Almost all of the literature approached the problem as harmonizing with a given bass line, where the entire bass line is known in advance. Most of this research involved either a genetic algorithm or a forward working method of generating melody options, combined with some sort of scoring system to rank the possible outputs. In contrast to this area of literature, there has also been some work done on using Markov models to complete the task, which seems more applicable to the real time application that I envision.

-         Finally, the overall project design was fleshed out with more specifics regarding what I would like to be able to implement this quarter.

-         For next week, I hope to finish the baseline code with working pitch tracking, wav file input, and include the option to have more than one generated counterpoint voice. I would also like to use the time to decide on how I want to implement the counterpoint problem in my system.

04/07/2012 - Week 1

-         This week I decided on the general project area (algorithmic counterpoint) and laid out a general vision for what I would like the final project to look like. I think it should be a real time performance tool that will take audio input (from my cello for the current purposes) that will be used as a base line for the counterpoint. The system will then attempt to generate upper lines (hopefully 2 of them) in good counterpoint with the input.

-         In considering the scope of the project, It is likely that I will need to place some constraints on the input bass line (such as restricting it to cadence at the downbeat of every 8 bars, and remain within a single key), though I don't yet know exactly what these will be.

-         The system will be based partially on work I did in the fall quarter for music 256a developing a system that could generate a consonant counterpoint line for a given input, although it was not strict counterpoint, and did not generally result in a particularly musical output. For more information see DuetYourself.

-         For next week, I plan to work on revising the relevant parts of DuetYourself to create a baseline set of code for this project. In particular, I want to add the ability to read in audio from a file instead of the live microphone input, for use in development. Related to this, I also want to record a few selections of cello playing that can be used as test inputs to the system. Finally, I want to look more into the existing work in this area (of which there seems to be a lot) to figure out how to go about the counterpoint generation.