# Best practice? Parameter changes from and to the ui

**URL:** <https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512>\
**Category:** Audio Plugins\
**Created:** [September 28, 2011, 12:38pm UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512 "2011-09-28T12:38:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdejong](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bdejong/32/288_2.png) [@bdejong](https://forum.juce.com/u/bdejong)\
**Post date:** [September 28, 2011, 12:38pm UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512/1 "2011-09-28T12:38:27Z")

</div>

Hello all!

It’s been a while since I;ve posted here, but I surely will come back much more in the future.

Building a plugin (Introjucer FTW!) and I was wonderting what best practices people use for sending parameter changes to and from the UI. I’m talking both automation and regular parameter settings via the host (for example when loading presets).

I’ve seen the GenericAudioProcessorEditor uses the AudioProcessorListener for this plus a timer which checks the values once in a while and updates them if they are dirty. In the example of GenericAudioProcessorEditor this is quite easy because all parameter UI objects are identical, but for other cases it becomes (much) harder. Having one big timer which updates absolutely all parameters once in a while seems total overkill to me, especially for large UI’s.

So, what should I be using or looking into?

thx,

- bram

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [September 28, 2011, 12:59pm UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512/2 "2011-09-28T12:59:18Z")

</div>

Well I’m currently experimenting using juce::Value’s to hold my parameters making my AudioProcessor subclass Value::Listener so I can respond to a single value change (checking the value using refersToSameSourceAs()). You can then easily attach UI objects e.g. Slider::getValueObject().referTo() and do a similar thing in custom UI components. Seems to all work smoothly at the moment, will report problems if I find them.

---

<div class="post-metadata">

**Author:** ![anima](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anima](https://forum.juce.com/u/anima)\
**Post date:** [September 28, 2011, 5:20pm UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512/3 "2011-09-28T17:20:07Z")

</div>

That sounds nice and clean Dave but whats the performance like? If you had a lot of parameters, that must incur a lot of overhead no?

How are you dealing with the threading issue as well?

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [July 4, 2014, 2:09pm UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512/4 "2014-07-04T14:09:18Z")

</div>

I'm interested in this too. I'm buliding an app thats analyzing audio input and would like to trigger various UI changes according to the incoming data. I like the idea of seperating UI elements from the data processing and looking into using Value and its listeners to do this. I'm concerned about performance hit if it might be significant...&nbsp;

---

<div class="post-metadata">

**Author:** ![jimc](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jimc/32/16067_2.png) [@jimc](https://forum.juce.com/u/jimc)\
**Post date:** [July 5, 2014, 8:22am UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512/5 "2014-07-05T08:22:13Z")

</div>

See this thread:

http://www.juce.com/forum/topic/whats-best-practice-gui-change-notification

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [July 5, 2014, 8:25am UTC](https://forum.juce.com/t/best-practice-parameter-changes-from-and-to-the-ui/7512/6 "2014-07-05T08:25:49Z")

</div>

Thanks bazrush !
