Setting and Retrieving Global Parameters

By using the IDirectMusicPerformance::SetGlobalParam and IDirectMusicPerformance::GetGlobalParam methods, you can set and retrieve certain parameters that affect the entire performance rather than a single track.

The parameter to be set or retrieved is identified by a GUID in the rguidType parameter of the method. Each parameter is associated with a particular data type, whose size is given in the dwSize parameter. The predefined GUIDs and their data types are shown in the following table.

Parameter type GUID (rguidType)
and Data (*pParam)
Description
GUID_PerfAutoDownload
BOOL
This parameter controls whether instruments are automatically downloaded when a segment is played. By default it is off. See Downloading and Unloading Bands.
GUID_PerfMasterTempo
float
The master tempo is a scaling factor that is applied to the tempo by the final output tool. By default it is 1. A value of 0.5 would halve the tempo, and a value of 2.0 would double it. This value can be set in the range DMUS_MASTERTEMPO_MIN to DMUS_MASTERTEMPO_MAX.
GUID_PerfMasterVolume
long
The master volume is an amplification or attenuation factor, in hundredths of decibels, applied to the default volume of the entire performance. The range of permitted values is determined by the port. Legacy hardware MIDI ports do not support changing master volume.
GUID_PerfMasterGrooveLevel
char
The master groove level is a value that is always added to the groove level established by the command track. The resulting value is adjusted, if necessary, to fall within the range 1 to 100.

Applications can also use custom types of global parameters. To create a new type, simply establish a GUID and a data type for it. When the parameter is set, the performance allocates memory for the data, and contents of this memory can be retrieved by a call to IDirectMusicPerformance::GetGlobalParam.