1 /*
2  * delaycontrols.h - declaration of DelayControl class.
3  *
4  * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com>
5  *
6  * This file is part of LMMS - https://lmms.io
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public
19  * License along with this program (see COPYING); if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301 USA.
22  *
23  */
24 
25 #ifndef DELAYCONTROLS_H
26 #define DELAYCONTROLS_H
27 
28 #include "EffectControls.h"
29 #include "Knob.h"
30 #include "DelayControlsDialog.h"
31 
32 
33 
34 class DelayEffect;
35 
36 class DelayControls : public EffectControls
37 {
38 	Q_OBJECT
39 public:
40 	DelayControls( DelayEffect* effect );
~DelayControls()41 	virtual ~DelayControls()
42 	{
43 	}
44 	virtual void saveSettings( QDomDocument& doc, QDomElement& parent );
45 	virtual void loadSettings( const QDomElement& _this );
nodeName()46 	inline virtual QString nodeName() const
47 	{
48 		return "Delay";
49 	}
controlCount()50 	virtual int controlCount(){
51 		return 5;
52 	}
createView()53 	virtual EffectControlDialog* createView()
54 	{
55 		return new DelayControlsDialog( this );
56 	}
57 
58 	float m_outPeakL;
59 	float m_outPeakR;
60 
61 
62 private slots:
63 	void changeSampleRate();
64 
65 private:
66 	DelayEffect* m_effect;
67 	TempoSyncKnobModel m_delayTimeModel;
68 	FloatModel m_feedbackModel;
69 	TempoSyncKnobModel m_lfoTimeModel;
70 	TempoSyncKnobModel m_lfoAmountModel;
71 	FloatModel m_outGainModel;
72 
73 	friend class DelayControlsDialog;
74 	friend class DelayEffect;
75 };
76 
77 #endif // DELAYCONTROLS_H
78