# AudioProcessorValueTreeState::Parameter modify steps?

**URL:** https://forum.juce.com/t/audioprocessorvaluetreestate-parameter-modify-steps/22633
**Category:** General JUCE discussion
**Created:** [May 27, 2017, 6:26pm UTC](https://forum.juce.com/t/audioprocessorvaluetreestate-parameter-modify-steps/22633 "2017-05-27T18:26:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)
#### Post date: [May 27, 2017, 6:26pm UTC](https://forum.juce.com/t/audioprocessorvaluetreestate-parameter-modify-steps/22633/1 "2017-05-27T18:26:26Z")

</div>

Is there no way to change the steps of an existing AudioProcessorValueTreeState::Parameter?

I want to give my users the choice of either continuous or stepped values for a specific parameter, but it looks like there’s no way to change the steps once it’s created. There’s a getNumSteps() method but no setNumSteps().

It would probably have to modify the range parameter of a slider attachment as well if it exists.

---

<div class="post-metadata">

### Author: ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)
#### Post date: [May 29, 2017, 3:14pm UTC](https://forum.juce.com/t/audioprocessorvaluetreestate-parameter-modify-steps/22633/2 "2017-05-29T15:14:47Z")

</div>

I added this:

```
void AudioProcessorValueTreeState::setParameterRange(juce::StringRef paramID, NormalisableRange<float>newRange)
{
    if (Parameter* p = Parameter::getParameterForID (processor, paramID))
        p->range = newRange;
}

```

But I also need to modify the range of the SliderAttachment, which doesn’t look very accessible from the AudioProcessorValueTreeState. I guess I could do that separately in my editor, but it would be nice to make the change in one place. Anyone?

---

<div class="post-metadata">

### Author: ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)
#### Post date: [May 31, 2017, 2:15pm UTC](https://forum.juce.com/t/audioprocessorvaluetreestate-parameter-modify-steps/22633/3 "2017-05-31T14:15:07Z")

</div>

Wouldn’t you also need to inform the host that the number of steps of the parameter has changed? Do hosts support this?

---

<div class="post-metadata">

### Author: ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)
#### Post date: [May 31, 2017, 2:56pm UTC](https://forum.juce.com/t/audioprocessorvaluetreestate-parameter-modify-steps/22633/4 "2017-05-31T14:56:02Z")

</div>

I suppose so. That’s why I’m asking for this functionality to be added because I’m sure there are some things I’m missing.
