Multi-tasking Maestro File Player
by Crosbie Fitch and Alan Wrigley

This is the complete AutoPlay application from Volume 5 Issue 3.

AutoPlay enables you to play Maestro files (type &AF1) without having to load Maestro itself - there are two example tunes provided on the disc (see later). The application is multi-tasking, so the tunes will continue to play while you are performing other tasks. Tunes can be played singly or in a sequence. When run, the application places an icon on the icon bar. Clicking Select over this icon opens a window which displays the names of up to eight tunes which will form the sequence to be played. Initially this display will be empty.

Dragging any Maestro file to the icon bar icon, or double-clicking on the file once AutoPlay has been installed, will place the name of that tune in the next available slot in the window. If it is the first tune to be displayed, the file will be loaded and the music will start playing. Further names can be inserted into the slots in the window by dragging or double-clicking, and these tunes will be loaded and played in turn as the previous one finishes. An icon at the right hand side of the window indicates which tune is currently playing. Up to eight tunes can be specified at any one time.

If the Repeat icon at the bottom of the window is currently on (i.e. the sprite is shown as selected), when the last tune in the sequence has been played the whole sequence will be repeated from the start.

Double-clicking over any of the tune names displayed in the window will halt the currently playing tune and re-start the sequence from the tune which has just been selected.
 
The icon bar menu has five options. Info and Quit perform their usual functions, while Clear clears the entire sequence from the window and stops playing the tunes. Pause, which is greyed out unless a tune is currently playing, allows you to pause the tune temporarily. The indicator on the right-hand side of the window changes to show that the tune has been paused. Continue, which is greyed out unless a tune is currently paused, allows you to restart from the point at which the tune was paused.

The program works by sending one complete bar to the sound channel during poll loops. This means that if you are performing a task which temporarily takes over the processor, such as extended disc operations, or if you leave the Desktop altogether, the tune will pause at the end of the next bar until the processor is free again.

It is also possible to drag a text file (type &FFF) to the AutoPlay icon containing a list of the tunes you wish to include in the sequence. Each item in the list must consist of the full pathname of the Maestro file, and each item must start on a new line. Thus a typical file might look like this:
  
  adfs::HardDisc4.$.Music.Tunes.Allegro
  adfs::HardDisc4.$.Music.Tunes.Sonata
  adfs::HardDisc4.$.Music.Tunes.Symphony
  
and so on. A sample file called TuneList is included in the !Tunes application (simply choose the Tunes option from the RISC User menu to access it).