| 
    OpenShot Library | libopenshot
    0.4.0
    
   | 
 
 
 
 
Go to the documentation of this file.
   26     fft_size(fft_size), hop_size(hop_size),
 
   27     window_type(window_type), stft(*this)
 
   30     init_effect_details();
 
   34 void Robotization::init_effect_details()
 
   42     info.
description = 
"Transform the voice present in an audio track into a robotic voice effect.";
 
   49 std::shared_ptr<openshot::Frame> 
Robotization::GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
 
   51     const std::lock_guard<std::recursive_mutex> lock(
mutex);
 
   52     ScopedNoDenormals noDenormals;
 
   54     const int num_input_channels = frame->audio->getNumChannels();
 
   55     const int num_output_channels = frame->audio->getNumChannels();
 
   56     const int num_samples = frame->audio->getNumSamples();
 
   57     const int hop_size_value = 1 << ((int)
hop_size + 1);
 
   58     const int fft_size_value = 1 << ((int)
fft_size + 5);
 
   71 void Robotization::RobotizationEffect::modification(
const int channel)
 
   75     for (
int index = 0; index < 
fft_size; ++index) {
 
  115     catch (
const std::exception& e)
 
  118         throw InvalidJSON(
"JSON is invalid (missing keys or invalid data types)");
 
  128     if (!root[
"fft_size"].isNull())
 
  131     if (!root[
"hop_size"].isNull())
 
  134     if (!root[
"window_type"].isNull())
 
  168     return root.toStyledString();
 
  
Json::Value add_property_json(std::string name, float value, std::string type, std::string memo, const Keyframe *keyframe, float min_value, float max_value, bool readonly, int64_t requested_frame) const
Generate JSON for a property.
 
const Json::Value stringToJson(const std::string value)
 
EffectInfoStruct info
Information about the current effect.
 
openshot::FFTSize fft_size
 
This namespace is the default namespace for all code in the openshot library.
 
Json::Value add_property_choice_json(std::string name, int value, int selected_value) const
Generate JSON choice for a property (dropdown properties)
 
virtual Json::Value JsonValue() const
Generate Json::Value for this object.
 
openshot::WindowType window_type
 
std::recursive_mutex mutex
 
std::unique_ptr< juce::dsp::FFT > fft
 
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
 
std::string PropertiesJSON(int64_t requested_frame) const override
 
openshot::HopSize hop_size
 
juce::HeapBlock< juce::dsp::Complex< float > > frequency_domain_buffer
 
Json::Value BasePropertiesJSON(int64_t requested_frame) const
Generate JSON object of base properties (recommended to be used by all effects)
 
std::string Json() const override
Generate JSON string of this object.
 
Exception for invalid JSON.
 
Header file for Robotization audio effect class.
 
bool has_audio
Determines if this effect manipulates the audio of a frame.
 
FFTSize
This enumeration determines the FFT size.
 
void process(juce::AudioBuffer< float > &block)
 
Header file for Frame class.
 
std::string class_name
The class name of the effect.
 
std::string description
The description of this effect and what it does.
 
void SetJson(const std::string value) override
Load JSON string into this object.
 
bool has_video
Determines if this effect manipulates the image of a frame.
 
This class adds a robotization effect into the audio.
 
Json::Value JsonValue() const override
Generate Json::Value for this object.
 
void updateParameters(const int new_fft_size, const int new_overlap, const int new_window_type)
 
juce::HeapBlock< juce::dsp::Complex< float > > time_domain_buffer
 
HopSize
This enumeration determines the hop size.
 
std::string name
The name of the effect.
 
Robotization()
Default constructor.
 
void setup(const int num_input_channels)
 
WindowType
This enumeration determines the window type.
 
Header file for all Exception classes.
 
virtual void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
 
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...