Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
peak_fall_smooth.h
1
// SPDX-FileCopyrightText: © 2023-2024 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
/*
4
* This file incorporates work covered by the following copyright and
5
* permission notices:
6
*
7
* ---
8
*
9
* SPDX-FileCopyrightText: © 2023 Patrick Desaulniers
10
* SPDX-License-Identifier: GPL-3.0-or-later
11
*
12
* ---
13
*/
14
15
#ifndef ZRYTHM_DSP_PEAK_FALL_SMOOTH_H
16
#define ZRYTHM_DSP_PEAK_FALL_SMOOTH_H
17
18
namespace
zrythm::dsp
19
{
20
21
class
PeakFallSmooth
22
{
23
public
:
24
void
calculate_coeff (
float
frequency,
float
sample_rate);
25
void
set_value (
float
val);
26
float
get_smoothed_value ()
const
;
27
28
private
:
29
mutable
float
history_ = 0.f;
30
float
value_ = 0.f;
31
float
coeff_ = 0.f;
32
};
33
34
};
// namespace zrythm::dsp
35
36
#endif
zrythm::dsp::PeakFallSmooth
Definition
peak_fall_smooth.h:22
src
dsp
peak_fall_smooth.h
Generated by
1.15.0