Example #1
0
 public List<Note> getAllNotes() {
   List<Note> notes = new ArrayList<Note>();
   for (MusicElement e : this.notes) {
     notes.addAll(e.getAllNotes());
   }
   return notes;
 }
Example #2
0
 public Fraction getTotalDuration() {
   Fraction duration = new Fraction(0, 1);
   for (MusicElement e : this.notes) {
     duration = duration.add(e.getTotalDuration());
   }
   return duration;
 }
Example #3
0
 /** 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);
   }
 }