# Dynamically Updating IParams

**URL:** <https://iplug2.discourse.group/t/dynamically-updating-iparams/537>\
**Category:** Uncategorized\
**Created:** [6 January 2022 21:05 UTC](https://iplug2.discourse.group/t/dynamically-updating-iparams/537 "2022-01-06T21:05:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![syntonica](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@syntonica](https://iplug2.discourse.group/u/syntonica)\
**Post date:** [6 January 2022 21:05 UTC](https://iplug2.discourse.group/t/dynamically-updating-iparams/537/1 "2022-01-06T21:05:03Z")

</div>

Hi All,

I’m ready to take the IPlug2 Challenge! Well, I have a “basic” synth plugin I wish to try porting over. However, I have a couple of questions regarding “best practices”.

I have a couple of parameters that change their meanings based on the type of synthesis selected. One parameter just changes its name label. The other control changes both the label and its display. All of my parameters are normalized as ranges of [0,1], but of course may be displayed as human-grokable values.

Am I better off making the changes directly? Or, should I create parameters for both uses and just swap pointers and then send a value change to force a redraw?

I haven’t looked deeply into the widget set to how they are created or drawn yet to see if this will work. I’m still at the point of deciding which graphics backend to use, but I wanted to see if the weirdness I do is even supported before I get started.

Regardless, thanks to all for time and effort!

---

<div class="post-metadata">

**Author:** ![syntonica](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@syntonica](https://iplug2.discourse.group/u/syntonica)\
**Post date:** [7 January 2022 03:59 UTC](https://iplug2.discourse.group/t/dynamically-updating-iparams/537/2 "2022-01-07T03:59:29Z")

</div>

I forgot to add my third option: two controls–one hidden and the other displayed, and this seems to be supported, so I think I have my answer on this.

I’m sure I’ll have more questions on other matters later… Wish me luck! 😬

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [8 January 2022 10:26 UTC](https://iplug2.discourse.group/t/dynamically-updating-iparams/537/3 "2022-01-08T10:26:43Z")

</div>

Welcome!

It’s a bit ugly, but for maximum compatibility I tend to make multiple parameters, rather than make parameters change their meanings. Can’t always rely on hosts/plug-in formats supporting dynamically changing parameter names etc.

Regarding widgets, in iPlug2 you _should_ be able to use the same IControls, and update the paramIdx to switch them between parameters

[https://iplug2.github.io/iPlug2/class\_i\_control.html#ab4cd19e6ce4409f02b2cd9ba50e2bdd6](https://iplug2.github.io/iPlug2/class_i_control.html#ab4cd19e6ce4409f02b2cd9ba50e2bdd6)

---

<div class="post-metadata">

**Author:** ![syntonica](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@syntonica](https://iplug2.discourse.group/u/syntonica)\
**Post date:** [8 January 2022 19:57 UTC](https://iplug2.discourse.group/t/dynamically-updating-iparams/537/4 "2022-01-08T19:57:11Z")

</div>

Thanks, Oli, for the reply. My biggest dread is reading _other people’s_ code and trying to understand how it works, so this good practice for me.

Regarding changing the names dynamically, I can feed a generic or both names with a slash between on instantiation for the host to use and then just update as needed. I see some function pointers available to customize parameter value displays, which I’ll definitely need.

Once I know who’s responsible for what, I should be able to customize things to my needs. I basically do everything _wrong_ (not on purpose!) since I don’t want to make just more boring synths.

Hopefully, my experiments bear fruit!
