Performance.SetMasterVolume
![]() |
The SetMasterVolume method sets the master volume of the performance. The master volume is an attenuation factor applied to the volume of the entire performance, relative to the default volume of the segment.
[object.]SetMasterVolume iVolume, [iDuration]
Parts
object
Optional. Object expression that resolves to a Performance Object. If omitted, the default performance is used.
iVolume
Required. Integer that specifies the attenuation factor, in hundredths of a dB, to apply to all sounds in the performance. This value must be in the range from -9600 to 0. The actual precision of volume changes is about 75 hundredths of a dB.
iDuration
Optional. Integer that specifies the duration, in milliseconds, over which the volume change occurs.
Remarks
This method should not be called while a previous master volume change with duration is still in process.
Calling SetMasterVolume with a value of 0 dB will make most content louder; 0 dB is normally meant to have no effect, but instead it causes all note velocities to increase to 127. Thus 0 dB causes everything to play at maximum volume, and from this point negative values decrease the volume until -9600, which is equal to silence.
Volume changes using a duration do not always occur smoothly, and the precision of volume adjustments isn't precise down to hundredths of a dB as indicated in the interface.
See Also