# getRawParameterValue()

**URL:** <https://forum.juce.com/t/getrawparametervalue/22922>\
**Category:** General JUCE discussion\
**Created:** [June 14, 2017, 2:46pm UTC](https://forum.juce.com/t/getrawparametervalue/22922 "2017-06-14T14:46:40Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![gustav-scholda](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/gustav-scholda/32/4172_2.png) [@gustav-scholda](https://forum.juce.com/u/gustav-scholda)\
**Post date:** [March 21, 2019, 4:11pm UTC](https://forum.juce.com/t/getrawparametervalue/22922/21 "2019-03-21T16:11:25Z")

</div>

This is still far from solved I think!

Actually an enum containing all parameters combined with an array of float\* pointers should be the fastest (and safest) way. No comparison of strings, array of pointers can be initialized in the AudioProcessor constructor, etc.  
What do you think?

btw I’m using json to manage my parameters, anyone aware of a way to create an enum from a json? I guess it’s not possible?

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [March 21, 2019, 4:23pm UTC](https://forum.juce.com/t/getrawparametervalue/22922/22 "2019-03-21T16:23:37Z")

</div>

It wouldn’t be too hard to write a code generator from your JSON schema.

---

<div class="post-metadata">

**Author:** ![gustav-scholda](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/gustav-scholda/32/4172_2.png) [@gustav-scholda](https://forum.juce.com/u/gustav-scholda)\
**Post date:** [March 21, 2019, 4:32pm UTC](https://forum.juce.com/t/getrawparametervalue/22922/23 "2019-03-21T16:32:37Z")

</div>

@Holy_City Can you give me a starting point? Do I need to convert strings to enum? I’ve googled a bit and this seems to be pretty hairy to do that in c++.  
Thank you!  
p.s. maybe someone has already worked this out?

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [March 21, 2019, 4:36pm UTC](https://forum.juce.com/t/getrawparametervalue/22922/24 "2019-03-21T16:36:53Z")

</div>

What I mean is write a program to parse the JSON and generate the C++ code. JUCE has a [json parser already](https://docs.juce.com/master/classJSON.html), so you just need to traverse the `var` tree from your JSON to generate the code.

---

<div class="post-metadata">

**Author:** ![gustav-scholda](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/gustav-scholda/32/4172_2.png) [@gustav-scholda](https://forum.juce.com/u/gustav-scholda)\
**Post date:** [March 21, 2019, 4:40pm UTC](https://forum.juce.com/t/getrawparametervalue/22922/25 "2019-03-21T16:40:04Z")

</div>

@Holy_City Alright, I think I get you: whenever I change something in my json I run a code generator which creates a file like `myParameterEnum.h` which I can include in my plugin code. Is that what you mean?  
Thanks again 🙂

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [March 21, 2019, 4:41pm UTC](https://forum.juce.com/t/getrawparametervalue/22922/26 "2019-03-21T16:41:43Z")

</div>

Yup.

[Previous page](https://forum.juce.com/t/getrawparametervalue/22922.md?page=1)
