mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-08 14:13:57 +01:00
This brings the builtin, LV2, and VAMP effects inline with the Audio Units, LADSPA, and VST effects. All effects now share a common UI. This gives all effects (though not implemented for all): User and factory preset capability Preset import/export capability Shared or private configuration options Builtin effects can now be migrated to RTP, depending on algorithm. LV2 effects now support graphical interfaces if the plugin supplies one. Nyquist prompt enhanced to provide some features of the Nyquist Workbench. It may not look like it, but this was a LOT of work, so trust me, there WILL be problems and everything effect related should be suspect. Keep a sharp eye (or two) open.
77 lines
1.7 KiB
C++
77 lines
1.7 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
SoundTouchEffect.h
|
|
|
|
Dominic Mazzoni, Vaughan Johnson
|
|
|
|
This abstract class contains all of the common code for an
|
|
effect that uses SoundTouch to do its processing (ChangeTempo
|
|
and ChangePitch).
|
|
|
|
**********************************************************************/
|
|
|
|
#include "../Audacity.h"
|
|
|
|
#if USE_SOUNDTOUCH
|
|
|
|
#ifndef __AUDACITY_EFFECT_SOUNDTOUCH__
|
|
#define __AUDACITY_EFFECT_SOUNDTOUCH__
|
|
|
|
#include "Effect.h"
|
|
|
|
// Soundtouch defines these as well, so get rid of them before including
|
|
#undef PACKAGE_NAME
|
|
#undef PACKAGE_STRING
|
|
#undef PACKAGE_TARNAME
|
|
#undef PACKAGE_VERSION
|
|
#undef PACKAGE_BUGREPORT
|
|
#include "SoundTouch.h"
|
|
|
|
using namespace soundtouch;
|
|
|
|
|
|
class WaveTrack;
|
|
|
|
class EffectSoundTouch : public Effect
|
|
{
|
|
public:
|
|
|
|
// Effect implementation
|
|
|
|
virtual bool Process();
|
|
|
|
// EffectSoundTouch implementation
|
|
|
|
#ifdef USE_MIDI
|
|
double mSemitones; // pitch change for NoteTracks
|
|
EffectSoundTouch() { mSemitones = 0; }
|
|
#endif
|
|
|
|
protected:
|
|
SoundTouch *mSoundTouch;
|
|
double mCurT0;
|
|
double mCurT1;
|
|
|
|
private:
|
|
bool ProcessLabelTrack(Track *track);
|
|
#ifdef USE_MIDI
|
|
bool ProcessNoteTrack(Track *track);
|
|
#endif
|
|
bool ProcessOne(WaveTrack * t, sampleCount start, sampleCount end);
|
|
bool ProcessStereo(WaveTrack* leftTrack, WaveTrack* rightTrack,
|
|
sampleCount start, sampleCount end);
|
|
bool ProcessStereoResults(const unsigned int outputCount,
|
|
WaveTrack* outputLeftTrack,
|
|
WaveTrack* outputRightTrack);
|
|
|
|
int mCurTrackNum;
|
|
|
|
double m_maxNewLength;
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|