WE Core
Loading...
Searching...
No Matches
AREnvelopeFollowerFullWave.h
Go to the documentation of this file.
1
/*
2
* File: AREnveloperFollowerFullWave.h
3
*
4
* Created: 17/11/2020
5
*
6
* This file is part of WECore.
7
*
8
* WECore is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* WECore 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
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with WECore. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#pragma once
23
24
#include "
General/CoreMath.h
"
25
#include "
AREnvelopeFollowerParameters.h
"
26
#include "
AREnvelopeFollowerBase.h
"
27
28
namespace
WECore::AREnv
{
32
class
AREnvelopeFollowerFullWave
:
public
AREnvelopeFollowerBase
{
33
public
:
34
35
AREnvelopeFollowerFullWave
() =
default
;
36
virtual
~AREnvelopeFollowerFullWave
() =
default
;
37
46
virtual
double
_envGetNextOutputImpl
(
double
inSample)
override
{
47
const
double
tmp = std::abs(inSample);
48
49
if
(tmp >
_envVal
)
50
{
51
_envVal
=
_attackCoef
* (
_envVal
- tmp) + tmp;
52
}
53
else
54
{
55
_envVal
=
_releaseCoef
* (
_envVal
- tmp) + tmp;
56
}
57
58
return
_envVal
;
59
}
60
};
61
}
AREnvelopeFollowerBase.h
AREnvelopeFollowerParameters.h
CoreMath.h
WECore::AREnv::AREnvelopeFollowerBase
Definition
AREnvelopeFollowerBase.h:33
WECore::AREnv::AREnvelopeFollowerBase::_attackCoef
double _attackCoef
Definition
AREnvelopeFollowerBase.h:143
WECore::AREnv::AREnvelopeFollowerBase::_envVal
double _envVal
Definition
AREnvelopeFollowerBase.h:138
WECore::AREnv::AREnvelopeFollowerBase::_releaseCoef
double _releaseCoef
Definition
AREnvelopeFollowerBase.h:144
WECore::AREnv::AREnvelopeFollowerFullWave
Definition
AREnvelopeFollowerFullWave.h:32
WECore::AREnv::AREnvelopeFollowerFullWave::AREnvelopeFollowerFullWave
AREnvelopeFollowerFullWave()=default
WECore::AREnv::AREnvelopeFollowerFullWave::~AREnvelopeFollowerFullWave
virtual ~AREnvelopeFollowerFullWave()=default
WECore::AREnv::AREnvelopeFollowerFullWave::_envGetNextOutputImpl
virtual double _envGetNextOutputImpl(double inSample) override
Definition
AREnvelopeFollowerFullWave.h:46
WECore::AREnv
Definition
AREnvelopeFollowerBase.h:28
WECore
WEFilters
AREnvelopeFollowerFullWave.h
Generated by
1.12.0