Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated project dependencies. #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jucer_project_settings(
PROJECT_VERSION "0.0.4"
COMPANY_NAME "Symbel"
COMPANY_EMAIL "[email protected]"
REPORT_JUCE_APP_USAGE ON # Required for closed source applications without an Indie or Pro JUCE license
USE_GLOBAL_APPCONFIG_HEADER OFF
ADD_USING_NAMESPACE_JUCE_TO_JUCE_HEADER OFF
DISPLAY_THE_JUCE_SPLASH_SCREEN OFF # Required for closed source applications without an Indie or Pro JUCE license
PROJECT_TYPE "Audio Plug-in"
BUNDLE_IDENTIFIER "com.Symbel.Tsuru"
Expand Down Expand Up @@ -94,7 +95,6 @@ jucer_project_module(
# JUCE_USE_WINRT_MIDI
# JUCE_ASIO
# JUCE_WASAPI
# JUCE_WASAPI_EXCLUSIVE
# JUCE_DIRECTSOUND
# JUCE_ALSA
# JUCE_JACK
Expand Down Expand Up @@ -133,6 +133,8 @@ jucer_project_module(
# JUCE_PLUGINHOST_VST3
# JUCE_PLUGINHOST_AU
# JUCE_PLUGINHOST_LADSPA
# JUCE_PLUGINHOST_LV2
# JUCE_PLUGINHOST_ARA
# JUCE_CUSTOM_VST3_SDK
)

Expand Down Expand Up @@ -209,20 +211,20 @@ jucer_project_module(
)

jucer_export_target(
"Xcode (MacOSX)"
"Xcode (macOS)"
# VST3_SDK_FOLDER
COMPILER_FLAGS_FOR_AllWarnings "-Werror -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-overflow=5 -Wno-unused -Wno-variadic-macros -Wundef -Wno-parentheses -Wold-style-cast -fdiagnostics-show-option"
)

jucer_export_target_configuration(
"Xcode (MacOSX)"
"Xcode (macOS)"
NAME "Debug"
DEBUG_MODE ON
BINARY_NAME "Tsuru"
)

jucer_export_target_configuration(
"Xcode (MacOSX)"
"Xcode (macOS)"
NAME "Release"
DEBUG_MODE OFF
BINARY_NAME "Tsuru"
Expand Down
10 changes: 4 additions & 6 deletions Plugin/Source/CutoffFrequencyVisualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ void CutoffFrequencyVisualizer::drawFrequencyVerticalLine(float frequency,

void CutoffFrequencyVisualizer::drawFilterShape(float frequency, juce::Graphics& g) const
{
const auto w = static_cast<float>(getWidth ());
const auto h = static_cast<float>(getHeight ());
const auto w = static_cast<float>(getWidth());
const auto h = static_cast<float>(getHeight());

const auto targetFrequencyPosX = w * range.convertTo0to1(frequency);
juce::Path p;

p.startNewSubPath(0.f, h * 0.5f);
p.quadraticTo(targetFrequencyPosX, h * 0.5f, targetFrequencyPosX,
h *0.35f);
p.quadraticTo(targetFrequencyPosX, h *0.4f,
targetFrequencyPosX + w * 0.1f, h);
p.quadraticTo(targetFrequencyPosX, h * 0.5f, targetFrequencyPosX, h * 0.35f);
p.quadraticTo(targetFrequencyPosX, h * 0.4f, targetFrequencyPosX + w * 0.1f, h);
constexpr auto strokeThickness{2};
g.strokePath(p, juce::PathStrokeType(strokeThickness));
}
Expand Down
17 changes: 8 additions & 9 deletions Plugin/Source/CutoffSequenceComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ class CutoffSequenceComponent : public juce::Component
auto& parameter = processor.getParameterFromName(
"Step " + std::to_string(stepIndex) + " frequency");
const auto frequencyRange = MathUtils::frequencyRange<float>();
frequencySliders[stepIndex]->onValueChange = [this, frequencyRange,
&parameter]() {
const auto value = static_cast<float>(frequencySliders[stepIndex]->getValue());
frequencySliders[stepIndex]->onValueChange = [this, frequencyRange, &parameter]()
{
const auto value =
static_cast<float>(frequencySliders[stepIndex]->getValue());
parameter.setValueNotifyingHost(frequencyRange.convertTo0to1(value));
};
frequencySliders[stepIndex]->onDragStart = [&parameter]() {
parameter.beginChangeGesture();
};
frequencySliders[stepIndex]->onDragEnd = [&parameter]() {
parameter.endChangeGesture();
};
frequencySliders[stepIndex]->onDragStart = [&parameter]()
{ parameter.beginChangeGesture(); };
frequencySliders[stepIndex]->onDragEnd = [&parameter]()
{ parameter.endChangeGesture(); };
}

void resized() override;
Expand Down
10 changes: 5 additions & 5 deletions Plugin/Source/JuceHeaderWrapper.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

#pragma once

#if (defined (_WIN32) || defined (_WIN64))
#pragma warning( push )
#pragma warning( disable : 4068)
#if (defined(_WIN32) || defined(_WIN64))
#pragma warning(push)
#pragma warning(disable : 4068)
#endif

#pragma clang diagnostic push
Expand All @@ -15,6 +15,6 @@

#pragma clang diagnostic pop

#if (defined (_WIN32) || defined (_WIN64))
#pragma warning( pop )
#if (defined(_WIN32) || defined(_WIN64))
#pragma warning(pop)
#endif
14 changes: 6 additions & 8 deletions Plugin/Source/MathUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ namespace MathUtils
constexpr auto frequencySpectrumMin = 26;
constexpr auto frequencySpectrumMax = 16000;
template <typename T>
[[nodiscard]] NormalisableRange<T> frequencyRange(T min = frequencySpectrumMin,
T max = frequencySpectrumMax) noexcept
[[nodiscard]] juce::NormalisableRange<T>
frequencyRange(T min = frequencySpectrumMin, T max = frequencySpectrumMax) noexcept
{
constexpr auto convertFrom0To1Func = [](auto min, auto max, auto value) {
return juce::mapToLog10(value, min, max);
};
constexpr auto convertTo0To1Func = [](auto min, auto max, auto value) {
return juce::mapFromLog10(value, min, max);
};
constexpr auto convertFrom0To1Func = [](auto min, auto max, auto value)
{ return juce::mapToLog10(value, min, max); };
constexpr auto convertTo0To1Func = [](auto min, auto max, auto value)
{ return juce::mapFromLog10(value, min, max); };
return {min, max, convertFrom0To1Func, convertTo0To1Func};
}

Expand Down
18 changes: 10 additions & 8 deletions Plugin/Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ FunFilterAudioProcessor::FunFilterAudioProcessor() noexcept
addParameter(
std::make_unique<ChoiceParameterWithCallback>(
"Rate", juce::StringArray{"1/8", "1/4", "1/2", "1", "2", "4", "8"}, 4,
[this](int value) {
[this](int value)
{
broadcaster.setValue<ValueIds::sequenceDuration>(
static_cast<double>(value));
setSequenceDuration(std::pow(2, static_cast<double>(value + 1) / 8));
Expand Down Expand Up @@ -198,7 +199,8 @@ FunFilterAudioProcessor::getParameterFromName(const std::string_view paramName)
auto& parameterList = getParameters();
auto paramIt =
std::find_if(std::begin(parameterList), std::end(parameterList),
[&paramName](const auto& parameter) {
[&paramName](const auto& parameter)
{
constexpr auto maxCharacters = 30;
return parameter->getName(maxCharacters) == paramName.data();
});
Expand All @@ -216,12 +218,12 @@ void FunFilterAudioProcessor::processBlock(
auto* playHeadPtr = getPlayHead();
if (playHead != nullptr)
{
juce::AudioPlayHead::CurrentPositionInfo info;
if (playHeadPtr->getCurrentPosition(info))
const auto positionOpt = playHeadPtr->getPosition();
if (positionOpt.hasValue())
{
const auto timeInSamples = info.timeInSamples;
const auto timeInSamples = positionOpt->getTimeInSeconds();
filterChoregraphyStepPeriodInSamples =
calculateChoregraphyPeriodInSamplesFromBpm(info.bpm);
calculateChoregraphyPeriodInSamplesFromBpm(positionOpt->getBpm());
currentFrequencyIndex =
(timeInSamples
/ static_cast<int64_t>(filterChoregraphyStepPeriodInSamples))
Expand Down Expand Up @@ -269,8 +271,8 @@ juce::AudioProcessorEditor* FunFilterAudioProcessor::createEditor()
return std::make_unique<FunFilterEditor>(*this, broadcaster).release();
}

void FunFilterAudioProcessor::getStateInformation([
[maybe_unused]] juce::MemoryBlock& destData)
void FunFilterAudioProcessor::getStateInformation(
[[maybe_unused]] juce::MemoryBlock& destData)
{
juce::XmlElement mainElement("TsuruPreset");
for (const auto& parameter : getParameters())
Expand Down
3 changes: 2 additions & 1 deletion Plugin/Source/RateKnob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ RateKnob::RateKnob(UiBroadcaster& broadcaster_,
knob.setNormalisableRange({static_cast<double>(parameterRange.start),
static_cast<double>(parameterRange.end),
static_cast<float>(parameterRange.interval)});
knob.onValueChange = [parameterRange, &parameter, this]() {
knob.onValueChange = [parameterRange, &parameter, this]()
{
const auto normalizedParam =
parameterRange.convertTo0to1(static_cast<float>(knob.getValue()));
parameter.setValueNotifyingHost(normalizedParam);
Expand Down
3 changes: 2 additions & 1 deletion Plugin/Source/ResonanceKnob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ ResonanceKnob::ResonanceKnob(UiBroadcaster& broadcaster_,
dynamic_cast<juce::AudioParameterFloat&>(parameter).range;
knob.setNormalisableRange({static_cast<double>(parameterRange.getRange().getStart()),
static_cast<double>(parameterRange.getRange().getEnd())});
knob.onValueChange = [parameterRange, &parameter, this]() {
knob.onValueChange = [parameterRange, &parameter, this]()
{
const auto normalizedParam =
parameterRange.convertTo0to1(static_cast<float>(knob.getValue()));
parameter.setValueNotifyingHost(normalizedParam);
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty/FRUT
Submodule FRUT updated 199 files
2 changes: 1 addition & 1 deletion ThirdParty/JUCE
Submodule JUCE updated 2808 files