ModPlug Central

OpenMPT Development (Archive) => Bug Reports => Bug Report Archive => Topic started by: LPChip on August 05, 2007, 09:15:33

Title: .48 volume envelope kills sample on Gxx command
Post by: LPChip on August 05, 2007, 09:15:33
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.
Title: .48 volume envelope kills sample on Gxx command
Post by: Saga Musix on April 14, 2008, 18:53:56
this one should also be fixed.