# JUCE 4.1: Automation Value Display in Logic

**URL:** <https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389>\
**Category:** Audio Plugins\
**Created:** [October 7, 2016, 10:47am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389 "2016-10-07T10:47:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![raketa](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/raketa/32/1725_2.png) [@raketa](https://forum.juce.com/u/raketa)\
**Post date:** [October 7, 2016, 10:47am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/1 "2016-10-07T10:47:29Z")

</div>

Logic seems to display the normalised value in its automation data display. Logic probably expects a non-normalised value, but JUCE seems to simplify this and always communicates with normalized values to the DAWs. Thats OK, but while other DAWs invoke juce::getParameterTex() Logic displays the value directly which ends up being a float between 0 and 1.  
The JUCE demo plugin is not of any help here since it doesn’t display anything (How is this possible?).

What can be done to get Logic to display a user readable value?

---

<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:** [October 9, 2016, 5:36pm UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/2 "2016-10-09T17:36:35Z")

</div>

You need to implement the code that converts the parameter values to text (either by overriding [`getParameterText`](https://www.juce.com/doc/classAudioProcessor#adfc2bb4a053ea9997dadbb681a636cb0) or by using the [new parameter classes](https://www.juce.com/doc/classAudioProcessorParameter) and overriding [`getText`](https://www.juce.com/doc/classAudioProcessorParameter#a225682445ac196c45c1199e01145bbbb)). Otherwise Logic will **always** display the normalised values.

---

<div class="post-metadata">

**Author:** ![raketa](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/raketa/32/1725_2.png) [@raketa](https://forum.juce.com/u/raketa)\
**Post date:** [October 10, 2016, 8:51am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/3 "2016-10-10T08:51:18Z")

</div>

Thanks, fabian,  
thats what I assumed and mentioned in the OP. Unfortunately - as stated above - **juce::getParameterTex()** never gets called.

Cheers,  
raketa

---

<div class="post-metadata">

**Author:** ![raketa](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/raketa/32/1725_2.png) [@raketa](https://forum.juce.com/u/raketa)\
**Post date:** [October 10, 2016, 10:41am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/4 "2016-10-10T10:41:52Z")

</div>

… maybe there is some magic I overlook here, but **getParameterText()** is not referenced from **juce\_AU\_Wrapper.mm**.

Cheers,  
racket

---

<div class="post-metadata">

**Author:** ![raketa](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/raketa/32/1725_2.png) [@raketa](https://forum.juce.com/u/raketa)\
**Post date:** [October 10, 2016, 11:35am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/5 "2016-10-10T11:35:02Z")

</div>

the problem relates probably to:

[details=ComponentResult GetProperty()]ComponentResult GetProperty (AudioUnitPropertyID inID,  
AudioUnitScope inScope,  
AudioUnitElement inElement,  
void\* outData) override  
[/details]  
case kAudioUnitProperty\_ParameterStringFromValue:  
{  
if (AudioUnitParameterStringFromValue\* pv = (AudioUnitParameterStringFromValue\*) outData)  
{  
if (juceFilter != nullptr)  
{  
const float value = (float) \*(pv-\>inValue);  
String text;

```
                        if (AudioProcessorParameter* param = juceFilter->getParameters() [(int) pv->inParamID])
                            text = param->getText ((float) *(pv->inValue), 0);
                        else
                            text = String (value);

                        pv->outString = text.toCFString();
                        return noErr;
                    }
                }
            }
            break;

```

which should be changed to:

```
case kAudioUnitProperty_ParameterStringFromValue:
{
    if (AudioUnitParameterStringFromValue* pv = (AudioUnitParameterStringFromValue*) outData)
    {
        if (juceFilter != nullptr)
        {
            const float value = (float) *(pv->inValue);
            String text;

            if (AudioProcessorParameter* param = juceFilter->getParameters() [(int) pv->inParamID])
                text = param->getText ((float) *(pv->inValue), 0);
            else
                text = juceFilter->getParameterText (pv->inParamID);

            pv->outString = text.toCFString();
            return noErr;
        }
    }
}
break;

```

while actually the test

```
if (AudioProcessorParameter* param = juceFilter->getParameters() [(int) pv->inParamID])

```

doesn’t make sense. It will evaluate to true as soon as pv-\>inParamID is nonzero which is probably not intended if juceFilter-\>getParameters() is a nullptr.

---

<div class="post-metadata">

**Author:** ![lalala](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lalala/32/8577_2.png) [@lalala](https://forum.juce.com/u/lalala)\
**Post date:** [October 10, 2016, 11:59am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/6 "2016-10-10T11:59:46Z")

</div>

that’s something we previously discussed here with fabian :

> [@kAudioUnitProperty ParameterStringFromValue support](https://forum.juce.com/t/kaudiounitproperty-parameterstringfromvalue-support/18190):
>
> if a plugin does not use the AudioProcessorParameter system, then AudioProcessor::getParameterText() should be called instead of String (value). It’s l.488 of juce\_AU\_Wrapper.mm : text = String (value); should be replaced by something like : text = juceFilter-\>getParameterText ((int) pv-\>inParamID, 1024);

---

<div class="post-metadata">

**Author:** ![raketa](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/raketa/32/1725_2.png) [@raketa](https://forum.juce.com/u/raketa)\
**Post date:** [October 13, 2016, 10:34am UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/7 "2016-10-13T10:34:01Z")

</div>

Thanks, lalala,  
strange, that I haven’t seen it…

fabian,  
any chance one of the proposed solutions will make it into the code base? Or any reason thats not a good idea.

Thanks,  
raketa

---

<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:** [October 15, 2016, 1:21pm UTC](https://forum.juce.com/t/juce-4-1-automation-value-display-in-logic/19389/8 "2016-10-15T13:21:01Z")

</div>

I don’t think there is an easy fix for this (see the other thread). This is one of the reasons why we deprecated the old parameter system. I think you’ll just need to use the new parameter classes. Sorry ☹
