public List<Note> getAllNotes() { List<Note> notes = new ArrayList<Note>(); for (MusicElement e : this.notes) { notes.addAll(e.getAllNotes()); } return notes; }
public Fraction getTotalDuration() { Fraction duration = new Fraction(0, 1); for (MusicElement e : this.notes) { duration = duration.add(e.getTotalDuration()); } return duration; }
/** Changes the duration of each of the notes by dividing by the type */ public void divideNoteDuration(int i) { for (MusicElement e : notes) { e.divideNoteDuration(i); } }