.48 volume envelope kills sample on Gxx command

Started by LPChip, August 05, 2007, 09:15:33

Previous topic - Next topic

LPChip

Full Version:
OpenMPT v1.17.02.48

Has the bug occured in previous versions? If yes, please specify version(s): (This option is optional, and doesn't need research. But in case you know...)
Yes. I tested it in .45 and .20.

Description of the bug:
It appears that when you have different instruments but the samples are the same, Gxx effect can cause your sample to be killed.

This happens when one instrument has a long envelope, while the other has a short one. If the long envelope plays past the end of the short one, and then a Gxx command is given with the instrument that plays a short envelope, it goes silent. In fact, you can't play anything with a Gxx command, regardless the length of that envelope.

I got an email from a friend at another forum who discovered this in a song from Unreal Tournament, so it Obviously works correctly in Impulse Tracker. It also plays good in XMPlay btw.

I made a testcase that shows this behavor.

http://files.lpchip.nl/temp/envelope-bug.zip

How often does it happen?:
Always

How to reproduce (step by step description):
Create a sample, with an instrument. Then give this instrument a long volume envelope.

Clone this instrument, and make the envelope shorter.

Place the longer envelope instrument and when it is past the short envelope's end, place that instrument with Gxx command.


How I think this should be solved:
I think it should check if the envelope is past its end, and if so, play from the beginning. Or maybe just see if the instrument is different, and regardless anything, play the envelope from the beginning. I guess IT does it that way too, based on how it was done in Unreal Tournament's Razer Back song.
"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

Saga Musix

» 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.