From 60c19f1da22b787aac6835364bcdf8e29ae97e74 Mon Sep 17 00:00:00 2001 From: Brenno Date: Fri, 16 Jul 2021 16:51:52 -0300 Subject: [PATCH] Added Delay and Echo effects --- src/CMakeLists.txt | 2 + src/EffectInfo.cpp | 8 ++ src/Effects.h | 2 + src/audio_effects/Compressor.cpp | 2 +- src/audio_effects/Delay.cpp | 190 +++++++++++++++++++++++++++ src/audio_effects/Delay.h | 110 ++++++++++++++++ src/audio_effects/Distortion.h | 2 +- src/audio_effects/Echo.cpp | 200 +++++++++++++++++++++++++++++ src/audio_effects/Echo.h | 112 ++++++++++++++++ src/audio_effects/Expander.cpp | 2 +- src/audio_effects/Expander.h | 2 +- src/audio_effects/ParametricEQ.cpp | 1 - src/audio_effects/ParametricEQ.h | 2 +- src/audio_effects/Robotization.h | 1 - 14 files changed, 629 insertions(+), 7 deletions(-) create mode 100644 src/audio_effects/Delay.cpp create mode 100644 src/audio_effects/Delay.h create mode 100644 src/audio_effects/Echo.cpp create mode 100644 src/audio_effects/Echo.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 345ebbd3..e9436217 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -133,6 +133,8 @@ set(EFFECTS_SOURCES effects/Wave.cpp audio_effects/STFT.cpp audio_effects/Noise.cpp + audio_effects/Delay.cpp + audio_effects/Echo.cpp audio_effects/Distortion.cpp audio_effects/ParametricEQ.cpp audio_effects/Compressor.cpp diff --git a/src/EffectInfo.cpp b/src/EffectInfo.cpp index 54f73bad..c6011fbc 100644 --- a/src/EffectInfo.cpp +++ b/src/EffectInfo.cpp @@ -91,6 +91,12 @@ EffectBase* EffectInfo::CreateEffect(std::string effect_type) { else if(effect_type == "Noise") return new Noise(); + else if(effect_type == "Delay") + return new Delay(); + + else if(effect_type == "Echo") + return new Echo(); + else if(effect_type == "Distortion") return new Distortion(); @@ -147,6 +153,8 @@ Json::Value EffectInfo::JsonValue() { root.append(Wave().JsonInfo()); /* Audio */ root.append(Noise().JsonInfo()); + root.append(Delay().JsonInfo()); + root.append(Echo().JsonInfo()); root.append(Distortion().JsonInfo()); root.append(ParametricEQ().JsonInfo()); root.append(Compressor().JsonInfo()); diff --git a/src/Effects.h b/src/Effects.h index 81317b41..c0da0741 100644 --- a/src/Effects.h +++ b/src/Effects.h @@ -50,6 +50,8 @@ /* Audio Effects */ #include "audio_effects/Noise.h" +#include "audio_effects/Delay.h" +#include "audio_effects/Echo.h" #include "audio_effects/Distortion.h" #include "audio_effects/ParametricEQ.h" #include "audio_effects/Compressor.h" diff --git a/src/audio_effects/Compressor.cpp b/src/audio_effects/Compressor.cpp index 5ee2f629..cf706e6e 100644 --- a/src/audio_effects/Compressor.cpp +++ b/src/audio_effects/Compressor.cpp @@ -74,7 +74,7 @@ std::shared_ptr Compressor::GetFrame(std::shared_ptraudio->getNumSamples(); mixed_down_input.setSize(1, num_samples); - inverse_sample_rate = 1.0f / frame->SampleRate(); //(float)getSampleRate(); + inverse_sample_rate = 1.0f / frame->SampleRate(); inverseE = 1.0f / M_E; if ((bool)bypass.GetValue(frame_number)) diff --git a/src/audio_effects/Delay.cpp b/src/audio_effects/Delay.cpp new file mode 100644 index 00000000..467ba756 --- /dev/null +++ b/src/audio_effects/Delay.cpp @@ -0,0 +1,190 @@ +/** + * @file + * @brief Source file for Delay audio effect class + * @author + * + * @ref License + */ + +/* LICENSE + * + * Copyright (c) 2008-2019 OpenShot Studios, LLC + * . This file is part of + * OpenShot Library (libopenshot), an open-source project dedicated to + * delivering high quality video editing and animation solutions to the + * world. For more information visit . + * + * OpenShot Library (libopenshot) is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * OpenShot Library (libopenshot) is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with OpenShot Library. If not, see . + */ + +#include "Delay.h" +#include "Exceptions.h" + +using namespace openshot; + +/// Blank constructor, useful when using Json to load the effect properties +Delay::Delay() : delay_time(1) { + // Init effect properties + init_effect_details(); +} + +// Default constructor +Delay::Delay(Keyframe new_delay_time) : delay_time(new_delay_time) +{ + // Init effect properties + init_effect_details(); +} + +// Init effect settings +void Delay::init_effect_details() +{ + /// Initialize the values of the EffectInfo struct. + InitEffectInfo(); + + /// Set the effect info + info.class_name = "Delay"; + info.name = "Delay"; + info.description = "Adjust the synchronism between the audio and video track."; + info.has_audio = true; + info.has_video = false; + initialized = false; +} + +void Delay::setup(std::shared_ptr frame) +{ + if (!initialized) + { + const float max_delay_time = 5; + delay_buffer_samples = (int)(max_delay_time * (float)frame->SampleRate()) + 1; + + if (delay_buffer_samples < 1) + delay_buffer_samples = 1; + + delay_buffer_channels = frame->audio->getNumChannels(); + delay_buffer.setSize(delay_buffer_channels, delay_buffer_samples); + delay_buffer.clear(); + delay_write_position = 0; + initialized = true; + } +} + +// This method is required for all derived classes of EffectBase, and returns a +// modified openshot::Frame object +std::shared_ptr Delay::GetFrame(std::shared_ptr frame, int64_t frame_number) +{ + const float delay_time_value = (float)delay_time.GetValue(frame_number)*(float)frame->SampleRate(); + int local_write_position; + + setup(frame); + + for (int channel = 0; channel < frame->audio->getNumChannels(); channel++) + { + float *channel_data = frame->audio->getWritePointer(channel); + float *delay_data = delay_buffer.getWritePointer(channel); + local_write_position = delay_write_position; + + for (auto sample = 0; sample < frame->audio->getNumSamples(); ++sample) + { + const float in = (float)(channel_data[sample]); + float out = 0.0f; + + float read_position = fmodf((float)local_write_position - delay_time_value + (float)delay_buffer_samples, delay_buffer_samples); + int local_read_position = floorf(read_position); + + if (local_read_position != local_write_position) + { + float fraction = read_position - (float)local_read_position; + float delayed1 = delay_data[(local_read_position + 0)]; + float delayed2 = delay_data[(local_read_position + 1) % delay_buffer_samples]; + out = (float)(delayed1 + fraction * (delayed2 - delayed1)); + + channel_data[sample] = in + (out - in); + delay_data[local_write_position] = in; + } + + if (++local_write_position >= delay_buffer_samples) + local_write_position -= delay_buffer_samples; + } + } + + delay_write_position = local_write_position; + + // return the modified frame + return frame; +} + +// Generate JSON string of this object +std::string Delay::Json() const { + + // Return formatted string + return JsonValue().toStyledString(); +} + +// Generate Json::Value for this object +Json::Value Delay::JsonValue() const { + + // Create root json object + Json::Value root = EffectBase::JsonValue(); // get parent properties + root["type"] = info.class_name; + root["delay_time"] = delay_time.JsonValue(); + + // return JsonValue + return root; +} + +// Load JSON string into this object +void Delay::SetJson(const std::string value) { + + // Parse JSON string into JSON objects + try + { + const Json::Value root = openshot::stringToJson(value); + // Set all values that match + SetJsonValue(root); + } + catch (const std::exception& e) + { + // Error parsing JSON (or missing keys) + throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); + } +} + +// Load Json::Value into this object +void Delay::SetJsonValue(const Json::Value root) { + + // Set parent data + EffectBase::SetJsonValue(root); + + // Set data from Json (if key is found) + if (!root["delay_time"].isNull()) + delay_time.SetJsonValue(root["delay_time"]); +} + +// Get all properties for a specific frame +std::string Delay::PropertiesJSON(int64_t requested_frame) const { + + // Generate JSON properties list + Json::Value root; + root["id"] = add_property_json("ID", 0.0, "string", Id(), NULL, -1, -1, true, requested_frame); + root["layer"] = add_property_json("Track", Layer(), "int", "", NULL, 0, 20, false, requested_frame); + root["start"] = add_property_json("Start", Start(), "float", "", NULL, 0, 1000 * 60 * 30, false, requested_frame); + root["end"] = add_property_json("End", End(), "float", "", NULL, 0, 1000 * 60 * 30, false, requested_frame); + root["duration"] = add_property_json("Duration", Duration(), "float", "", NULL, 0, 1000 * 60 * 30, true, requested_frame); + + // Keyframes + root["delay_time"] = add_property_json("Delay Time", delay_time.GetValue(requested_frame), "float", "", &delay_time, 0, 5, false, requested_frame); + + // Return formatted string + return root.toStyledString(); +} diff --git a/src/audio_effects/Delay.h b/src/audio_effects/Delay.h new file mode 100644 index 00000000..a693c292 --- /dev/null +++ b/src/audio_effects/Delay.h @@ -0,0 +1,110 @@ +/** + * @file + * @brief Header file for Delay audio effect class + * @author + * + * @ref License + */ + +/* LICENSE + * + * Copyright (c) 2008-2019 OpenShot Studios, LLC + * . This file is part of + * OpenShot Library (libopenshot), an open-source project dedicated to + * delivering high quality video editing and animation solutions to the + * world. For more information visit . + * + * OpenShot Library (libopenshot) is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * OpenShot Library (libopenshot) is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with OpenShot Library. If not, see . + */ + +#ifndef OPENSHOT_DELAY_AUDIO_EFFECT_H +#define OPENSHOT_DELAY_AUDIO_EFFECT_H + +#include "../EffectBase.h" + +#include "../Frame.h" +#include "../Json.h" +#include "../KeyFrame.h" + +#include +#include +#include +#include + + +namespace openshot +{ + + /** + * @brief This class adds a delay into the audio + * + */ + class Delay : public EffectBase + { + private: + /// Init effect settings + void init_effect_details(); + + public: + Keyframe delay_time; + + juce::AudioSampleBuffer delay_buffer; + int delay_buffer_samples; + int delay_buffer_channels; + int delay_write_position; + bool initialized; + + /// Blank constructor, useful when using Json to load the effect properties + Delay(); + + /// Default constructor + Delay(Keyframe new_delay_time); + + /// @brief This method is required for all derived classes of ClipBase, and returns a + /// new openshot::Frame object. All Clip keyframes and effects are resolved into + /// pixels. + /// + /// @returns A new openshot::Frame object + /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. + std::shared_ptr GetFrame(int64_t frame_number) override { + return GetFrame(std::make_shared(), frame_number); + } + + void setup(std::shared_ptr frame); + + /// @brief This method is required for all derived classes of ClipBase, and returns a + /// modified openshot::Frame object + /// + /// The frame object is passed into this method and used as a starting point (pixels and audio). + /// All Clip keyframes and effects are resolved into pixels. + /// + /// @returns The modified openshot::Frame object + /// @param frame The frame object that needs the clip or effect applied to it + /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; + + // Get and Set JSON methods + std::string Json() const override; ///< Generate JSON string of this object + void SetJson(const std::string value) override; ///< Load JSON string into this object + Json::Value JsonValue() const override; ///< Generate Json::Value for this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object + + /// Get all properties for a specific frame (perfect for a UI to display the current state + /// of all properties at any time) + std::string PropertiesJSON(int64_t requested_frame) const override; + }; + +} + +#endif diff --git a/src/audio_effects/Distortion.h b/src/audio_effects/Distortion.h index 63839b82..8163a075 100644 --- a/src/audio_effects/Distortion.h +++ b/src/audio_effects/Distortion.h @@ -49,7 +49,7 @@ namespace openshot { /** - * @brief This class adds a noise into the audio + * @brief This class adds a distortion into the audio * */ class Distortion : public EffectBase diff --git a/src/audio_effects/Echo.cpp b/src/audio_effects/Echo.cpp new file mode 100644 index 00000000..010f2d4c --- /dev/null +++ b/src/audio_effects/Echo.cpp @@ -0,0 +1,200 @@ +/** + * @file + * @brief Source file for Echo audio effect class + * @author + * + * @ref License + */ + +/* LICENSE + * + * Copyright (c) 2008-2019 OpenShot Studios, LLC + * . This file is part of + * OpenShot Library (libopenshot), an open-source project dedicated to + * delivering high quality video editing and animation solutions to the + * world. For more information visit . + * + * OpenShot Library (libopenshot) is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * OpenShot Library (libopenshot) is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with OpenShot Library. If not, see . + */ + +#include "Echo.h" +#include "Exceptions.h" + +using namespace openshot; + +/// Blank constructor, useful when using Json to load the effect properties +Echo::Echo() : echo_time(0.1), feedback(0.5), mix(0.5) { + // Init effect properties + init_effect_details(); +} + +// Default constructor +Echo::Echo(Keyframe new_echo_time, Keyframe new_feedback, Keyframe new_mix) : + echo_time(new_echo_time), feedback(new_feedback), mix(new_mix) +{ + // Init effect properties + init_effect_details(); +} + +// Init effect settings +void Echo::init_effect_details() +{ + /// Initialize the values of the EffectInfo struct. + InitEffectInfo(); + + /// Set the effect info + info.class_name = "Echo"; + info.name = "Echo"; + info.description = "Add echo on the frame's sound."; + info.has_audio = true; + info.has_video = false; + initialized = false; +} + +void Echo::setup(std::shared_ptr frame) +{ + if (!initialized) + { + const float max_echo_time = 5; + echo_buffer_samples = (int)(max_echo_time * (float)frame->SampleRate()) + 1; + + if (echo_buffer_samples < 1) + echo_buffer_samples = 1; + + echo_buffer_channels = frame->audio->getNumChannels(); + echo_buffer.setSize(echo_buffer_channels, echo_buffer_samples); + echo_buffer.clear(); + echo_write_position = 0; + initialized = true; + } +} + +// This method is required for all derived classes of EffectBase, and returns a +// modified openshot::Frame object +std::shared_ptr Echo::GetFrame(std::shared_ptr frame, int64_t frame_number) +{ + const float echo_time_value = (float)echo_time.GetValue(frame_number)*(float)frame->SampleRate(); + const float feedback_value = feedback.GetValue(frame_number); + const float mix_value = mix.GetValue(frame_number); + int local_write_position; + + setup(frame); + + for (int channel = 0; channel < frame->audio->getNumChannels(); channel++) + { + float *channel_data = frame->audio->getWritePointer(channel); + float *echo_data = echo_buffer.getWritePointer(channel); + local_write_position = echo_write_position; + + for (auto sample = 0; sample < frame->audio->getNumSamples(); ++sample) + { + const float in = (float)(channel_data[sample]); + float out = 0.0f; + + float read_position = fmodf((float)local_write_position - echo_time_value + (float)echo_buffer_samples, echo_buffer_samples); + int local_read_position = floorf(read_position); + + if (local_read_position != local_write_position) + { + float fraction = read_position - (float)local_read_position; + float echoed1 = echo_data[(local_read_position + 0)]; + float echoed2 = echo_data[(local_read_position + 1) % echo_buffer_samples]; + out = (float)(echoed1 + fraction * (echoed2 - echoed1)); + channel_data[sample] = in + mix_value*(out - in); + echo_data[local_write_position] = in + out*feedback_value; + } + + if (++local_write_position >= echo_buffer_samples) + local_write_position -= echo_buffer_samples; + } + } + + echo_write_position = local_write_position; + + // return the modified frame + return frame; +} + +// Generate JSON string of this object +std::string Echo::Json() const { + + // Return formatted string + return JsonValue().toStyledString(); +} + +// Generate Json::Value for this object +Json::Value Echo::JsonValue() const { + + // Create root json object + Json::Value root = EffectBase::JsonValue(); // get parent properties + root["type"] = info.class_name; + root["echo_time"] = echo_time.JsonValue(); + root["feedback"] = feedback.JsonValue(); + root["mix"] = mix.JsonValue(); + + // return JsonValue + return root; +} + +// Load JSON string into this object +void Echo::SetJson(const std::string value) { + + // Parse JSON string into JSON objects + try + { + const Json::Value root = openshot::stringToJson(value); + // Set all values that match + SetJsonValue(root); + } + catch (const std::exception& e) + { + // Error parsing JSON (or missing keys) + throw InvalidJSON("JSON is invalid (missing keys or invalid data types)"); + } +} + +// Load Json::Value into this object +void Echo::SetJsonValue(const Json::Value root) { + + // Set parent data + EffectBase::SetJsonValue(root); + + // Set data from Json (if key is found) + if (!root["echo_time"].isNull()) + echo_time.SetJsonValue(root["echo_time"]); + if (!root["feedback"].isNull()) + feedback.SetJsonValue(root["feedback"]); + if (!root["mix"].isNull()) + mix.SetJsonValue(root["mix"]); +} + +// Get all properties for a specific frame +std::string Echo::PropertiesJSON(int64_t requested_frame) const { + + // Generate JSON properties list + Json::Value root; + root["id"] = add_property_json("ID", 0.0, "string", Id(), NULL, -1, -1, true, requested_frame); + root["layer"] = add_property_json("Track", Layer(), "int", "", NULL, 0, 20, false, requested_frame); + root["start"] = add_property_json("Start", Start(), "float", "", NULL, 0, 1000 * 60 * 30, false, requested_frame); + root["end"] = add_property_json("End", End(), "float", "", NULL, 0, 1000 * 60 * 30, false, requested_frame); + root["duration"] = add_property_json("Duration", Duration(), "float", "", NULL, 0, 1000 * 60 * 30, true, requested_frame); + + // Keyframes + root["echo_time"] = add_property_json("Time", echo_time.GetValue(requested_frame), "float", "", &echo_time, 0, 5, false, requested_frame); + root["feedback"] = add_property_json("Feedback", feedback.GetValue(requested_frame), "float", "", &feedback, 0, 1, false, requested_frame); + root["mix"] = add_property_json("Mix", mix.GetValue(requested_frame), "float", "", &mix, 0, 1, false, requested_frame); + + // Return formatted string + return root.toStyledString(); +} diff --git a/src/audio_effects/Echo.h b/src/audio_effects/Echo.h new file mode 100644 index 00000000..9a120b6e --- /dev/null +++ b/src/audio_effects/Echo.h @@ -0,0 +1,112 @@ +/** + * @file + * @brief Header file for Echo audio effect class + * @author + * + * @ref License + */ + +/* LICENSE + * + * Copyright (c) 2008-2019 OpenShot Studios, LLC + * . This file is part of + * OpenShot Library (libopenshot), an open-source project dedicated to + * delivering high quality video editing and animation solutions to the + * world. For more information visit . + * + * OpenShot Library (libopenshot) is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * OpenShot Library (libopenshot) is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with OpenShot Library. If not, see . + */ + +#ifndef OPENSHOT_ECHO_AUDIO_EFFECT_H +#define OPENSHOT_ECHO_AUDIO_EFFECT_H + +#include "../EffectBase.h" + +#include "../Frame.h" +#include "../Json.h" +#include "../KeyFrame.h" + +#include +#include +#include +#include + + +namespace openshot +{ + + /** + * @brief This class adds a echo into the audio + * + */ + class Echo : public EffectBase + { + private: + /// Init effect settings + void init_effect_details(); + + public: + Keyframe echo_time; + Keyframe feedback; + Keyframe mix; + + juce::AudioSampleBuffer echo_buffer; + int echo_buffer_samples; + int echo_buffer_channels; + int echo_write_position; + bool initialized; + + /// Blank constructor, useful when using Json to load the effect properties + Echo(); + + /// Default constructor + Echo(Keyframe new_echo_time, Keyframe new_feedback, Keyframe new_mix); + + /// @brief This method is required for all derived classes of ClipBase, and returns a + /// new openshot::Frame object. All Clip keyframes and effects are resolved into + /// pixels. + /// + /// @returns A new openshot::Frame object + /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. + std::shared_ptr GetFrame(int64_t frame_number) override { + return GetFrame(std::make_shared(), frame_number); + } + + void setup(std::shared_ptr frame); + + /// @brief This method is required for all derived classes of ClipBase, and returns a + /// modified openshot::Frame object + /// + /// The frame object is passed into this method and used as a starting point (pixels and audio). + /// All Clip keyframes and effects are resolved into pixels. + /// + /// @returns The modified openshot::Frame object + /// @param frame The frame object that needs the clip or effect applied to it + /// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline. + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; + + // Get and Set JSON methods + std::string Json() const override; ///< Generate JSON string of this object + void SetJson(const std::string value) override; ///< Load JSON string into this object + Json::Value JsonValue() const override; ///< Generate Json::Value for this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object + + /// Get all properties for a specific frame (perfect for a UI to display the current state + /// of all properties at any time) + std::string PropertiesJSON(int64_t requested_frame) const override; + }; + +} + +#endif diff --git a/src/audio_effects/Expander.cpp b/src/audio_effects/Expander.cpp index 0d7c641b..468988c9 100644 --- a/src/audio_effects/Expander.cpp +++ b/src/audio_effects/Expander.cpp @@ -76,7 +76,7 @@ std::shared_ptr Expander::GetFrame(std::shared_ptraudio->getNumSamples(); mixed_down_input.setSize(1, num_samples); - inverse_sample_rate = 1.0f / frame->SampleRate(); //(float)getSampleRate(); + inverse_sample_rate = 1.0f / frame->SampleRate(); inverseE = 1.0f / M_E; if ((bool)bypass.GetValue(frame_number)) diff --git a/src/audio_effects/Expander.h b/src/audio_effects/Expander.h index 7fc37afa..4eee84af 100644 --- a/src/audio_effects/Expander.h +++ b/src/audio_effects/Expander.h @@ -47,7 +47,7 @@ namespace openshot { /** - * @brief This class adds a Expander into the audio + * @brief This class adds a expander (or noise gate) into the audio * */ class Expander : public EffectBase diff --git a/src/audio_effects/ParametricEQ.cpp b/src/audio_effects/ParametricEQ.cpp index 7ca9d3d6..46e384ea 100644 --- a/src/audio_effects/ParametricEQ.cpp +++ b/src/audio_effects/ParametricEQ.cpp @@ -78,7 +78,6 @@ std::shared_ptr ParametricEQ::GetFrame(std::shared_ptraudio->getNumSamples(); updateFilters(frame_number, num_samples); - // Add distortion for (int channel = 0; channel < frame->audio->getNumChannels(); channel++) { auto *channel_data = frame->audio->getWritePointer(channel); diff --git a/src/audio_effects/ParametricEQ.h b/src/audio_effects/ParametricEQ.h index e8a87f13..62da54ec 100644 --- a/src/audio_effects/ParametricEQ.h +++ b/src/audio_effects/ParametricEQ.h @@ -49,7 +49,7 @@ namespace openshot { /** - * @brief This class adds a noise into the audio + * @brief This class adds a equalization into the audio * */ class ParametricEQ : public EffectBase diff --git a/src/audio_effects/Robotization.h b/src/audio_effects/Robotization.h index 07838213..88a61116 100644 --- a/src/audio_effects/Robotization.h +++ b/src/audio_effects/Robotization.h @@ -60,7 +60,6 @@ namespace openshot void init_effect_details(); public: - // Keyframe shift; ///< Robotization shift keyframe. The Robotization shift inserted on the audio. openshot::FFTSize fft_size; openshot::HopSize hop_size; openshot::WindowType window_type;