> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sound:compute PR

**Version: 0.0.0**

## Description

Compute the Prominence Ratio (PR) according to the ECMA-418-1 (formerly ECMA-74, Annex D) and ISO7779:1999 standards, using a power spectral density (PSD) as input. This is applicable for tones whose frequencies are between 89.1 Hz and 11,220 Hz.

## Inputs

| Input | Name | Expected type(s) | Description |
| - | - | - | - |
| **Pin 0** Required | input\_levels | [`field`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#field) | Input PSD levels in \<unit>^2/Hz on which to compute PR, as a field. The PSD's frequencies must be regularly spaced. If the PSD's lowest frequency is not 0 Hz, values between 0 Hz and the PSD's lowest frequency are set to 0. |
| **Pin 1** | frequency\_list | [`vector<double>`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types) | (Optional) list of the frequencies of the tones (peaks in the spectrum) for which to compute PR. If this input is empty (not specified), a peak detection method is applied to automatically find the tones in the input spectrum. Then, the PR is calculated for each detected tone. |

## Outputs

| Output | Name | Expected type(s) | Description |
| - | - | - | - |
| **Pin 0** | output\_PR | [`generic_data_container`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#generic-data-container) | Prominence Ratio data. This data container contains the final PR value (in dB), as well as the PR details for each specified frequency (if input frequency\_list is populated) |
| or each detected tone (if input frequency\_list is omitted or empty). These details are stored in the class ansys::dpf\_sound::PsychoacousticIndicators\_PR\_results. | | | |

Use the following identifiers to retrieve each piece of data:

* **PR\_max**: Maximum (final) PR value in dB, as a double
* **PR\_dB**: PR value in dB for each tone, as a field
* **frequency\_Hz**: Frequency of each tone in Hz, as a field
* **level\_dB**: Level of each tone in dB, as a field
* **bandwidth\_lower\_Hz**: Lower frequency in Hz of each tone's bandwidth, as a field
* **bandwidth\_higher\_Hz**: Upper frequency in Hz of each tone's bandwidth, as a field

The above data stored in the class PsychoacousticIndicators\_PR\_results can be accessed using the method GetProperty(property\_name) |

## Configurations

| Name | Expected type(s) | Default value | Description |
| - | - | - | - |
| **mutex** | [`bool`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types) | false | If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads. |

## Scripting

**Category**: sound

**Plugin**: sound

**Scripting name**: None

**Full name**: None

**Internal name**: compute\_PR

**License**: avrxp\_snd\_level1

## Changelog

* Version 0.0.0: Initial release.
