Rules for Tools/clearenvironment()
clearenvironment()
SYNOPSIS
clearenvironment(struct Environment *environment, char all)
ARGUMENTS
`struct Environment *environment'
The environment to clear.
`char all'
Clear everything?
DESCRIPTION
This command instructs Bars&Pipes to delete all Tracks, Tools,
MIDI Events, etc., associated with the given environment. When
Bars&Pipes loads a song, it first calls this routine to clear the
song designated by the environment pointer.
If the second parameter, all, is set, `clearenvironment()' deletes
the system scale, chord, and rhythm lists and the sixteen PadTools
along with the song.
To erase the currently installed song, pass the functions pointer,
since this represents the currently installed environment.
If you write an Accessory that replaces the current song with a
new one (for example, MuFFy, the MIDI File Format converter,) call
(*functions->clearenvironment()) (functions,0);
(see clearenvironment()) to erase the currently loaded song before
installing a new one. Notice that MuFFy leaves the system chord,
scale, and rhythm lists intact.
SEE
See installenvironment(), loadsong(), savesong().