Author Topic: 1.17.02.52 Random-Volume bug  (Read 3751 times)

Offline Harbinger

  • Extreme artist
  • *****
  • Posts: 1,137
  • Gender: Male
  • Operating System: Windows XP
1.17.02.52 Random-Volume bug
« on: March 13, 2009, 23:23:09 »
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.
« Last Edit: January 07, 2012, 20:10:42 by Jojo »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,303
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
.52 Random-Volume bug
« Reply #1 on: March 14, 2009, 00:18:21 »
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.

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 707
.52 Random-Volume bug
« Reply #2 on: March 15, 2009, 21:55:30 »
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.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,959
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
.52 Random-Volume bug
« Reply #3 on: March 16, 2009, 11:00:01 »
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

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 707
.52 Random-Volume bug
« Reply #4 on: March 16, 2009, 19:31:29 »
Quote from: "LPChip"
It behaves the same in Impulse Tracker.

Thanks. As there seems to be nothing buggy here, I'll close the report.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,303
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: .52 Random-Volume bug
« Reply #5 on: September 19, 2011, 21:34:17 »
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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,303
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: [ASSIGNED] 1.17.02.52 Random-Volume bug
« Reply #6 on: September 19, 2011, 23:38:00 »
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.

Offline Harbinger

  • Extreme artist
  • *****
  • Posts: 1,137
  • Gender: Male
  • Operating System: Windows XP
Re: [PENDING] 1.17.02.52 Random-Volume bug
« Reply #7 on: September 23, 2011, 14:28:24 »
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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,303
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: [PENDING] 1.17.02.52 Random-Volume bug
« Reply #8 on: September 23, 2011, 15:27:05 »
That's approximately how it works.
In ITTECH.TXT, it says...
Quote
FV = 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.