Loading...
Searching...
No Matches
Expander.h
Go to the documentation of this file.
// Copyright (c) 2008-2019 OpenShot Studios, LLC
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef OPENSHOT_EXPANDER_AUDIO_EFFECT_H
#define OPENSHOT_EXPANDER_AUDIO_EFFECT_H
#include "EffectBase.h"
#include "Json.h"
#include "KeyFrame.h"
#include "Enums.h"
#include <memory>
#include <string>
#include <AppConfig.h>
#include <juce_audio_basics/juce_audio_basics.h>
namespace openshot
{
class Frame;
class Expander : public EffectBase
{
private:
void init_effect_details();
public:
Keyframe threshold;
Keyframe ratio;
Keyframe attack;
Keyframe release;
Keyframe makeup_gain;
Keyframe bypass;
juce::AudioBuffer<float> mixed_down_input;
float xl;
float yl;
float xg;
float yg;
float control;
float input_level;
float yl_prev;
float inverse_sample_rate;
float inverseE;
Expander();
Expander(Keyframe threshold, Keyframe ratio, Keyframe attack,
Keyframe release, Keyframe makeup_gain, Keyframe bypass);
float calculateAttackOrRelease(float value);
std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override {
return GetFrame(std::make_shared<openshot::Frame>(), frame_number);
}
std::shared_ptr<openshot::Frame>
GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number) override;
// Get and Set JSON methods
std::string Json() const override;
void SetJson(const std::string value) override;
Json::Value JsonValue() const override;
void SetJsonValue(const Json::Value root) override;
std::string PropertiesJSON(int64_t requested_frame) const override;
};
}
#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:38
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition EffectBase.h:53
openshot::Expander
This class adds a expander (or noise gate) into the audio.
Definition Expander.h:37
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::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 Compressor.h:29