001package music;
002class Transpose implements Event {
003 Event e;
004 double f;
005 public Transpose(Event e, double factor) {
006 this.e = e;
007 this.f = factor;
008 }
009 public void play() {
010 Music.scalePitch(f);
011 e.play();
012 Music.scalePitch(1.0/f);
013 }
014}
015