Well, it’s confirmed: I have no idea what I’m doing.
This devlog is very delayed due to a lot of errors within Reconstruct that I discovered upon attempting to test the VST.
Until this point, I had only been testing Reconstruct as a standalone app, which worked just fine. Switching to the VST, however, introduced a lot of new errors. A lot of crashes all of which were fixed pretty quickly, but the main issue was with state saving.
I learnt the hard way that VSTs destruct all of their visual elements when closed in a DAW. This makes perfect sense, but is a bit of an issue when all of my variables were stored within those visual elements. This meant that whenever the VST was closed, it completely reset.
All variables would be set to their default values.
After a lot of painstaking research, I discovered that JUCE had something called AudioProcessorValueTreeStates. What they are, I still don’t really know, but I had to use them to store all information.
I did this by making a function to store every variable I needed within this ValueTreeState. This is done within the AudioProcessor, and therefore is not destructed unless the VST is deleted from a project.
For the sliders, I then made slider attachments that attach to these variables and adjust their range accordingly.
For other values, it isn’t so simple. For the envelope, I made a function called updateVTS(), which updates all of the values when you change a value on the envelope.
Then, when the envelope is constructed, it recalls these parameters in order to be the same as when the visuals were closed.
The process is very boring, but I essentially had to learn how to do this and apply it to every single value that had to be stored. There were a lot.
In more exciting news, I added a second granulation engine, meaning that Reconstruct can now produce more complex output, and has more flexibility to offer the user.
I have made a video demoing Reconstruct and it can now be downloaded for Windows.
Download: https://github.com/JREWeav/Reconstruct/releases/tag/beta
I was also given the opportunity to show off Reconstruct at my degree show, and the feedback there was incredible and helped me find things to fine tune. People enjoyed playing with it whether they understood it or not.
This is the last devlog for a while, as I will be moving to other projects. Reconstruct is on pause for now, as I have handed it in for my final university project. Stay tuned to the blog, though, as I intend to continue posting about new projects and experiences on this blog. The development of Reconstruct so far has taught me a lot of invaluable experience, and I am looking forward to returning to it and making it even better.
I hope that Reconstruct can be useful for you, and that you have enjoyed these non-consistent updates on the progress.