Render volume level

Started by herodotas, March 06, 2025, 20:07:49

Previous topic - Next topic

herodotas

Hello,
Why I can't get the same volume level after I render track to sample. Result is always quieter. What I do wrong?
life is darker than it seems

peterpiper0815

I'm a bit confused about the levels too (well Routing / Gainstaging in general)

From what I know the level when you hit a key in the SAMPLE tab is related to the slider 'Sample Volume' in the GENERAL Tab.

BUT

There is a setting in -> Setup Menu -> General Tab -> No loud sample preview.
Depending on this setting you can enable/disable this relation (set = volume depends on Sample Volume Slider, unset = volume is played at max level 0dB)

In my case many VST(fx) are involved (I build myself a kind of mixer with a few EQs, Compressors, Reverb that are routed serial and then end up in a limiter) so the issue might be there. Have to dig deeper into the routing.

A kind of schematic / routing diagram of OpenMPT would help to understand ;D

Saga Musix

#2
Stream Export (and that includes rendering to sample) always renders out the played data at exactly the same level as you would hear it during life playback.

However, when you load that exported stream back into the sample editor, it will, like any other sample, play at the configured sample pre-amp volume, as peterpiper0815 said. The sample pre-amp is usually way below 0dB because otherwise your sound would clip instantly as soon as more than one sample plays at the same time.

There's a lot of variables involved but I think the routing is pretty much straight-forward. Technically there really isn't any routing to speak of, all sample-related volumes are just multiplied with each other:

Final sample volume = Note volume * global sample volume * global instrument volume * channel volume * global volume * sample pre-amp
The same formula applies to OPL notes, except that they are multipled by the synth volume instead of the sample pre-amp. Note that OPL volumes are linear rather than logarithmic, so everything up to (and includling) the channel volume is logarithmic. Global volume and sample pre-amp are applied to the final mixed output, so they are linear just like with samples.

Of course if you route the sample through a plugin, then the result is multiplied by the plugin's gain factor as well. In this case it's also worth noting that the global volume is technically applied last, after going through any plugins. This distinction mostly matters for instrument plugins or plugins that otherwise add any sound to the incoming signal.

When using instrument plugins, their output is multiplied by the plugin gain factor as well as the synth volume value.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

herodotas

#3
Quote from: Saga Musix on March 07, 2025, 17:44:12Stream Export (and that includes rendering to sample) always renders out the played data at exactly the same level as you would hear it during life playback.
But during life playback, meter show me -0.3 dB, rendered sample plays on -8.9 dB, all volume controls default, no plugins, except "Youlin loudness meter 2 free" on master, MPTM format.
Any way I can set settings, which give me the same loundness?   

P.S. I tried record output of OpenMPT to Audacity, I got the same -0.3 dB, but sample played back in tracker anyway shows -8.9dB ???
life is darker than it seems

Saga Musix

Nothing of that contradicts what I or peterpiper0815 said, on the contrary: The rendered sample plays at a lower volume because the "sample volume" in the general tab is probably set to a value of about -8.6dB. If you are using mixmode RC3 (the default in MPTM files), a sample volume of 48 corresponds to -8.52dB (as hovering the sample volume slider will tell you), so if you're working with an MPTM file and didn't touch the sample volume slider, that would perfectly explain the exact reduction in volume you observe.

If you need to be able to play a sample at exactly 0dB, there are two ways:
  • Set the sample volume to 128. To compensate for the much louder sample playback, multiply each sample's global volume (or each sample-based instrument's global volume alternatively) by 0.375 (e.g. a global volume of 64 will be reduced to 24). Only the exported sample's global volume should stay at 64 so that it plays at 0dB.
  • Compensate for the -8.52dB attenuation by playing multiple instances of the sample adding up to the same amount. For this you need to compute inverse of the attenuation factor, in this case 128 / 48 = 2⅔.... This means that to play the sample at 0dB volume, you need to play two notes of the sample at full volume, and a third one at 64 * ⅔ = v42.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

herodotas

Thanks, but why is not works like in others DAW's, because old tracker architecture?
life is darker than it seems

Saga Musix

More or less. It's something that cannot be changed easily because it has implications beyond just choosing different default volume levels (e.g. available precision of volume commands in particular when files are played back with other software).

You can work around it by setting the sample volume to 128 for MPTM files (e.g. create a template module which has this pre-configured) or 256 for IT files, but then you have to be prepared to lower the volume of each individual instrument that you load.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.