OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
Whisperization.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_WHISPERIZATION_AUDIO_EFFECT_H
14
#define OPENSHOT_WHISPERIZATION_AUDIO_EFFECT_H
15
#define _USE_MATH_DEFINES
16
17
#include <memory>
18
#include <mutex>
19
#include <string>
20
21
#include "
../EffectBase.h
"
22
23
#include "
../Json.h
"
24
#include "
../KeyFrame.h
"
25
#include "
../Enums.h
"
26
#include "
STFT.h
"
27
28
namespace
juce
{
29
namespace
dsp {
30
class
FFT;
31
}
32
}
33
34
namespace
openshot
35
{
36
class
Frame
;
41
class
Whisperization
:
public
EffectBase
42
{
43
private
:
45
void
init_effect_details();
46
47
public
:
48
openshot::FFTSize
fft_size
;
49
openshot::HopSize
hop_size
;
50
openshot::WindowType
window_type
;
51
53
Whisperization
();
54
56
Whisperization
(
openshot::FFTSize
fft_size
,
57
openshot::HopSize
hop_size
,
58
openshot::WindowType
window_type
);
59
60
std::shared_ptr<openshot::Frame>
GetFrame
(int64_t frame_number)
override
{
61
return
GetFrame
(std::make_shared<openshot::Frame>(), frame_number);
62
}
63
64
std::shared_ptr<openshot::Frame>
65
GetFrame
(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
override
;
66
67
// Get and Set JSON methods
68
std::string
Json
()
const override
;
69
void
SetJson
(
const
std::string value)
override
;
70
Json::Value
JsonValue
()
const override
;
71
void
SetJsonValue
(
const
Json::Value root)
override
;
72
73
std::string
PropertiesJSON
(int64_t requested_frame)
const override
;
74
75
76
class
WhisperizationEffect
:
public
STFT
77
{
78
public
:
79
WhisperizationEffect
(
Whisperization
& p) : parent (p) { }
80
81
private
:
82
void
modification(
const
int
channel)
override
;
83
84
Whisperization
&parent;
85
};
86
87
std::recursive_mutex
mutex
;
88
WhisperizationEffect
stft
;
89
std::unique_ptr<juce::dsp::FFT>
fft
;
90
};
91
92
}
93
94
#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.
STFT.h
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition
EffectBase.h:57
openshot::Frame
This class represents a single frame of video (i.e. image & audio data).
Definition
Frame.h:90
openshot::STFT::STFT
STFT()
Definition
STFT.h:24
openshot::Whisperization::WhisperizationEffect
Definition
Whisperization.h:77
openshot::Whisperization::WhisperizationEffect::WhisperizationEffect
WhisperizationEffect(Whisperization &p)
Definition
Whisperization.h:79
openshot::Whisperization::fft
std::unique_ptr< juce::dsp::FFT > fft
Definition
Whisperization.h:89
openshot::Whisperization::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
Whisperization.h:60
openshot::Whisperization::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
Whisperization.cpp:131
openshot::Whisperization::Whisperization
Whisperization()
Default constructor.
Definition
Whisperization.cpp:20
openshot::Whisperization::Json
std::string Json() const override
Generate JSON string of this object.
Definition
Whisperization.cpp:93
openshot::Whisperization::window_type
openshot::WindowType window_type
Definition
Whisperization.h:50
openshot::Whisperization::stft
WhisperizationEffect stft
Definition
Whisperization.h:88
openshot::Whisperization::mutex
std::recursive_mutex mutex
Definition
Whisperization.h:87
openshot::Whisperization::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
Whisperization.cpp:100
openshot::Whisperization::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
Whisperization.cpp:147
openshot::Whisperization::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
Whisperization.cpp:114
openshot::Whisperization::fft_size
openshot::FFTSize fft_size
Definition
Whisperization.h:48
openshot::Whisperization::hop_size
openshot::HopSize hop_size
Definition
Whisperization.h:49
juce
Definition
Robotization.h:29
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
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
audio_effects
Whisperization.h
Generated by
1.17.0