Envelope Tool issue

Just wanted to report a little bug/solution.

System:

  • Using Audacity 2.0.5 (installed with audacity-win-2.0.5.exe)
  • Windows XP Professional, Service Pack 2 (5.1.2600)
  • Processor: x86 family 6 Model 22 Stepping 1
  • Video: Intel(R) 82945G Express

Problem:
If there is a label track above the audio track, the “envelope tool” has a strange behaviour when I try to “grab” the nearest (or to set a new) envelope point with the mouse on. The problem appears only for the track (channel, /normally it’s a left channel for a stereo track/) below the label track.

Solution:

  1. If you work on a mono track, move the label track below the audio track and everything works great.
  2. If you work on a stereo track, set the envelope points on the right channel.
    screenshot.png

Yes, that’s a bug, and I think that you’re the first person to report it.

Not really a “solution”, but a work-around. Hopefully the problem can be fixed in the next version so that a workaround isn’t necessary.

The problem occurs after the mouse crosses over into the label track while the mouse button is depressed. This causes focus to move from the audio track to the label track and somehow the new envelope point is then not being registered properly.

The problem can also be produced with a label track below the audio track, for example:

  1. Generate a tone.
  2. Add a label track.
  3. With the Envelope tool, grab the lower edge of the waveform and drag up tp create an envelop point at around -0.5 on the vertical scale.
  4. Repeat so that there are three envelope points spread out along the track.
  5. Grab the middle envelope point and drag down into the label track, then release the mouse button.
    The envelope point is deleted as expected.
  6. Try to add a new envelope point after the final envelope point.
    Rather than creating a new envelope point at the position selected, the new envelope point is trapped on the left side of last envelope point.

Thanks again, Steve! You people are amazing and I’m about to donate to the Audacity project! Keep up the excellent work! One love!

Just a quick update.

I’ve looked at the code and found where the bug lies. Also an easy way to reproduce the fault.

  1. Start a new project and generate 30 seconds of audio
  2. Add a label track.
  3. Add envelope points at around 5, 10 and 20 seconds.
  4. Drag the middle envelope point off the audio track to delete it and release the left mouse button over the label track.
    Note that the envelope points at 5 seconds are blue not white. This is because the envelope point that has been “deleted” has not been properly deleted. It has been “marked for deletion” but the actual deletion was cancelled by the “button up” action over the label track.
  5. Try to add a new envelope point at around 25 seconds - the “deleted” envelope point returns and is trapped to the left of the 20 second envelope point.

I’m testing a fix for the problem and (if no problems) will submit it to the developers for review.

Patch seems to work OK so I’ve submitted it.
Thanks for reporting the issue.

It was really annoying until I noticed that the problem appears only when there is a label track around.
Once again, massive thanks, Steve!