-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Envelope points are multiplied when using Filter Curve EQ or Graphic EQ #1476
Comments
I do not see this on w10 with 3.0.3 or 3/1/0/3.0.4 alpha audacity-win-3.0.4-alpha-20210813+4058470-64bit |
I've clarified STR a bit after checking - it works only if you select the part of the clip Audacity 3.0.3 Win64 First time: Second application, different selection |
The potentially problematic code dates back to Aug 2020: 58adb94 |
I get similar results when I use Graphic EQ as well |
I don't really know how many effects are affected |
I can get it to crash by applying the Filter curve EQ several times (using Ctrl+R) - it first goes to a flat line and then the next application causes the crash. ET has just phoned-home with the error report. |
Change Pitch, Change Tempo and Change speed also seem to be affected And Paulstretch And Notch Filter and Tremolo But many other effects are not affected e.g. Amplify, fade In, Wahwah and others |
Oh I've managed to crash it too: #1477 And ET's home says that it is a number 2 crash! |
Bug narrowed down to Track Clear-And-Paste usage |
This PR resolves performance issues when reading large project files. For the first time, those issues arose due to the #1476. However, after the #1476 was fixed, the problem remained. It hit the 3.1.0 release sharply because there are easy ways to generate lots of `<waveblock>` tags without duplicating the actual data. For example - splitting a clip causes two full copies of block sequences. Before this PR reading, the project was performed in the following steps: 1. `dict` and `doc` fields were read as a single blob into the memory. 2. Memory was copied to the `wxMemoryBuffer` object. 3. `wxMemoryBuffer` object was passed into the binary XML decoder, which generated a text representation of the XML file. 4. XML file was parsed using Expat, and the project structure was created using Expat handlers. This approach had several significant problems: 1. A memory spike of at least `2 * size(doc || dict)`. The largest project that was used for testing had a blob of over 400 megabytes. 2. At least `3 * size(doc || dict)` of bytes copied. 3. Numeric values are first converted to string representation then parsed back. The original implementation was slow in both cases; the numeric to string conversion was improved in 3.1.1 and 3.1.2, but that was not enough. 4. Parsing is performed twice: once for the binary form, then for the text one. These issues are solved by the following changes: 1. A new class is introduced that allows storing the real attribute value. It works both with text and binary forms. 2. Data is read incrementally directly from the SQLite in chunks of 32Kb. 3. Binary parser now accepts XMLTagHandler directly, allowing effective reconstruction of the project directly from the binary XML. With all the changes, ~40x improvement was measured in terms of time, memory spike is now negligible. For example, for the 400Mb project mentioned before the results are: * 95 seconds on 3.1.0 (and a whooping peak around 4 Gb of RAM, while only 1.4 is needed!), * 45 seconds on 3.1.1, * ~2.5 seconds with this build. Results were measured on Ryzen 5800x with a fast PCIe SSD. On slower machine it took over 3 minutes to open that project.
Describe the bug
Using Filter Curve EQ will duplicate envelope points if they were present.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Filter Curve EQ should not change the envelope points.
Screenshots
![image](https://user-images.githubusercontent.com/2660628/129367697-0bc033af-aadd-4a2e-9347-12e00da5fdad.png)
See https://forum.audacityteam.org/viewtopic.php?p=432231#p432231
The text was updated successfully, but these errors were encountered: