# How do I tell which iPlug2 parameter maps to which Faust parameter?

**URL:** <https://iplug2.discourse.group/t/how-do-i-tell-which-iplug2-parameter-maps-to-which-faust-parameter/616>\
**Category:** Faust\
**Created:** [9 April 2022 18:07 UTC](https://iplug2.discourse.group/t/how-do-i-tell-which-iplug2-parameter-maps-to-which-faust-parameter/616 "2022-04-09T18:07:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ftw](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/ftw/32/278_2.png) [@ftw](https://iplug2.discourse.group/u/ftw)\
**Post date:** [9 April 2022 18:07 UTC](https://iplug2.discourse.group/t/how-do-i-tell-which-iplug2-parameter-maps-to-which-faust-parameter/616/1 "2022-04-09T18:07:28Z")

</div>

Hi! I’m trying to use iPlug2 to wrap an instrument I wrote in Faust into a VST3 plugin. I got it to make sound in the standalone build, but now I want to make a user interface for it. Is there a way to get a mapping of Faust parameter name to parameter index, somehow? As my plugin will include a lot of parameters I don’t want to just use trial and error…

More concretely, I want to know which index to use to eg. control the `0/partial gain` parameter given this code:

```nohighlight
tonalizer(freq, q) = _ <:
    vgroup("[0]H", band(0, freq / 2, q, vslider("h:[0]0/[0]partial gain", 0.5, 0.0, 1.0, 0.01))),
    vgroup("[1]F", band(1, freq, q, vslider("h:[1]1/[0]partial gain", 1, 0.0, 1.0, 0.01))),
    vgroup("[2]2", band(2, freq * 2, q, vslider("h:[2]2/[0]partial gain", 0.25, 0.0, 1.0, 0.01))),
    vgroup("[3]4", band(4, freq * 4, q, vslider("h:[3]4/[0]partial gain", 0.25, 0.0, 1.0, 0.01))),
    vgroup("[4]6", band(6, freq * 6, q, vslider("h:[4]6/[0]partial gain", 0.25, 0.0, 1.0, 0.01))),
    vgroup("[5]8", band(8, freq * 8, q, vslider("h:[5]8/[0]partial gain", 0.25, 0.0, 1.0, 0.01))),
    vgroup("[6]10", band(10, freq * 10, q, vslider("h:[6]10/[0]partial gain", 0.25, 0.0, 1.0, 0.01))),
    vgroup("[7]12", band(12, freq * 12, q, vslider("h:[7]12/[0]partial gain", 0.25, 0.0, 1.0, 0.01))),
    vgroup("[8]14", band(14, freq * 14, q, vslider("h:[8]14/[0]partial gain", 0.1, 0.0, 1.0, 0.01))),
    vgroup("[9]16", band(16, freq * 16, q, vslider("h:[9]16/[0]partial gain", 0.1, 0.0, 1.0, 0.01)))
    :> /(12);

```

---

<div class="post-metadata">

**Author:** ![ftw](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/ftw/32/278_2.png) [@ftw](https://iplug2.discourse.group/u/ftw)\
**Post date:** [9 April 2022 20:22 UTC](https://iplug2.discourse.group/t/how-do-i-tell-which-iplug2-parameter-maps-to-which-faust-parameter/616/2 "2022-04-09T20:22:50Z")

</div>

So looks like the line `mFaustProcessor.CreateIPlugParameters(this, 0, mFaustProcessor.NParams())` will set the param names from your Faust code. Then you can get the name from `GetParam(int)->GetName()` and do whatever you need with it to hook up controls to the right param number. `mFaustProcessor.CreateIPlugParameters()` can be called regardless of whether you are in the DSP or in the UI and does not depend on `mFaustProcessor.Init()` being called first.

The param names ignore any sort of hierarchy: A param named `h:[0]0/[0]partial gain` in Faust will just be `partial gain` in iPlug2 code. You will need to name your Faust params `partial gain 0`, `partial gain 1`, etc.
