# How Do I Play a Musical Score?

Playing a musical score can be done as follows:

1. Use commercial sequencers to compose the score, and then export it as a Format 0 or Format 1 MIDI file.

2. Create a PIMap text file that maps MIDI program numbers to AIFF sample files or ARIA instrument files.

   The PIMap text file is required so that the score player knows what to do when it encounters a MIDI program change command.

3. Load the score into Juggler Objects called Sequences and Collections.

   Sequences are arrays of events. In this case, the events are MIDI commands with time stamps. The Collections hold multiple Sequences that are played in parallel.

4. Once the score is loaded, you can start it playing by calling `StartObject()`.

   There are a number of things you can do with a score while it is playing. You can mute tracks, change the tempo, or pause. You can also request that callback functions be called when the score starts, repeats or stops. You can use these to chain together multiple score fragments for interactive score playing. See CoalRiver.c for an example.

### For More Information

PIMaps are explained in Playing Instruments.

See Playing MIDI Scores, for programming details.

For an example of playing a musical score, see the example program playmf.c.