Contents page

Rules for Tools/Tracks


Tracks

In order to have a variable number of Tracks, Bars&Pipes uses a linked list of Track structures. With the variable `functions->tracklist' (see struct Functions), Bars&Pipe points at the top of the Track list. Most of the fields within the Track structure are used by the display routines, so they are of no interest. Rather than discuss the entire structure, we'll discuss just the fields you can use:

Each Track structure has three Clips embedded within it. The first, `track->clip', stores the sequence. The second, `track->cut', is used for cut and paste editing in the sequence display. The third, `track->undo', is used as the Undo buffer in the sequence display. `track->clip' also holds the name and notes strings for the Track.

The Track, with the variable `track->toollist', points to the list of Tools in the PipeLine. Also in the Track structure is the Track's sequence Tool, `track->tool'. Bars&Pipes inserts this Tool, which records and plays Events, in the list of Tools. If you scan the Tool list, you will always find `track->tool' in the middle, between the Tools on the input PipeLine and the Tools on the output PipeLine.

Two fields, `track->channelin' and `track->channelout' select the MIDI channels for the input and output Tools.

Finally, `track->mode' holds flags that determine whether the Track is in Record or Play, whether it is Mute, Through, or neither, and whether or not it is a RealTime Track. See struct Track.