COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 05-14-2017, 07:08 PM   #1
br_ck1
Human being with feelings
 
Join Date: Dec 2015
Posts: 39
Default INSIDE THE METHOD OnParamChange()...

Hi, I have a quick and naive question :

is it possible -INSIDE THE METHOD OnParamChange()- to call OnParamChange() itself for a param (BEING SURE TO AVOID ANY POSSIBLE INCOMPATIBILITY WITH ALL OS/HOSTS)?

example:

//EVERYTHING BELOW IS WRITTEN INSIDE THE METHOD OnParamChange()

//switch/case ParamIdx

case param_ONE:
//process something...
break;

case param_TWO:
//process something else and...
OnParamChange(param_ONE);//is it possible to add this without incompatibilities?
break;


Thank you in advance!
br_ck1 is offline   Reply With Quote
Old 05-14-2017, 10:58 PM   #2
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 331
Default

Quote:
Originally Posted by br_ck1 View Post
is it possible -INSIDE THE METHOD OnParamChange()- to call OnParamChange() itself for a param (BEING SURE TO AVOID ANY POSSIBLE INCOMPATIBILITY WITH ALL OS/HOSTS)?
Sure, I do it in my plugins.

An example might be if you had a filter plugin that emulated 20 different well-known lowpass filters (24 dB ladder, etc.), with the type selected by a drop-down menu, a frequency knob, and a resonance knob. When the user selects a different filter type, your OnParamChange code might change an internal index so that the processing function routes the audio through the selected filter, and you'll probably want to call OnParamChange for the frequency, and again for resonance. That would be a lot smarter than updating freq/res on all 20 filters each time to ensure their settings are current.
earlevel is offline   Reply With Quote
Old 05-15-2017, 04:49 AM   #3
br_ck1
Human being with feelings
 
Join Date: Dec 2015
Posts: 39
Default

Quote:
Originally Posted by earlevel View Post
Sure, I do it in my plugins.

An example might be if you had a filter plugin that emulated 20 different well-known lowpass filters (24 dB ladder, etc.), with the type selected by a drop-down menu, a frequency knob, and a resonance knob. When the user selects a different filter type, your OnParamChange code might change an internal index so that the processing function routes the audio through the selected filter, and you'll probably want to call OnParamChange for the frequency, and again for resonance. That would be a lot smarter than updating freq/res on all 20 filters each time to ensure their settings are current.
Thank you so much for your reply earlevel
br_ck1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.