# Playing Scores

## Streaming Audio versus Score Playback

Q: How are most artists implementing sound: using streamed CD music or by using MIDI?

A: The artists looks at the advantages of MIDI versus streamed music for their specific application. The advantages of MIDI are that it:

- More interactive. You can tweak the sequence, mute tracks, and so on
- Leaves the disc free for other accesses
- Can incorporate algorithmic elements for infinite variety
- Takes less disc space than streaming

On the other hand streamed audio can:

- Play any music with vocals, animal sounds, whatever
- Leave DSP pretty much free for sound effects
- Require less RAM than MIDI

## Score Files

Q: How can I create a 3DO-compatible score file?

A: The Music library score playing code reads standard MIDI files as input. You can create MIDI files with almost any commercial sequencer or music notation program. You then need to create a PIMap file that associates MIDI program numbers with 3DO instruments or samples. These are text files that can be created with the MPW editor. They consist of lines with program numbers followed by sample or instrument filenames. (See Music Library Calls, for more details.)

You can create samples using AudioMedia. Since AIFF is a standard format, there are many sources for sample files. The 3DO content library is a good source. We are also contracting for the development of 3DO instrument libraries.

The ARIA tool helps you edit PIMaps and play scores.

Q: How can I play my score on the 3DO Interactive Multiplayer?

A: Use the playmf.arm example program, which accepts a MIDI filename and a PIMap filename as input. You can adapt the source code included in the release to your application.

Note: This code is subject to ongoing development. Check the 3DO InfoServer (BBS) for the latest news.

Q: Can I control scores once they're playing?

A: Yes. The score should be as tightly coupled to application state as possible. You can make Juggler calls to mute various tracks as they play and to select alternative melodies based on application state. It is also possible to edit sequences while they are playing and to write custom score interpretation functions that are used by the Juggler for special purposes.

Q: What about simultaneous score play?

A: Simultaneous score play should be transparent under multi-tasking. Just be careful of the limits of the DAC amplitude, which is a maximum of 0x7FFF per left or right channel.

Q: How do scores interact with sound effects?

A: Scores are just sequences of arbitrary events which could be notes, sound effects, changes to sound effects currently running, graphics, or whatever. You can call `StartScoreNote()` to trigger sound effects within the score context. Then sound effects and notes from the score are dynamically allocated from the same pool. You also have full access to the Audio folio when playing scores.

## MIDI

Q: Can I use MIDI?

A: You can play MIDI on the 3DO Station from inside your program. The ARIA tool also makes real-time playback of MIDI files possible. Make the output of your favorite MIDI sequencer the input to ARIA, then play your MIDI files and hear them directly on the 3DO Station. There is no MIDI hardware port on 3DO.

Q: Is it possible to modify the characteristics of a MIDI PIMaps instrument. In particular I would like to set up a PIMap entry and somehow connect other instruments to that entry and tweak the knobs.

A: The problem is that the contents of the PIMap are Templates, not Instruments. The score player allocates instruments on the fly as required to play the score. It would be hard to intercept those and connect other instruments to them.

Q: Can MIDI File tracks be polyphonic?

A: Yes. Each individual MIDI File track can contain notes on up to 16 MIDI channels. On any given channel, the maximum number of voices is determined by which program sound is playing on that channel. The maximum number of voices for a program is set using the -m option in the PIMap file, or as a parameter to:

  `SetPIMapEntry(scon,ProgramNum,InsTemplate,MaxVoices,Priority).`

In a PIMap, for example:

  `7 flute.aiff -m 4 ; allows up to 4 part polyphony on the flute`