jatinchowdhury18 / ComplexNonlinearities

Complex Nonlinearities for Audio Signal Processing
GNU General Public License v3.0
188 stars 21 forks source link

Errors building DoubleSoftClipper on linux #5

Closed YLB-YLB closed 3 years ago

YLB-YLB commented 3 years ago
Hi! I've come around your articles on Medium and wanted to try some plugins. When I try to build DoubleSoftClipper, I get the following errors: ` ~/sources/ComplexNonlinearities/DoubleSoftClipper/Plugin/Builds/LinuxMakefile > make Compiling include_juce_audio_plugin_client_VST2.cpp Compiling PluginProcessor.cpp ../../Source/PluginProcessor.cpp: In constructor ‘DoubleSoftClipperAudioProcessor::DoubleSoftClipperAudioProcessor()’: ../../Source/PluginProcessor.cpp:29:41: error: cannot convert ‘std::atomic’ to ‘float’ in assignment 29 upperLim = vts.getRawParameterValue ("upperlim"); ~~~~~^~~~
std::atomic*
../../Source/PluginProcessor.cpp:30:41: error: cannot convert ‘std::atomic’ to ‘float’ in assignment 30 lowerLim = vts.getRawParameterValue ("lowerlim"); ~~~~~^~~~
std::atomic*
../../Source/PluginProcessor.cpp:31:38: error: cannot convert ‘std::atomic’ to ‘float’ in assignment 31 slope = vts.getRawParameterValue ("slope"); ~~~~~^~~~~
std::atomic*
../../Source/PluginProcessor.cpp:32:38: error: cannot convert ‘std::atomic’ to ‘float’ in assignment 32 width = vts.getRawParameterValue ("width"); ~~~~~^~~~~
std::atomic*
../../Source/PluginProcessor.cpp:33:42: error: cannot convert ‘std::atomic’ to ‘float’ in assignment 33 upperSkew = vts.getRawParameterValue ("upperskew"); ~~~~~^~~~~
std::atomic*
../../Source/PluginProcessor.cpp:34:42: error: cannot convert ‘std::atomic’ to ‘float’ in assignment 34 lowerSkew = vts.getRawParameterValue ("lowerskew"); ~~~~~^~~~~
std::atomic*

make: *** [Makefile:220 : build/intermediate/Debug/PluginProcessor_a059e380.o] Erreur 1 ` I'm using Juce 6.0.1 on linux Mint 20 based on Ubuntu 20.04. For the record, I've already successfully built some of your projects like the Aphex Exciter, also based on Juce. Could you please help me with this problem?

Regards, Yoann

YLB-YLB commented 3 years ago

Well, I've tried all of the plugins and each time I get the same error when compiling: cannot convert ‘std::atomic<float>*’ to ‘float*’ in assignment [...] Each time it is related to this kind of line: [parameter name] = vts.getRawParameterValue ("[parameter name]")

Could it be a problem with my Juce version?

jatinchowdhury18 commented 3 years ago

Hi @YLB-YLB,

Yes, the plugins in this repo were developed with JUCE v5.4.4. I believe the breaking change that causes this compilaton error was introduced in v5.4.6.

Probably the easiest fix is to download an earlier version of JUCE from their GitHub page: https://github.com/juce-framework/JUCE/tree/5.4.4

Alternatively, if you prefer to patch it yourself, you could change any instance of float* paramHandle to std::atomic<float>* paramHandle. Any corresponding instances of *paramHandle should be changed to paramHandle->load().

Let me know if this works for you, I'm happy to help you get this working, with whatever method you choose.

In the future, I'll be sure to specify the version of JUCE in the README.

Thanks, Jatin

YLB-YLB commented 3 years ago

Thanks for pointing exactly what was wrong on my side! I'll get JUCE 5.4.4 and give it a try to make these plugins compile without errors for JUCE v6.0.1. I already got 4 of them working by simply swapping float* to std::atomic<float>*. If you give me some time I could push you a v6.0.1 branch (or whatever name suits you) with the corresponding commits :)

jatinchowdhury18 commented 3 years ago

Closing as the repository has now been upgraded for JUCE 6