Organizing a modal synth? A few beginner questions


#1

I’m working on figuring this all out from the video tutorials here which are great:

My primary synths I’m learning Juce to tackle are Reaktor modal synths i build using sine waves or resonant bandpass filters at their heart. I’m trying to convert them over to Juce for greater efficiency and thus more partials.

I think I’m starting to see how I would have to do this.

Essentially I think my approach must be:

Calculate global parameters (general calculations based on knob/note values that are needed per note event for all partials in that note to read from) and output as variables from this section.

Create a single new class eg. “ModeComponent” representing the pathway for a single mode. Calculations on here will be based on general parameter output above and a int parameter “n” representing partial #. This ModeComponent should do everything that is needed start to finish for that individual mode.

Then I would run a “for” loop on this ModeComponent with I think starting at n=1 (partial 1) and maxP representing the max partial per voice here in this case of 100:

for (n=1; maxP < 100; n++) {
statements required for ModeComponent to run
}

Is this the correct way to do this? How would I get the 100 partials all combined added back into one voice after that? Can I put something in the for loop that says the output of n=1 gets added to n=2, etc. ?

I’m new to juce and C++ so I know this is stupid, but I have little to fall back on. If it wasn’t for those YouTube videos I think I’d be completely lost. As it is I feel like I can get something basic up and running in a few weeks hopefully, which isn’t bad. :slight_smile:

Thanks