Score


A Score represents a sequence of MIDI messages which may be played by a ScorePlayer. A Score can be created by reading it from a file, or by creating it from a Recorder.

class Score {
public:
  typedef PerChannel<Bool> ChannelUseMap;
  typedef UtilPtr<ChannelUseMap> ChannelUseMapPtr;

  Score(Rogus_McBogus*);
  Score(Rogus_McBogus*, const Filedata*);
  Score(Rogus_McBogus*, const Recorder*);
  Score(const ScoreCreationInfo*);
  int getNumEvents() const;
  ScoreTime getLength() const;
  ChannelUseMapPtr getChannels() const;
};
Score(Rogus_McBogus*)
This constructor creates an empty Score, which does nothing when played. Since there is currently no way to modify a Score, this is not very interesting.
Score(Rogus_McBogus*, const Filedata* f)
This constructor creates a Score from the data in f. The data from f is copied, so the user can free f anytime after the constructor returns. (This is why a UtilPtr is not needed.)
Score(Rogus_McBogus*,const Recorder* r)
This constructor creates a Score from the data in r. The data from r is copied, so the user can free r anytime after the constructor returns. (This is why a UtilPtr is not needed.) r can continue to be used for recording data, but any new data recorded will not be reflected in this Score.
Score(const ScoreCreationInfo sci*)
This constructor creates a Score from the information specified by sci. The data from sci is copied, so the user can free sci anytime after the constructor returns. (This is why a UtilPtr is not needed.)
int getNumEvents() const
This member function returns the total number of events in the Score.
ScoreTime getLength() const
This member function returns the total time length of the Score when played at the default speed.
ChannelUseMapPtr getChannels() const
This member function returns all of the channels which the Score uses for each node.