Hello, i am kinda new to juce and c++ and i kinda get confused with the files. I am currently working on an audio plugin with my own algorythm for distortion. However the algorythm currently sits in its own class just in the same folder as the processor and the editor. How should i handle this? should i use something like the MVC?
Whats the best practice in juce and c++?
And also how should i organize my algorythm class? currently there is only one but maybe i will create another one. I saw, that juce has multiple dsp classes, all following kinda the same structure (prepare, reset, process functions). Should i do this too for my algorythm/s?
Hey Arcathrax,
I would personally recommend building JUCE style DSP modules for your own algorithms, at least to begin with.
They integrate well and minimal code is needed in the main project to define them. I learned a lot from looking through them, things like putting your process function in the header file for alignment/optimisation for example.
When you get into building even bigger plugins with lots of parameters, you might want to look at building a parameter helper class too. There’s some good examples on git (awesome juce repo iirc)
You could write everything into your processor.h/.cpp files if you really wanted to. But my personal conceptual approach is to prioritise easy readability of code, and being able to easily integrate the module into other projects.
I’ll let someone else comment on MVC use as it’s not really part of my approach.
Hope you’re having fun learning JUCE
