import jm.JMC;import jm.music.data.*;import jm.util.*;/*** A class that creates cannonic pulse based music, in spades.* @author Benn Woods and Andrew R. Brown*/public final class FollowMusic implements JMC {	public static void main(String[] args) {		// repeat the whole compositional process serval times		for(int j=0;j<10;j++){					// create a score to hold the composition			Score s = new Score("Follow Music Demo "+j);						// create a phrase to hold the melody			Phrase phr = new Phrase(0.0);						// create a random walk melody			int pitch = C4;			for(int i=0;i<60;i++){				Note n = new Note(pitch,0.5, (int)(Math.random()*127));				phr.addNote(n);				pitch += (int)(Math.random()*10-5);			}						// copy and repeat the melody numerous times			for(int i=0;i<9;i++){				Part p = new Part("inst 1", XYLOPHONE, i);				Phrase tempPhrase = new Phrase();				tempPhrase = phr.copy();				tempPhrase.setStartTime((double)i/4.0+i*2);				p.addPhrase(tempPhrase);				s.addPart(p);			}						// save a MIDI file of the result			Write.midi(s, "FollowMusic"+j+".mid");						// display a visual score of the result			View.show(s, j*10, j*20);		}	}}