Audacity  3.2.0
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
EffectPaulstretch Class Referencefinal

An Extreme Time Stretch and Time Smear effect. More...

#include <Paulstretch.h>

Inheritance diagram for EffectPaulstretch:
[legend]
Collaboration diagram for EffectPaulstretch:
[legend]

Public Member Functions

 EffectPaulstretch ()
 
virtual ~EffectPaulstretch ()
 
ComponentInterfaceSymbol GetSymbol () override
 
TranslatableString GetDescription () override
 
ManualPageID ManualPage () override
 Name of a page in the Audacity alpha manual, default is empty. More...
 
EffectType GetType () override
 Type determines how it behaves. More...
 
bool GetAutomationParameters (CommandParameters &parms) override
 Save current settings into parms. More...
 
bool SetAutomationParameters (CommandParameters &parms) override
 Change settings to those stored in parms. More...
 
bool DefineParams (ShuttleParams &S) override
 
double CalcPreviewInputLength (double previewLength) override
 
bool Process () override
 
void PopulateOrExchange (ShuttleGui &S) override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
- Public Member Functions inherited from Effect
 Effect ()
 
virtual ~Effect ()
 
PluginPath GetPath () override
 
VendorSymbol GetVendor () override
 
wxString GetVersion () override
 
EffectFamilySymbol GetFamily () override
 Report identifier and user-visible name of the effect protocol. More...
 
bool IsInteractive () override
 Whether the effect needs a dialog for entry of settings. More...
 
bool IsDefault () override
 Whether the effect sorts "above the line" in the menus. More...
 
bool IsLegacy () override
 
bool SupportsRealtime () override
 Whether the effect supports realtime previewing (while audio is playing). More...
 
bool SupportsAutomation () override
 Whether the effect can be used without the UI, in a macro. More...
 
bool LoadUserPreset (const RegistryPath &name) override
 Change settings to a user-named preset. More...
 
bool SaveUserPreset (const RegistryPath &name) override
 Save current settings as a user-named preset. More...
 
RegistryPaths GetFactoryPresets () override
 Report names of factory presets. More...
 
bool LoadFactoryPreset (int id) override
 Change settings to the preset whose name is GetFactoryPresets()[id] More...
 
bool LoadFactoryDefaults () override
 Change settings back to "factory default". More...
 
bool SetHost (EffectHostInterface *host) override
 
unsigned GetAudioInCount () override
 
unsigned GetAudioOutCount () override
 
int GetMidiInCount () override
 
int GetMidiOutCount () override
 
sampleCount GetLatency () override
 Called for destructive, non-realtime effect computation. More...
 
size_t GetTailSize () override
 
void SetSampleRate (double rate) override
 
size_t SetBlockSize (size_t maxBlockSize) override
 
size_t GetBlockSize () const override
 
bool ProcessInitialize (sampleCount totalLen, ChannelNames chanMap=NULL) override
 Called for destructive, non-realtime effect computation. More...
 
bool ProcessFinalize () override
 Called for destructive, non-realtime effect computation. More...
 
size_t ProcessBlock (float **inBlock, float **outBlock, size_t blockLen) override
 Called for destructive, non-realtime effect computation. More...
 
bool RealtimeInitialize () override
 
bool RealtimeAddProcessor (unsigned numChannels, float sampleRate) override
 
bool RealtimeFinalize () override
 
bool RealtimeSuspend () override
 
bool RealtimeResume () noexcept override
 
bool RealtimeProcessStart () override
 
size_t RealtimeProcess (int group, float **inbuf, float **outbuf, size_t numSamples) override
 
bool RealtimeProcessEnd () noexcept override
 
int ShowClientInterface (wxWindow &parent, wxDialog &dialog, bool forceModal=false) override
 
bool PopulateUI (ShuttleGui &S) final
 Adds controls to a panel that is given as the parent window of S More...
 
bool IsGraphicalUI () override
 
bool ValidateUI () override
 
bool HideUI () override
 
bool CloseUI () override
 
bool CanExportPresets () override
 
void ExportPresets () override
 
void ImportPresets () override
 
bool HasOptions () override
 
void ShowOptions () override
 
EffectDefinitionInterfaceGetDefinition () override
 
double GetDuration () override
 
NumericFormatSymbol GetDurationFormat () override
 
virtual NumericFormatSymbol GetSelectionFormat ()
 
void SetDuration (double duration) override
 
RegistryPath GetUserPresetsGroup (const RegistryPath &name) override
 
RegistryPath GetCurrentSettingsGroup () override
 
RegistryPath GetFactoryDefaultsGroup () override
 
virtual wxString GetSavedStateGroup ()
 
int ShowHostInterface (wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
 
unsigned TestUIFlags (unsigned mask)
 
void SetPresetParameters (const wxArrayString *Names, const wxArrayString *Values)
 
virtual bool Startup (EffectUIClientInterface *client)
 
virtual bool GetAutomationParametersAsString (wxString &parms)
 
virtual bool SetAutomationParametersFromString (const wxString &parms)
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
bool DoEffect (double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={})
 
bool Delegate (Effect &delegate, wxWindow &parent, const EffectDialogFactory &factory)
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
virtual bool Startup ()
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
- Public Member Functions inherited from EffectProcessor
virtual ~EffectProcessor ()
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
virtual EffectType GetClassification ()
 Determines which menu it appears in; default same as GetType(). More...
 
virtual bool EnablesDebug ()
 Whether the effect dialog should have a Debug button; default, always false. More...
 
virtual FilePath HelpPage ()
 Fully qualified local help file name, default is empty. More...
 
virtual bool IsHiddenFromMenus ()
 Default is false. More...
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
TranslatableString GetName ()
 
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))
 
- Public Member Functions inherited from EffectUIHostInterface
virtual ~EffectUIHostInterface ()
 
- Public Member Functions inherited from EffectHostInterface
virtual ~EffectHostInterface ()
 

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Paulstretch") }
 
- Static Public Attributes inherited from Effect
static const wxString kUserPresetIdent = wxT("User Preset:")
 
static const wxString kFactoryPresetIdent = wxT("Factory Preset:")
 
static const wxString kCurrentSettingsIdent = wxT("<Current Settings>")
 
static const wxString kFactoryDefaultsIdent = wxT("<Factory Defaults>")
 

Private Member Functions

void OnText (wxCommandEvent &evt)
 
size_t GetBufferSize (double rate)
 
bool ProcessOne (WaveTrack *track, double t0, double t1, int count)
 

Private Attributes

float mAmount
 
float mTime_resolution
 
double m_t1
 

Additional Inherited Members

- Public Types inherited from Effect
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Static Public Member Functions inherited from Effect
static void IncEffectCounter ()
 
- Static Public Member Functions inherited from EffectDefinitionInterface
static Identifier GetSquashedName (const Identifier &ident)
 A utility that strips spaces and CamelCases a name. More...
 
- Protected Member Functions inherited from Effect
bool EnableApply (bool enable=true)
 
bool EnablePreview (bool enable=true)
 
virtual bool Init ()
 
virtual bool CheckWhetherSkipEffect ()
 
virtual bool ProcessPass ()
 
virtual bool InitPass1 ()
 
virtual bool InitPass2 ()
 
virtual void End ()
 
virtual void Preview (bool dryOnly)
 
bool TotalProgress (double frac, const TranslatableString &={})
 
bool TrackProgress (int whichTrack, double frac, const TranslatableString &={})
 
bool TrackGroupProgress (int whichGroup, double frac, const TranslatableString &={})
 
int GetNumWaveTracks ()
 
int GetNumWaveGroups ()
 
void GetBounds (const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing ()
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void CopyInputTracks (bool allSyncLockSelected=false)
 
std::shared_ptr< AddedAnalysisTrackAddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
TrackAddToOutputTracks (const std::shared_ptr< Track > &t)
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 
- Protected Attributes inherited from Effect
BasicUI::ProgressDialogmProgress = nullptr
 
double mProjectRate
 
double mSampleRate
 
WaveTrackFactorymFactory
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0
 
double mT1
 
wxArrayString mPresetNames
 
wxArrayString mPresetValues
 
int mPass
 
wxWeakRef< wxDialog > mHostUIDialog
 This smart pointer tracks the lifetime of the dialog. More...
 
wxWeakRef< wxDialog > mUIDialog
 This weak pointer may be the same as the above, or null. More...
 
wxWindow * mUIParent
 
unsigned mUIFlags { 0 }
 
sampleCount mSampleCnt
 
- Static Protected Attributes inherited from Effect
static int nEffectsDone =0
 

Detailed Description

An Extreme Time Stretch and Time Smear effect.

Definition at line 17 of file Paulstretch.h.

Constructor & Destructor Documentation

◆ EffectPaulstretch()

EffectPaulstretch::EffectPaulstretch ( )

Definition at line 96 of file Paulstretch.cpp.

97 {
98  mAmount = DEF_Amount;
99  mTime_resolution = DEF_Time;
100 
101  SetLinearEffectFlag(true);
102 }

◆ ~EffectPaulstretch()

EffectPaulstretch::~EffectPaulstretch ( )
virtual

Definition at line 104 of file Paulstretch.cpp.

105 {
106 }

Member Function Documentation

◆ CalcPreviewInputLength()

double EffectPaulstretch::CalcPreviewInputLength ( double  previewLength)
overridevirtual

Reimplemented from Effect.

Definition at line 160 of file Paulstretch.cpp.

161 {
162  // FIXME: Preview is currently at the project rate, but should really be
163  // at the track rate (bugs 1284 and 852).
164  auto minDuration = GetBufferSize(mProjectRate) * 2 + 1;
165 
166  // Preview playback may need to be trimmed but this is the smallest selection that we can use.
167  double minLength = std::max<double>(minDuration / mProjectRate, previewLength / mAmount);
168 
169  return minLength;
170 }

References GetBufferSize(), mAmount, and Effect::mProjectRate.

Here is the call graph for this function:

◆ DefineParams()

bool EffectPaulstretch::DefineParams ( ShuttleParams S)
override

Definition at line 133 of file Paulstretch.cpp.

133  {
134  S.SHUTTLE_PARAM( mAmount, Amount );
135  S.SHUTTLE_PARAM( mTime_resolution, Time );
136  return true;
137 }

References mAmount, mTime_resolution, and S.

◆ GetAutomationParameters()

bool EffectPaulstretch::GetAutomationParameters ( CommandParameters parms)
overridevirtual

Save current settings into parms.

Reimplemented from Effect.

Definition at line 139 of file Paulstretch.cpp.

140 {
141  parms.WriteFloat(KEY_Amount, mAmount);
142  parms.WriteFloat(KEY_Time, mTime_resolution);
143 
144  return true;
145 }

References mAmount, mTime_resolution, and CommandParameters::WriteFloat().

Here is the call graph for this function:

◆ GetBufferSize()

size_t EffectPaulstretch::GetBufferSize ( double  rate)
private

Definition at line 245 of file Paulstretch.cpp.

246 {
247  // Audacity's fft requires a power of 2
248  float tmp = rate * mTime_resolution / 2.0;
249  tmp = log(tmp) / log(2.0);
250  tmp = pow(2.0, floor(tmp + 0.5));
251 
252  auto stmp = size_t(tmp);
253  if (stmp != tmp)
254  // overflow
255  return 0;
256  if (stmp >= 2 * stmp)
257  // overflow
258  return 0;
259 
260  return std::max<size_t>(stmp, 128);
261 }

References mTime_resolution.

Referenced by CalcPreviewInputLength(), and ProcessOne().

Here is the caller graph for this function:

◆ GetDescription()

TranslatableString EffectPaulstretch::GetDescription ( )
overridevirtual

Reimplemented from Effect.

Definition at line 115 of file Paulstretch.cpp.

116 {
117  return XO("Paulstretch is only for an extreme time-stretch or \"stasis\" effect");
118 }

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol EffectPaulstretch::GetSymbol ( )
overridevirtual

Reimplemented from Effect.

Definition at line 110 of file Paulstretch.cpp.

111 {
112  return Symbol;
113 }

References Symbol.

◆ GetType()

EffectType EffectPaulstretch::GetType ( )
overridevirtual

Type determines how it behaves.

Reimplemented from Effect.

Definition at line 127 of file Paulstretch.cpp.

128 {
129  return EffectTypeProcess;
130 }

References EffectTypeProcess.

◆ ManualPage()

ManualPageID EffectPaulstretch::ManualPage ( )
overridevirtual

Name of a page in the Audacity alpha manual, default is empty.

Reimplemented from EffectDefinitionInterface.

Definition at line 120 of file Paulstretch.cpp.

121 {
122  return L"Paulstretch";
123 }

◆ OnText()

void EffectPaulstretch::OnText ( wxCommandEvent &  evt)
private

Definition at line 240 of file Paulstretch.cpp.

241 {
242  EnableApply(mUIParent->TransferDataFromWindow());
243 }

References Effect::EnableApply(), and Effect::mUIParent.

Here is the call graph for this function:

◆ PopulateOrExchange()

void EffectPaulstretch::PopulateOrExchange ( ShuttleGui S)
overridevirtual

Reimplemented from Effect.

Definition at line 199 of file Paulstretch.cpp.

200 {
201  S.StartMultiColumn(2, wxALIGN_CENTER);
202  {
203  S.Validator<FloatingPointValidator<float>>(
204  1, &mAmount, NumValidatorStyle::DEFAULT, MIN_Amount)
205  /* i18n-hint: This is how many times longer the sound will be, e.g. applying
206  * the effect to a 1-second sample, with the default Stretch Factor of 10.0
207  * will give an (approximately) 10 second sound
208  */
209  .AddTextBox(XXO("&Stretch Factor:"), wxT(""), 10);
210 
211  S.Validator<FloatingPointValidator<float>>(
212  3, &mTime_resolution, NumValidatorStyle::ONE_TRAILING_ZERO, MIN_Time)
213  .AddTextBox(XXO("&Time Resolution (seconds):"), wxT(""), 10);
214  }
215  S.EndMultiColumn();
216 };

References mAmount, mTime_resolution, S, and XXO.

◆ Process()

bool EffectPaulstretch::Process ( )
overridevirtual

If Process() is not overridden, it uses ProcessInitialize(), ProcessBlock(), and ProcessFinalize() methods of EffectProcessor, and also GetLatency() to determine how many leading output samples to discard and how many extra samples to produce.

Reimplemented from Effect.

Definition at line 173 of file Paulstretch.cpp.

174 {
175  CopyInputTracks();
176  m_t1=mT1;
177  int count=0;
178  for( auto track : mOutputTracks->Selected< WaveTrack >() ) {
179  double trackStart = track->GetStartTime();
180  double trackEnd = track->GetEndTime();
181  double t0 = mT0 < trackStart? trackStart: mT0;
182  double t1 = mT1 > trackEnd? trackEnd: mT1;
183 
184  if (t1 > t0) {
185  if (!ProcessOne(track, t0,t1,count))
186  return false;
187  }
188 
189  count++;
190  }
191  mT1=m_t1;
192 
194 
195  return true;
196 }

References Effect::CopyInputTracks(), m_t1, Effect::mOutputTracks, Effect::mT0, Effect::mT1, ProcessOne(), and Effect::ReplaceProcessedTracks().

Here is the call graph for this function:

◆ ProcessOne()

bool EffectPaulstretch::ProcessOne ( WaveTrack track,
double  t0,
double  t1,
int  count 
)
private

Definition at line 263 of file Paulstretch.cpp.

264 {
265  const auto badAllocMessage =
266  XO("Requested value exceeds memory capacity.");
267 
268  const auto stretch_buf_size = GetBufferSize(track->GetRate());
269  if (stretch_buf_size == 0) {
270  ::Effect::MessageBox( badAllocMessage );
271  return false;
272  }
273 
274  double amount = this->mAmount;
275 
276  auto start = track->TimeToLongSamples(t0);
277  auto end = track->TimeToLongSamples(t1);
278  auto len = end - start;
279 
280  const auto minDuration = stretch_buf_size * 2 + 1;
281  if (minDuration < stretch_buf_size) {
282  // overflow!
283  ::Effect::MessageBox( badAllocMessage );
284  return false;
285  }
286 
287  if (len < minDuration) { //error because the selection is too short
288 
289  float maxTimeRes = log( len.as_double() ) / log(2.0);
290  maxTimeRes = pow(2.0, floor(maxTimeRes) + 0.5);
291  maxTimeRes = maxTimeRes / track->GetRate();
292 
293  if (this->IsPreviewing()) {
294  double defaultPreviewLen;
295  gPrefs->Read(wxT("/AudioIO/EffectsPreviewLen"), &defaultPreviewLen, 6.0);
296 
297  if ((minDuration / mProjectRate) < defaultPreviewLen) {
299  /* i18n-hint: 'Time Resolution' is the name of a control in the Paulstretch effect.*/
300  XO("Audio selection too short to preview.\n\n"
301  "Try increasing the audio selection to at least %.1f seconds,\n"
302  "or reducing the 'Time Resolution' to less than %.1f seconds.")
303  .Format(
304  (minDuration / track->GetRate()) + 0.05, // round up to 1/10 s.
305  floor(maxTimeRes * 10.0) / 10.0),
306  wxOK | wxICON_EXCLAMATION );
307  }
308  else {
310  /* i18n-hint: 'Time Resolution' is the name of a control in the Paulstretch effect.*/
311  XO("Unable to Preview.\n\n"
312  "For the current audio selection, the maximum\n"
313  "'Time Resolution' is %.1f seconds.")
314  .Format( floor(maxTimeRes * 10.0) / 10.0 ),
315  wxOK | wxICON_EXCLAMATION );
316  }
317  }
318  else {
320  /* i18n-hint: 'Time Resolution' is the name of a control in the Paulstretch effect.*/
321  XO("The 'Time Resolution' is too long for the selection.\n\n"
322  "Try increasing the audio selection to at least %.1f seconds,\n"
323  "or reducing the 'Time Resolution' to less than %.1f seconds.")
324  .Format(
325  (minDuration / track->GetRate()) + 0.05, // round up to 1/10 s.
326  floor(maxTimeRes * 10.0) / 10.0),
327  wxOK | wxICON_EXCLAMATION );
328  }
329 
330  return false;
331  }
332 
333 
334  auto dlen = len.as_double();
335  double adjust_amount = dlen /
336  (dlen - ((double)stretch_buf_size * 2.0));
337  amount = 1.0 + (amount - 1.0) * adjust_amount;
338 
339  auto outputTrack = track->EmptyCopy();
340 
341  try {
342  // This encloses all the allocations of buffers, including those in
343  // the constructor of the PaulStretch object
344 
345  PaulStretch stretch(amount, stretch_buf_size, track->GetRate());
346 
347  auto nget = stretch.get_nsamples_for_fill();
348 
349  auto bufsize = stretch.poolsize;
350  Floats buffer0{ bufsize };
351  float *bufferptr0 = buffer0.get();
352  bool first_time = true;
353 
354  const auto fade_len = std::min<size_t>(100, bufsize / 2 - 1);
355  bool cancelled = false;
356 
357  {
358  Floats fade_track_smps{ fade_len };
359  decltype(len) s=0;
360 
361  while (s < len) {
362  track->GetFloats(bufferptr0, start + s, nget);
363  stretch.process(buffer0.get(), nget);
364 
365  if (first_time) {
366  stretch.process(buffer0.get(), 0);
367  };
368 
369  s += nget;
370 
371  if (first_time){//blend the start of the selection
372  track->GetFloats(fade_track_smps.get(), start, fade_len);
373  first_time = false;
374  for (size_t i = 0; i < fade_len; i++){
375  float fi = (float)i / (float)fade_len;
376  stretch.out_buf[i] =
377  stretch.out_buf[i] * fi + (1.0 - fi) * fade_track_smps[i];
378  }
379  }
380  if (s >= len){//blend the end of the selection
381  track->GetFloats(fade_track_smps.get(), end - fade_len, fade_len);
382  for (size_t i = 0; i < fade_len; i++){
383  float fi = (float)i / (float)fade_len;
384  auto i2 = bufsize / 2 - 1 - i;
385  stretch.out_buf[i2] =
386  stretch.out_buf[i2] * fi + (1.0 - fi) *
387  fade_track_smps[fade_len - 1 - i];
388  }
389  }
390 
391  outputTrack->Append((samplePtr)stretch.out_buf.get(), floatSample, stretch.out_bufsize);
392 
393  nget = stretch.get_nsamples();
394  if (TrackProgress(count,
395  s.as_double() / len.as_double()
396  )) {
397  cancelled = true;
398  break;
399  }
400  }
401  }
402 
403  if (!cancelled){
404  outputTrack->Flush();
405 
406  track->Clear(t0,t1);
407  track->Paste(t0, outputTrack.get());
408  m_t1 = mT0 + outputTrack->GetEndTime();
409  }
410 
411  return !cancelled;
412  }
413  catch ( const std::bad_alloc& ) {
414  ::Effect::MessageBox( badAllocMessage );
415  return false;
416  }
417 };

References WaveTrack::Clear(), WaveTrack::EmptyCopy(), floatSample, PaulStretch::get_nsamples(), PaulStretch::get_nsamples_for_fill(), GetBufferSize(), SampleTrack::GetFloats(), WaveTrack::GetRate(), gPrefs, Effect::IsPreviewing(), m_t1, mAmount, Effect::MessageBox(), Effect::mProjectRate, Effect::mT0, PaulStretch::out_buf, PaulStretch::out_bufsize, WaveTrack::Paste(), PaulStretch::poolsize, PaulStretch::process(), SampleTrack::TimeToLongSamples(), Effect::TrackProgress(), and XO.

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAutomationParameters()

bool EffectPaulstretch::SetAutomationParameters ( CommandParameters parms)
overridevirtual

Change settings to those stored in parms.

Reimplemented from Effect.

Definition at line 147 of file Paulstretch.cpp.

148 {
149  ReadAndVerifyFloat(Amount);
150  ReadAndVerifyFloat(Time);
151 
152  mAmount = Amount;
153  mTime_resolution = Time;
154 
155  return true;
156 }

References mAmount, mTime_resolution, and ReadAndVerifyFloat.

◆ TransferDataFromWindow()

bool EffectPaulstretch::TransferDataFromWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 228 of file Paulstretch.cpp.

229 {
230  if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
231  {
232  return false;
233  }
234 
235  return true;
236 }

References Effect::mUIParent.

◆ TransferDataToWindow()

bool EffectPaulstretch::TransferDataToWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 218 of file Paulstretch.cpp.

219 {
220  if (!mUIParent->TransferDataToWindow())
221  {
222  return false;
223  }
224 
225  return true;
226 }

References Effect::mUIParent.

Member Data Documentation

◆ m_t1

double EffectPaulstretch::m_t1
private

Definition at line 60 of file Paulstretch.h.

Referenced by Process(), and ProcessOne().

◆ mAmount

float EffectPaulstretch::mAmount
private

◆ mTime_resolution

float EffectPaulstretch::mTime_resolution
private

◆ Symbol

const ComponentInterfaceSymbol EffectPaulstretch::Symbol { XO("Paulstretch") }
static

Definition at line 20 of file Paulstretch.h.

Referenced by GetSymbol().


The documentation for this class was generated from the following files:
Effect::IsPreviewing
bool IsPreviewing()
Definition: Effect.h:322
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:75
EffectTypeProcess
@ EffectTypeProcess
Definition: EffectInterface.h:56
Effect::SetLinearEffectFlag
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: Effect.cpp:1764
Effect::EnableApply
bool EnableApply(bool enable=true)
Definition: Effect.cpp:1694
S
#define S(N)
Definition: ToChars.cpp:64
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:71
EffectPaulstretch::ProcessOne
bool ProcessOne(WaveTrack *track, double t0, double t1, int count)
Definition: Paulstretch.cpp:263
Effect::MessageBox
int MessageBox(const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
Definition: Effect.cpp:2238
Effect::CopyInputTracks
void CopyInputTracks(bool allSyncLockSelected=false)
Definition: Effect.cpp:1834
Format
Abstract base class used in importing a file.
Effect::mT1
double mT1
Definition: Effect.h:424
XO
#define XO(s)
Definition: Internat.h:31
EffectPaulstretch::mAmount
float mAmount
Definition: Paulstretch.h:58
EffectPaulstretch::mTime_resolution
float mTime_resolution
Definition: Paulstretch.h:59
CommandParameters::WriteFloat
bool WriteFloat(const wxString &key, float f)
Definition: EffectAutomationParameters.h:155
EffectPaulstretch::GetBufferSize
size_t GetBufferSize(double rate)
Definition: Paulstretch.cpp:245
WaveTrack::EmptyCopy
Holder EmptyCopy(const SampleBlockFactoryPtr &pFactory={}) const
Definition: WaveTrack.cpp:709
floatSample
@ floatSample
Definition: SampleFormat.h:34
Effect::mProjectRate
double mProjectRate
Definition: Effect.h:416
XXO
#define XXO(s)
Definition: Internat.h:44
WaveTrack::Clear
void Clear(double t0, double t1) override
Definition: WaveTrack.cpp:790
Effect::mT0
double mT0
Definition: Effect.h:423
SampleTrack::GetFloats
bool GetFloats(float *buffer, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const
Retrieve samples from a track in floating-point format, regardless of the storage format.
Definition: SampleTrack.h:64
Effect::ReplaceProcessedTracks
void ReplaceProcessedTracks(const bool bGoodResult)
Definition: Effect.cpp:1956
WaveTrack::Paste
void Paste(double t0, const Track *src) override
Definition: WaveTrack.cpp:1568
Effect::mOutputTracks
std::shared_ptr< TrackList > mOutputTracks
Definition: Effect.h:422
samplePtr
char * samplePtr
Definition: SampleFormat.h:49
Effect::mUIParent
wxWindow * mUIParent
Definition: Effect.h:438
WaveTrack::GetRate
double GetRate() const override
Definition: WaveTrack.cpp:495
SampleTrack::TimeToLongSamples
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: SampleTrack.cpp:35
EffectPaulstretch::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: Paulstretch.h:20
Effect::TrackProgress
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={})
Definition: Effect.cpp:1788
ArrayOf< float >
ReadAndVerifyFloat
#define ReadAndVerifyFloat(name)
Definition: Effect.h:593
EffectPaulstretch::m_t1
double m_t1
Definition: Paulstretch.h:60
PaulStretch
Class that helps EffectPaulStretch. It does the FFTs and inner loop of the effect.
Definition: Paulstretch.cpp:47