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

CLAP preset discovery updates #35

Merged
merged 2 commits into from
Jan 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion modules/chowdsp_utils
Submodule chowdsp_utils updated 31 files
+3 −32 .github/workflows/code-quality.yml
+1 −1 examples/CMakeLists.txt
+2 −1 modules/common/chowdsp_data_structures/Allocators/chowdsp_ArenaAllocator.h
+5 −5 modules/common/chowdsp_data_structures/Allocators/chowdsp_ChainedArenaAllocator.h
+1 −1 modules/dsp/chowdsp_compressor/Compressor/chowdsp_CompressorGainComputer.h
+2 −2 modules/dsp/chowdsp_dsp_data_structures/Other/chowdsp_SmoothedBufferValue.cpp
+2 −2 modules/dsp/chowdsp_dsp_data_structures/Other/chowdsp_SmoothedBufferValue.h
+25 −9 modules/dsp/chowdsp_dsp_utils/Processors/chowdsp_Panner.cpp
+18 −13 modules/dsp/chowdsp_dsp_utils/Processors/chowdsp_Panner.h
+85 −0 modules/dsp/chowdsp_dsp_utils/Processors/chowdsp_WidthPanner.h
+1 −0 modules/dsp/chowdsp_dsp_utils/chowdsp_dsp_utils.h
+5 −4 modules/dsp/chowdsp_filters/LowerOrderFilters/chowdsp_IIRFilter.h
+43 −6 modules/dsp/chowdsp_filters/Utils/chowdsp_ConformalMaps.h
+35 −8 modules/dsp/chowdsp_math/Math/chowdsp_MatrixOps.h
+1 −1 modules/dsp/chowdsp_reverb/Reverb/chowdsp_Diffuser.h
+2 −2 modules/dsp/chowdsp_reverb/Reverb/chowdsp_FDN.h
+2 −0 modules/dsp/chowdsp_reverb/chowdsp_reverb.h
+4 −0 modules/dsp/chowdsp_sources/Oscillators/chowdsp_AdditiveOscillator.h
+6 −0 modules/dsp/chowdsp_sources/Oscillators/chowdsp_SineWave.h
+5 −5 modules/plugin/chowdsp_clap_extensions/PresetExtensions/chowdsp_CLAPPresetDiscoveryProviders.cpp
+4 −5 modules/plugin/chowdsp_clap_extensions/PresetExtensions/chowdsp_CLAPPresetDiscoveryProviders.h
+6 −1 modules/plugin/chowdsp_plugin_base/PluginBase/chowdsp_PluginBase.h
+2 −2 modules/plugin/chowdsp_plugin_base/PluginBase/chowdsp_SynthBase.h
+15 −0 modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetManager.cpp
+3 −1 modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetManager.h
+78 −28 tests/common_tests/chowdsp_data_structures_test/ArenaAllocatorTest.cpp
+1 −0 tests/dsp_tests/chowdsp_dsp_utils_test/CMakeLists.txt
+68 −0 tests/dsp_tests/chowdsp_dsp_utils_test/WidthPannerTest.cpp
+8 −2 tests/dsp_tests/chowdsp_filters_test/ConformalMapsTest.cpp
+18 −0 tests/dsp_tests/chowdsp_sources_test/SineTest.cpp
+5 −1 tests/plugin_tests/CMakeLists.txt
13 changes: 12 additions & 1 deletion src/ChowMultiTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ ChowMultiTool::ChowMultiTool() : chowdsp::PluginBase<State> (&undoManager, creat

presetManager = std::make_unique<state::presets::PresetManager> (*this);
programAdaptor = std::make_unique<chowdsp::presets::frontend::PresetsProgramAdapter> (presetManager);

#if HAS_CLAP_JUCE_EXTENSIONS
presetManager->clapPresetLoadedBroadcaster.connect (
[this] (uint32_t location_kind,
const char* location,
const char* load_key)
{
reportPresetLoaded (location_kind, location, load_key);
});
#endif
}

juce::AudioProcessor::BusesProperties ChowMultiTool::createBusLayout()
Expand Down Expand Up @@ -100,7 +110,8 @@ static const clap_preset_discovery_factory chowmultitool_preset_discovery_factor

const void* JUCE_CALLTYPE clapJuceExtensionCustomFactory (const char* factory_id)
{
if (strcmp (factory_id, CLAP_PRESET_DISCOVERY_FACTORY_ID) == 0)
if (strcmp (factory_id, CLAP_PRESET_DISCOVERY_FACTORY_ID) == 0
|| strcmp (factory_id, CLAP_PRESET_DISCOVERY_FACTORY_ID_COMPAT) == 0)
{
return &chowmultitool_preset_discovery_factory;
}
Expand Down
6 changes: 3 additions & 3 deletions src/state/presets/PresetDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace state::presets::discovery
{
static constexpr clap_plugin_id plugin_id {
static constexpr clap_universal_plugin_id plugin_id {
.abi = "clap",
.id = CHOWMULTITOOL_CLAP_ID,
};
Expand Down Expand Up @@ -35,7 +35,7 @@ struct FactoryPresetsProvider : chowdsp::presets::discovery::EmbeddedPresetsProv

static constexpr clap_preset_discovery_location factoryPresetsLocation {
.flags = CLAP_PRESET_DISCOVERY_IS_FACTORY_CONTENT,
.name = "ChowMultiTool Factory Presets Location",
.name = "ChowMultiTool Factory Presets",
.kind = CLAP_PRESET_DISCOVERY_LOCATION_PLUGIN,
.location = nullptr,
};
Expand All @@ -57,7 +57,7 @@ struct UserPresetsProvider : chowdsp::presets::discovery::FilePresetsProvider
static constexpr clap_preset_discovery_provider_descriptor descriptor {
.clap_version = CLAP_VERSION_INIT,
.id = "org.chowdsp.ChowMultiTool.user-presets",
.name = "ChowMultiTool User Presets Provider",
.name = "ChowMultiTool User Presets",
.vendor = "User"
};

Expand Down
Loading