Fugueomatic

Links/Resources

The Blurb from Music HackDay Boston (http://musichackdayboston.pbworks.com/Fugueomatic):

Team 

Russell Hanson, who wanted more badass fugues!!

Description 

Fugues are pieces of music that follow a certain set of rules and a number of voices come in, like a "round", and end up in somewhat different places than where they start out, all the while following a fairly strict and established form. 

Many composers find it very difficult to write fugues, and computers are good at doing difficult "programmatic" things, like follow strict rules, and write fugues to midi files.  Thus was born Fugueomatic!! 

Download

Fugueomatic: http://russellhanson.com/web/Fugueomatic.html

Tagline

Fugueomatic writes automatic fugues!  You press the Fugueomatic button, and the fugues come out. 

Tools, Platforms and APIs Used 

jMusic, info on the web about fugues

http://jmusic.ci.qut.edu.au/

http://www.youtube.com/watch?v=idhHq1mn1XA

http://www.classicalmidiconnection.com/cgibin/x.cgi/mid/bach/bwv548b.mid

http://www.classicalmidiconnection.com/cmc/bach.html

http://www.ibm.com/developerworks/java/library/j-camusic/ - Cellular automata and music

 

References

[1] David Cope, A Musical Learning Algorithm Computer Music Journal Fall 2004, Vol. 28, No. 3, Pages 12-27 Posted Online March 13, 2006. (doi:10.1162/0148926041790685).
[2] Daniele P. Radicioni and Roberto Esposito. Tonal Harmony Analysis: A Supervised Sequential Learning Approach in AI*IA 2007: Artificial Intelligence and Human-Oriented Computing R. Basili and M.T. Pazienza (Eds.): AI*IA 2007, LNAI 4733, pp. 638-649, 2007.
// Russell Hanson@Music Hack Day Boston 11/22/09
// http://musichackdayboston.pbworks.com/Fugueomatic
// Step 1: make a fugue out of the Daisy motif
// Step 2: manufacture new motifs and make fugues out of them

// File: Daisy.java 

import jm.JMC;
import jm.music.data.*;
import jm.music.tools.*;
import jm.util.*;

public class Daisy implements JMC {

    public static void main(String[] args){
	new Daisy();
    }
    public Daisy() {

	int[] pitches = { C5, A4, F4, C4, D4, E4, F4, D4, F4, C4 };
	double[] rhythmValues =
	    {
		DOTTED_HALF_NOTE,
		DOTTED_HALF_NOTE,
		DOTTED_HALF_NOTE,
		DOTTED_HALF_NOTE,
		QUARTER_NOTE,
		QUARTER_NOTE,
		QUARTER_NOTE,
		HALF_NOTE,
		QUARTER_NOTE,
		2 * DOTTED_HALF_NOTE };
	Note[] notes = new Note[pitches.length];
	for (int i = 0; i < notes.length; i++) {
	    // A note is made up of a pitch and duration
	    notes[i] = new Note(pitches[i], rhythmValues[i]);
	}
	// A phrase is made up of notes
	Phrase phrase = new Phrase(notes);
	Part pianoPart = new Part("Piano", PIANO);
	// A part is made up of phrases
	pianoPart.add(phrase);
	// A score is made up of part(s)
	int tempo = 180;
	Score daisy = new Score("A Bicycle Built For Two", tempo, pianoPart);
	// In key of F: 1 flat
	daisy.setKeySignature(-1);
	// In 3/4 time
	daisy.setNumerator(3);
	daisy.setDenominator(4);
	// Display score in standard musical notation
	View.notate(daisy);
	// Write out score to MIDI file
	Write.midi(daisy, "/Users/russell/Fugueomatic/daisy.mid");

    }

}