# JuceAudioPlugIn: parameter indexing!

**URL:** <https://forum.juce.com/t/juceaudioplugin-parameter-indexing/550>\
**Category:** General JUCE discussion\
**Created:** [December 11, 2005, 11:54am UTC](https://forum.juce.com/t/juceaudioplugin-parameter-indexing/550 "2005-12-11T11:54:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heureka](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@heureka](https://forum.juce.com/u/heureka)\
**Post date:** [December 11, 2005, 11:54am UTC](https://forum.juce.com/t/juceaudioplugin-parameter-indexing/550/1 "2005-12-11T11:54:10Z")

</div>

Hi,

I’m trying to figure out how the gain parameter in the JuceAudioPlugIn demo can be accessed by comparing the index parameter with zero as in the following example:

if (index == 0)  
return T(“gain”);

I’m trying to instantiate some more parameters for a simple compressor (for a slow start), but it isn’t obvious to me how I can declare a new parameter which can be index as:

if (index == 1)  
return T(“kneepoint”);

In the VST SDK delay project the enum type is used; is that preferrable too in this context or is something hidding under the hood?

Thanks for taking the time to read my trivial question 🙂

Cheers  
Thomas

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 11, 2005, 1:40pm UTC](https://forum.juce.com/t/juceaudioplugin-parameter-indexing/550/2 "2005-12-11T13:40:36Z")

</div>

You could use an enum to label the indices, of course, if you make sure the enum’s values are in the range 0 to (numParams - 1).

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 12, 2017, 9:51am UTC](https://forum.juce.com/t/juceaudioplugin-parameter-indexing/550/3 "2017-05-12T09:51:37Z")

</div>


