Typical method:
- set speakers to maximum volume
- multiply signal in range -1 to +1 by fraction of maximum volume that is desired.
Typical method:
If you want to control the volume of the speakers use FEX: Control speaker volume.
The louder the signal, the more the rms value and hence the output of the speaker should be loud
If the signal is loud, the output is loud already without the need to control anything. Maybe you meant the opposite: For a loud signal reduce the volume level?
Another idea is to scale the signal to get the wanted RMS value.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!