LMMS
Loading...
Searching...
No Matches
DynamicsProcessor.h
Go to the documentation of this file.
1/*
2 * DynamicsProcessor.h - DynamicsProcessor effect-plugin
3 *
4 * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
5 * Copyright (c) 2006-2008 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
27#ifndef DYNPROC_H
28#define DYNPROC_H
29
30#include "Effect.h"
32
33namespace lmms
34{
35
36class RmsHelper;
37
38
39class DynProcEffect : public Effect
40{
41public:
42 DynProcEffect( Model * _parent,
43 const Descriptor::SubPluginFeatures::Key * _key );
44 ~DynProcEffect() override;
45
46 ProcessStatus processImpl(SampleFrame* buf, const f_cnt_t frames) override;
47 void processBypassedImpl() override;
48
50 {
51 return( &m_dpControls );
52 }
53
54
55private:
56 void calcAttack();
57 void calcRelease();
58
60
61// this member array is needed for peak detection
62 float m_currentPeak[2];
63 double m_attCoeff;
64 double m_relCoeff;
65
67
69
70 friend class DynProcControls;
71
72} ;
73
74
75} // namespace lmms
76
77#endif
ProcessStatus processImpl(SampleFrame *buf, const f_cnt_t frames) override
Definition DynamicsProcessor.cpp:96
void calcAttack()
Definition DynamicsProcessor.cpp:85
EffectControls * controls() override
Definition DynamicsProcessor.h:49
double m_attCoeff
Definition DynamicsProcessor.h:63
DynProcEffect(Model *_parent, const Descriptor::SubPluginFeatures::Key *_key)
Definition DynamicsProcessor.cpp:63
bool m_needsUpdate
Definition DynamicsProcessor.h:66
float m_currentPeak[2]
Definition DynamicsProcessor.h:62
double m_relCoeff
Definition DynamicsProcessor.h:64
void calcRelease()
Definition DynamicsProcessor.cpp:90
friend class DynProcControls
Definition DynamicsProcessor.h:70
DynProcControls m_dpControls
Definition DynamicsProcessor.h:59
void processBypassedImpl() override
Definition DynamicsProcessor.cpp:214
~DynProcEffect() override
Definition DynamicsProcessor.cpp:78
RmsHelper * m_rms[2]
Definition DynamicsProcessor.h:68
Definition EffectControls.h:44
Effect(const Plugin::Descriptor *_desc, Model *_parent, const Descriptor::SubPluginFeatures::Key *_key)
Definition Effect.cpp:41
ProcessStatus
Definition Effect.h:147
Definition Model.h:37
Definition RmsHelper.h:37
Definition SampleFrame.h:41
Definition AudioAlsa.cpp:35
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43