Different rms values after loading with SamplerSound

Hello everyone,
I have a question that is driving me crazy, but possibly it is a really noob question. In my plugin I load a sound in SamplerSound object. After that when I play it in host (in my case Ableton), it sounds much more silent and its rms peak meter is much smaller in comparison to rms peak meter when I load the same sound directly into audio track. For an example, audio output from my plugin of given sound is around -9dB, where when loaded directly it produces around 0dB. This occurs for any sound I load into my plugin, where some sounds have even less dB from my plugin, but when loaded directly they have almost always around 0dB.
Why something like this happens, I have checked my code for possible gain and midi volume changes I’ve missed, but there are none. All sounds are normalised from -1.0f to 1.0f.
If somebody has any suggestion or advice, please let me know.

Thanks in advance,

2 things you didn’t mention:

  • Velocity - this is the MIDI volume of the actual note…
  • Stereo / Mono - Such conversion (or ignoring measure of one channel) could lead to wrong values.
  • Measurement: make sure your measurement code is working as expected. (and also how it treats stereo/mono).