im new in juce and im trying to make the plugin tutorial 14 and 15 from youtube
i got success but im trying to make now tutorial 16 and implant this treeState.createAndAddParameter(std::make_unique (GAIN_ID, GAIN_NAME, GAIN_NAME, gainRange,0.5f, nullptr, nullptr));
First of all, if you face a failing build, the exact error message your compiler gives you helps a lot to find out what went wrong even if they may look somewhat confusing for a newcomer, so it’s always a good idea to post your error message with such posts to help people helping you.
There are no official JUCE youtube tutorials so it’s not really clear what you mean by tutorial 14, 15 and 16, and you probably found some outdated non-official tutorial. This becomes especially evident as using the createAndAddParameter API is not the recommended state of the art approach with creating parameters anymore. That being said it still can be used, so although you might be learning an outdated approach here, this should not be the source of any build error.
You need to tell std::make_unique which type of object it should create. As std::make_unique is a function template, you do this by specifying the type of object to create as template parameter. As we want to create a std::unique_ptr holding an AudioProcessorValueTreeState::Parameter instance, you need to call
tnx for your answer sir
im a beginner so i guess i need to learn some more about the right way to implant in juce.
my experience is only arduino c. the videos on youtube is some guy tutorial and thats the only thing i can find for getting start. can you recommend me some basic reading or video of basics juce language? how to implant constructor right and so on?
When I got started a few years ago the official tutorials helped me a lot. That should of course not mean that the videos you found are bad only because an old API was used – changes in the framework happen from time to time and probably 95% of what you learned might still be correct. I just don’t know what you watched However, you can be sure that the official tutorials are updated if the framework gets updated.
One more thing as you mention
and as you mention that your
Both, JUCE and Arduino use the same language which is C++ and Arduino is a great experience to get started! As Arduino only uses a limited subset of the C++ syntax this might not become that obvious in the first place. So what I can recomend every newcomer is to learn pure basic C++ a bit before starting with a framework like JUCE that is written in C++. You will immediately get a better understanding of the syntax if you understood C++. The internet should be full of C++ tutorials, just have a look and try writing a few dumb command line applications – I’m sure that will help you moving forward with JUCE