class ScoreCreationInfo { public: Rogus_McBogus* r; ScoreCreationInfo(Rogus_McBogus*, FiledataPtr f); ScoreCreationInfo(Rogus_McBogus*, uint2 div); ~ScoreCreationInfo(); err_ind addTrack(const char* t, ioref n); int addRemainingTracks(ioref n); int addRemainingTracksAndLookupNodenames(); void addMidiMsg(const MidiMsg& m); void addFunction(void (*func)(void*, ScorePlayer*), void* v, ScheduleTime t); };
ScoreCreationInfo (Rogus_McBogus*, FiledataPtr f)
ScoreCreationInfo (Rogus_McBogus*, uint2 div)
div
is the number of ticks per quarter note. (Use a MIDI tempo message to
specify the number of microseconds per MIDI quarter note, thus setting
a relationship between ticks and real time. If no MIDI tempo message
is present, the tempo defaults to 500000, which is 120 bpm.)
~ScoreCreationInfo ()
err_ind addTrack(const char* t, ioref n)
node
member initialized to n
.
Returns no_err
if a track named t exists, and
err
if it does not. It is not an error to add the same
track more than once, although it has no effect.
int addRemainingTracks(ioref n)
addTrack()
to be added to the Score which will be created
from this ScoreCreationInfo. All the MidiMsgs added from these tracks
will have their node
member initialized to n
.
Returns the number of tracks which addRemainingTracks
added. (i. e. the number of tracks which had not already been
added.) Calling addRemainingTracks
additional times will
return zero and have no effect.
int addRemainingTracksAndLookupNodenames()
addTrack()
to be added to the Score which will be created
from this ScoreCreationInfo. For each track,
addRemainingTracksAndLookupNodenames
will use
oap->output_refnum()
to attempt to find a node which
has the same name as the track. If such a node exists, the
node
member of each MidiMsg in the track will be
initialized to that node; otherwise it will be initialized to the
default node. Returns the number of tracks which
addRemainingTracksAndLookupNodenames
added. (i. e. the number of tracks which had not already been
added.) Calling addRemainingTracksAndLookupNodenames
additional times will return zero and have no effect.
void addMidiMsg(const MidiMsg& m)
m
to be added to
the Score produced from this ScoreCreationInfo. All of the members are
assumed to be already initialized; none of the members are changed.
The time
member is interpreted to be a time in units of
ticks, and determines where in the Score the MidiMsg will be inserted.
void addFunction(void (*func)(void*, ScorePlayer*), void* v, ScheduleTime t)
func
to be added to the Score
produced from this ScoreCreationInfo. func
will be called
with v
and a pointer to the ScorePlayer playing the
Score. The function is inserted into the Score at the time
t
, where t
is in units of ticks.