Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2016 - Multiple problems with Change Pitch
Multiple problems with Change Pitch
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Built-in FX
2.3.0
Per OS All
: P1 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-25 10:22 UTC by Steve Daulton
Modified: 2018-11-10 07:54 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1) Add "Change Pitch" to a macro and set a non-zero percentage change. 2) Close the Macro editor 3) Reopen the Macro editor and select "Change Pitch" in the right window. 4) Click the "Edit" button. In a Linux debug build of 2.1.1, Audacity crashes. In Windows with 2.3.0 release, the Change Pitch dialog opens but the percentage change is now zero.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed:
stevethefiddle: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2018-10-25 10:22:47 UTC
1) Add "Change Pitch" to a macro and set a non-zero percentage change.
2) Close the Macro editor
3) Reopen the Macro editor and select "Change Pitch" in the right window.
4) Click the "Edit" button.

In a Linux debug build of 2.1.1, Audacity crashes.
In Windows with 2.3.0 release, the Change Pitch dialog opens but the percentage change is now zero.

The crash on Linux is because of:

void EffectChangePitch::DeduceFrequencies()
{
   auto track = *( inputTracks()->Selected< const WaveTrack >() ).first;

When Change Pitch is opened via the Macro editor, inputTracks() is a nullptr.

#0 0x0000000000baa68f in std::__cxx11::list<std::shared_ptr<Track>, std::allocator<std::shared_ptr<Track> > >::begin (this=0x58) at /usr/include/c++/5/bits/stl_list.h:832
#1 0x0000000000ba912d in TrackList::getBegin[abi:cxx11]() const (this=0x0) at ../../src/effects/../Track.h:1472
#2 0x0000000000f03ca7 in TrackList::Tracks<WaveTrack const, bool (Track::*)() const> (this=0x0, pred=@0x7ffd937191a0: (bool (Track::*)(const Track * const)) 0xe34f48 <Track::IsSelected() const>) at ../../src/effects/../Track.h:1436
#3 0x0000000000f039ce in TrackList::Selected<WaveTrack const> (this=0x0) at ../../src/effects/../Track.h:1224
#4 0x0000000000f127ae in EffectChangePitch::DeduceFrequencies (this=0x3b3d3c0) at ../../src/effects/ChangePitch.cpp:412

That can be fixed by checking that inputTracks() is not NULL, but then there are asserts (Linux debug build) because m_nFromPitch and other variables are not initialized.

That can be fixed by ensuring that all member variables are initialized in the constructor, but then Change Pitch does not recall its settings after a restart. (see also bug 1207).
Comment 1 James Crook 2018-10-30 07:24:57 UTC
Is this a regression on 2.3.0 or on 2.2.2?
Comment 3 Peter Sampson 2018-11-07 05:51:01 UTC
Testing on W10 with audacity-2.3.1-alpha-207-4c76e598d5859dc172e063d37287cc510fa7850f

I confirm that this now works on W10 - the percentage change is retained for the edit of the macro.

Also tested on W10 on 2.3.0 to confirm that the percentage change is erroneously reset to zero.

Looks to be fixed on Windows.
Comment 4 Peter Sampson 2018-11-10 05:53:33 UTC
Tests OK on macOS 10.14.1 Mojave with Steve's 3.3.1 build of 09Nov18
Comment 5 Steve Daulton 2018-11-10 07:43:20 UTC
It is not working correctly for me on Linux.

1) Launch Audacity
2) Macros > New
3) Make a macro with "Change Pitch" command in it
4) Edit the Change Pitch parameters to transpose up 1 octave (12 semitones).
Note that the macro correctly shows "100" as the percent change.

5) Close the macro editor
6) Generate a 440 Hz sine tone
7) Apply the macro.

Expected result: the tone is pitch shifted to 880 Hz.
Actual result: The 440 Hz tone is unchanged.
Comment 6 Steve Daulton 2018-11-10 07:54:02 UTC
(In reply to Steve Daulton from comment #5)
This is weird. I've reset preferences, and not it is working perfectly for me.

I'm a little concerned about what I saw in comment 5, but as it is now working flawlessly I'll close this bug as FIXED.