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();
Score(char*);
Score(const Filedata*);
Score(const ScoreCreationInfo*);
Score(const Recorder*);
~Score();
int getNumEvents() const;
ScoreTime getLength() const;
ChannelUseMapPtr getChannels() const;
};
Score()
- This constructor creates an empty Score, which does nothing when
played. Since there is currently to way to modify a Score, this is not
very interesting.
Score(char* f)
- This constructor creates a Score containing the data in the
standard MIDI file f. This is just a convenience function to save the
user from having to create a Filedata explicitly, but it does the same
thing.
Score(const Filedata* f)
- This contructor 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(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.)
Score(const Recorder* r)
- This contructor 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()
- The destructor destroys the Score.
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 virtual channels which the
Score uses for each node.
Modified 15 January 1996 pepellet@mit.edu