1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-09 14:43:57 +01:00

Extended pitch, tempo, and speed effects to operate on NoteTracks. Fixed off-by-one error on channel buttons.

This commit is contained in:
rbdannenberg
2010-10-28 17:57:14 +00:00
parent f3b91514d2
commit f274c9fb2b
6 changed files with 125 additions and 14 deletions

View File

@@ -156,6 +156,16 @@ bool EffectChangePitch::Process()
mSoundTouch = new SoundTouch();
SetTimeWarper(new IdentityTimeWarper());
mSoundTouch->setPitchSemiTones((float)(m_SemitonesChange));
#ifdef USE_MIDI
// Note: m_SemitonesChange is private to ChangePitch because it only
// needs to pass it along to mSoundTouch (above). I added mSemitones
// to SoundTouchEffect (the super class) to convey this value
// to process Note tracks. This approach minimizes changes to existing
// code, but it would be cleaner to change all m_SemitonesChange to
// mSemitones, make mSemitones exist with or without USE_MIDI, and
// eliminate the next line:
mSemitones = m_SemitonesChange;
#endif
return this->EffectSoundTouch::Process();
}