1 package com.jamesbryangraves.bob.music; 2 3 import java.util.ArrayList; 4 import java.util.Collection; 5 6 public class Phrase { 7 8 public Collection<MusicEvent> generateEvents(MusicEventGenerator generator, MusicContext musicContext, long tick) 9 throws Exception { 10 ArrayList<MusicEvent> musicEvents = new ArrayList<MusicEvent>(); 11 for(int i = 0; i < musicContext.getPhraseSize(); i++) { 12 musicEvents.addAll(generator.generateEvents(musicContext, tick)); 13 tick += musicContext.getTicksPerBar(); 14 } 15 return musicEvents; 16 } 17 18 19 }