OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
Expander.h
Go to the documentation of this file.
1
8
9
// Copyright (c) 2008-2019 OpenShot Studios, LLC
10
//
11
// SPDX-License-Identifier: LGPL-3.0-or-later
12
13
#ifndef OPENSHOT_EXPANDER_AUDIO_EFFECT_H
14
#define OPENSHOT_EXPANDER_AUDIO_EFFECT_H
15
16
#include "
EffectBase.h
"
17
18
#include "
Json.h
"
19
#include "
KeyFrame.h
"
20
#include "
Enums.h
"
21
22
#include <memory>
23
#include <string>
24
25
#include <AppConfig.h>
26
#include <juce_audio_basics/juce_audio_basics.h>
27
28
namespace
openshot
29
{
30
class
Frame
;
31
36
class
Expander
:
public
EffectBase
37
{
38
private
:
40
void
init_effect_details();
41
42
43
public
:
44
Keyframe
threshold
;
45
Keyframe
ratio
;
46
Keyframe
attack
;
47
Keyframe
release
;
48
Keyframe
makeup_gain
;
49
Keyframe
bypass
;
50
51
juce::AudioBuffer<float>
mixed_down_input
;
52
float
xl
;
53
float
yl
;
54
float
xg
;
55
float
yg
;
56
float
control
;
57
58
float
input_level
;
59
float
yl_prev
;
60
61
float
inverse_sample_rate
;
62
float
inverseE
;
63
65
Expander
();
66
68
Expander
(
Keyframe
threshold
,
Keyframe
ratio
,
Keyframe
attack
,
69
Keyframe
release
,
Keyframe
makeup_gain
,
Keyframe
bypass
);
70
71
float
calculateAttackOrRelease
(
float
value);
72
73
std::shared_ptr<openshot::Frame>
GetFrame
(int64_t frame_number)
override
{
74
return
GetFrame
(std::make_shared<openshot::Frame>(), frame_number);
75
}
76
77
std::shared_ptr<openshot::Frame>
78
GetFrame
(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
override
;
79
80
// Get and Set JSON methods
81
std::string
Json
()
const override
;
82
void
SetJson
(
const
std::string value)
override
;
83
Json::Value
JsonValue
()
const override
;
84
void
SetJsonValue
(
const
Json::Value root)
override
;
85
86
std::string
PropertiesJSON
(int64_t requested_frame)
const override
;
87
};
88
89
}
90
91
#endif
EffectBase.h
Header file for EffectBase class.
Enums.h
Header file for TextReader class.
Json.h
Header file for JSON class.
KeyFrame.h
Header file for the Keyframe class.
juce::AudioBuffer
Definition
Frame.h:37
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition
EffectBase.h:57
openshot::Expander::Expander
Expander()
Default constructor.
Definition
Expander.cpp:19
openshot::Expander::yl
float yl
Definition
Expander.h:53
openshot::Expander::inverse_sample_rate
float inverse_sample_rate
Definition
Expander.h:61
openshot::Expander::xl
float xl
Definition
Expander.h:52
openshot::Expander::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
Expander.cpp:189
openshot::Expander::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
Expander.cpp:163
openshot::Expander::makeup_gain
Keyframe makeup_gain
Definition
Expander.h:48
openshot::Expander::ratio
Keyframe ratio
Definition
Expander.h:45
openshot::Expander::release
Keyframe release
Definition
Expander.h:47
openshot::Expander::yg
float yg
Definition
Expander.h:55
openshot::Expander::calculateAttackOrRelease
float calculateAttackOrRelease(float value)
Definition
Expander.cpp:113
openshot::Expander::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
Expander.cpp:146
openshot::Expander::control
float control
Definition
Expander.h:56
openshot::Expander::yl_prev
float yl_prev
Definition
Expander.h:59
openshot::Expander::threshold
Keyframe threshold
Definition
Expander.h:44
openshot::Expander::xg
float xg
Definition
Expander.h:54
openshot::Expander::inverseE
float inverseE
Definition
Expander.h:62
openshot::Expander::bypass
Keyframe bypass
Definition
Expander.h:49
openshot::Expander::attack
Keyframe attack
Definition
Expander.h:46
openshot::Expander::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
Expander.cpp:129
openshot::Expander::mixed_down_input
juce::AudioBuffer< float > mixed_down_input
Definition
Expander.h:51
openshot::Expander::Json
std::string Json() const override
Generate JSON string of this object.
Definition
Expander.cpp:122
openshot::Expander::GetFrame
std::shared_ptr< openshot::Frame > GetFrame(int64_t frame_number) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
Definition
Expander.h:73
openshot::Expander::input_level
float input_level
Definition
Expander.h:58
openshot::Frame
This class represents a single frame of video (i.e. image & audio data).
Definition
Frame.h:90
openshot::Keyframe
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition
KeyFrame.h:53
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
audio_effects
Expander.h
Generated by
1.17.0