LMMS
Loading...
Searching...
No Matches
EffectChain.h
Go to the documentation of this file.
1/*
2 * EffectChain.h - class for processing and effects chain
3 *
4 * Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
5 * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef LMMS_EFFECT_CHAIN_H
27#define LMMS_EFFECT_CHAIN_H
28
29#include "Model.h"
30#include "SerializingObject.h"
31#include "AutomatableModel.h"
32
33namespace lmms
34{
35
36class AudioBuffer;
37class Effect;
38
39namespace gui
40{
41
42class EffectRackView;
43
44} // namespace gui
45
46
47class LMMS_EXPORT EffectChain : public Model, public SerializingObject
48{
49 Q_OBJECT
50public:
51 EffectChain( Model * _parent );
52 ~EffectChain() override;
53
54 void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
55 void loadSettings( const QDomElement & _this ) override;
56
57 inline QString nodeName() const override
58 {
59 return "fxchain";
60 }
61
62 void appendEffect( Effect * _effect );
63 void removeEffect( Effect * _effect );
64 void moveDown( Effect * _effect );
65 void moveUp( Effect * _effect );
66 bool processAudioBuffer(AudioBuffer& buffer);
67
68 void clear();
69
70
71private:
72 using EffectList = std::vector<Effect*>;
74
76
77
78 friend class gui::EffectRackView;
79
80
81signals:
83
84} ;
85
86} // namespace lmms
87
88#endif // LMMS_EFFECT_CHAIN_H
Definition AudioBuffer.h:79
Definition AutomatableModel.h:497
std::vector< Effect * > EffectList
Definition EffectChain.h:72
BoolModel m_enabledModel
Definition EffectChain.h:75
void loadSettings(const QDomElement &_this) override
Definition EffectChain.cpp:78
EffectList m_effects
Definition EffectChain.h:73
QString nodeName() const override
Definition EffectChain.h:57
EffectChain(Model *_parent)
Definition EffectChain.cpp:40
void saveSettings(QDomDocument &_doc, QDomElement &_parent) override
Definition EffectChain.cpp:58
Definition Effect.h:53
Model(Model *parent, QString displayName=QString(), bool defaultConstructed=false)
Definition Model.cpp:30
SerializingObject()
Definition SerializingObject.cpp:32
Definition EffectRackView.h:44
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35