View Single Post
Old 12-29-2018, 11:07 AM   #8
Human being with feelings
Xenakios's Avatar
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,059

Originally Posted by Nonlinear View Post

I have been initializing my variables, arrays, etc., in the plugin constructor and updating in the Process() block before the process loop. Is that wrong?
Yeah, just initializing in the constructor is not really enough. You have more up to date information available in the Reset call like the maximum buffer size the host is going to use and the sample rate, so that's really the proper place to do the DSP initializations.

How you deal with your variables in your Process method is up to you and what you need to do. Obviously many algorithms will need their variables to remain at their last values between the Process calls, so you should not be resetting them at every Process call. (And in that case they should be member variables of the plugin class. NEVER use global or static variables that you are going to modify in a plugin.)
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :

Last edited by Xenakios; 12-29-2018 at 11:12 AM.
Xenakios is online now   Reply With Quote