kwave  18.07.70
PitchShiftPlugin.h
Go to the documentation of this file.
1 /***************************************************************************
2  PitchShiftPlugin.h - plugin for modifying the "pitch_shift"
3  -------------------
4  begin : Sun Mar 23 2003
5  copyright : (C) 2003 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef PITCH_SHIFT_PLUGIN_H
19 #define PITCH_SHIFT_PLUGIN_H
20 
21 #include "config.h"
22 #include <QObject>
23 #include <QString>
24 #include <QStringList>
25 
26 #include "libkwave/Plugin.h"
28 
29 #include "libgui/FilterPlugin.h"
30 
31 class QStringList;
32 namespace Kwave
33 {
34 
35  class KwaveSampleSource;
36 
38  {
39  Q_OBJECT
40 
41  public:
42 
48  PitchShiftPlugin(QObject *parent, const QVariantList &args);
49 
51  virtual ~PitchShiftPlugin() Q_DECL_OVERRIDE;
52 
54  virtual Kwave::PluginSetupDialog *createDialog(QWidget *parent)
55  Q_DECL_OVERRIDE;
56 
62  virtual Kwave::SampleSource *createFilter(unsigned int tracks)
63  Q_DECL_OVERRIDE;
64 
68  virtual bool paramsChanged() Q_DECL_OVERRIDE;
69 
77  virtual void updateFilter(Kwave::SampleSource *filter,
78  bool force = false) Q_DECL_OVERRIDE;
79 
84  virtual QString actionName() Q_DECL_OVERRIDE;
85 
86  protected:
87 
89  virtual int interpreteParameters(QStringList &params) Q_DECL_OVERRIDE;
90 
91  protected slots:
92 
98  void setValues(double speed, double frequency);
99 
100  private:
101 
103  double m_speed;
104 
106  double m_frequency;
107 
110 
112  double m_last_speed;
113 
115  double m_last_freq;
116  };
117 }
118 
119 #endif /* PITCH_SHIFT_PLUGIN_H */
120 
121 //***************************************************************************
122 //***************************************************************************
virtual void updateFilter(Kwave::SampleSource *filter, bool force=false) Q_DECL_OVERRIDE
Definition: App.h:33
virtual ~PitchShiftPlugin() Q_DECL_OVERRIDE
virtual bool paramsChanged() Q_DECL_OVERRIDE
virtual Kwave::SampleSource * createFilter(unsigned int tracks) Q_DECL_OVERRIDE
virtual QString actionName() Q_DECL_OVERRIDE
virtual Kwave::PluginSetupDialog * createDialog(QWidget *parent) Q_DECL_OVERRIDE
virtual int interpreteParameters(QStringList &params) Q_DECL_OVERRIDE
void setValues(double speed, double frequency)
PitchShiftPlugin(QObject *parent, const QVariantList &args)