1.17.02.52 Random-Volume bug

Started by Harbinger, March 13, 2009, 23:23:09

Previous topic - Next topic

Harbinger

Full Version:
OpenMPT v1.17.02.52

Description of the bug:
In the .mptm format, Random Variation of Volume causes notes to slowly decrease in volume over the course of a long pattern, but only for notes that are not assigned an instrument (after a channel has been assigned an instrument).


How often does it happen?:
Always, given the right conditions, but randomly (not sporadically)

How to reproduce (step by step description):
To hear the bug, create a 128-row pattern in an .mptm song. Create an instrument with an attached sample, such as a kick bass. Set the Random variation slider to halfway or above to notice the difference in volume randomness. Step-record the note every other row in the pattern (8ths), but delete all instrument references to each note after the first row, so that only the first row assigns the instrument to the note. Now play it back. While there are variations in the volume, the notes tend to decrease in volume over time, sometimes rather quickly.

Shouldn't the randomness be acting on the original given volume rather than the previous adjusted volume? Check the Pan settings to see if this also occurs with those random variations.

Saga Musix

The system is actually that volume / panning / etc. is only reset when the instrument number is called. I wouldn't say that it's a bug if you leave out instrument numbers, because only those reset volume / panning / etc.
» 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.

Relabsoluness

Can someone tell if the behaviour differs from how IT-files are played in Impulse Tracker? If the behaviour is the same, this is not a bug.

LPChip

It behaves the same in Impulse Tracker.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Relabsoluness

Quote from: "LPChip"It behaves the same in Impulse Tracker.
Thanks. As there seems to be nothing buggy here, I'll close the report.

Saga Musix

Re-opening as LPChip's statement was not correct. Vol Swing and Pan Swing are added to the final volume / panning values, so they should always swing around the current volume / panning value, and not converge towards 0.
» 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.

Saga Musix

Volume swing should now be fixed here, when enabling more IT compatible playback.
A few words about the changes, as some of them might not be very obvious at first, but they really just reflect what Impulse Tracker does:

The random value is now multiplied with the sample's global volume. At full random variation (100%), this means that a value in the range [-64, 64] is added to the global volume, which is in the range [0, 64], and the result is clamped to the range [0, 64] again. What does that mean? Well, if the global volume of the sample is 64 (as it is in many cases), any "positive" swing value will have no effect, meaning that a lot of 64s will appear in that formula. This also means that you get the greatest dynamic range when it comes to random variatio if you set the sample's global volume to 32.
» 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.

Harbinger

So, given the original premise, it sounds like you are saying this drift towards 0 is no longer present for non-instrumented notes, since the random volume is not applied to the most recent calculated note volume. Therefore, if i call notes without an instrument designation on them, the code, i assume, recalls the last instrument called in the channel, finds the sample associated to that instrument to that note, gets the sample volume and calculates a new random volume from that, then processes the note at that volume?

Good. I'll fix that paragraph in the OHM (CHM) and qualify the behavior with IT Compat mode. (Hmm, i,ll need to write that up in the Compatibility tables too...) Don't forget to fix that in the source docs if you wish... 8)

Thanks, Jojo.

Saga Musix

That's approximately how it works.
In ITTECH.TXT, it says...
QuoteFV = Vol * SV * CV * GV / 262144
Where Vol is the combination of default volume, volume effects, etc..., SV is the Sample's Global Volume + Random Vartion, CV is Channel Volume, GV is Global Volume. MPT previously added Random Variation to Vol instead of SV, so it was being "transferred" between non-instrument notes.
» 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.