Loading...
Searching...
No Matches
Robotization.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_ROBOTIZATION_AUDIO_EFFECT_H
#define OPENSHOT_ROBOTIZATION_AUDIO_EFFECT_H
#define _USE_MATH_DEFINES
#include <memory>
#include <mutex>
#include <string>
#include "EffectBase.h"
#include "STFT.h"
#include "Json.h"
#include "KeyFrame.h"
#include "Enums.h"
namespace juce {
namespace dsp {
class FFT;
}
}
namespace openshot
{
class Frame;
class Robotization : public EffectBase
{
private:
void init_effect_details();
public:
openshot::FFTSize fft_size;
openshot::HopSize hop_size;
openshot::WindowType window_type;
Robotization();
Robotization(openshot::FFTSize fft_size,
openshot::HopSize hop_size,
openshot::WindowType window_type);
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;
class RobotizationEffect : public STFT
{
public:
RobotizationEffect (Robotization& p) : parent (p) { }
private:
void modification(const int channel) override;
Robotization &parent;
};
std::recursive_mutex mutex;
RobotizationEffect stft;
std::unique_ptr<juce::dsp::FFT> fft;
};
} // namespace
#endif // OPENSHOT_ROBOTIZATION_AUDIO_EFFECT_H
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.
STFT.h
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition EffectBase.h:54
openshot::Robotization::RobotizationEffect
Definition Robotization.h:78
openshot::Robotization::RobotizationEffect::RobotizationEffect
RobotizationEffect(Robotization &p)
Definition Robotization.h:80
openshot::Robotization::Robotization
Robotization()
Default constructor.
Definition Robotization.cpp:20
openshot::Robotization::fft
std::unique_ptr< juce::dsp::FFT > fft
Definition Robotization.h:90
openshot::Robotization::mutex
std::recursive_mutex mutex
Definition Robotization.h:88
openshot::Robotization::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition Robotization.cpp:139
openshot::Robotization::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition Robotization.cpp:123
openshot::Robotization::hop_size
openshot::HopSize hop_size
Definition Robotization.h:50
openshot::Robotization::fft_size
openshot::FFTSize fft_size
Definition Robotization.h:49
openshot::Robotization::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition Robotization.cpp:106
openshot::Robotization::window_type
openshot::WindowType window_type
Definition Robotization.h:51
openshot::Robotization::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 Robotization.h:61
openshot::Robotization::Json
std::string Json() const override
Generate JSON string of this object.
Definition Robotization.cpp:85
openshot::Robotization::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition Robotization.cpp:92
openshot::Robotization::stft
RobotizationEffect stft
Definition Robotization.h:89
openshot::STFT::STFT
STFT()
Definition STFT.h:24
juce::dsp
Definition Robotization.h:30
juce
Definition Robotization.h:29
openshot
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29
openshot::FFTSize
FFTSize
This enumeration determines the FFT size.
Definition Enums.h:130
openshot::HopSize
HopSize
This enumeration determines the hop size.
Definition Enums.h:143
openshot::WindowType
WindowType
This enumeration determines the window type.
Definition Enums.h:150