Transposer


A Transposer is a subclass of MidiFilter which can move a score up or down by a specified number of halfsteps. Transposers are immutable.

class Transposer : public MidiFilter {
public:
  Transposer(int);
  void filter(MIDI_msg*) const;
  virtual void apply(State*) const;
  virtual void unapply(State*) const;
};
Transposer(int t);
This creates a Transposer which transposes up (or down, if negative) by t halfsteps. t must be between +64 and -64, inclusive.
void filter(MIDI_msg* m)
This member function transposess m.
void apply(State* s)
This member function modifies s to the state it would be if the Transposer was applied, assuming it was not applied before.
void unapply(State* s)
This member function modifies s to the state it would be if the Transposer was not applied, assuming it was applied before.

Modified 11 January 1996 pepellet@mit.edu