> ## 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 TNR

**Version: 0.0.0**

## Description

Compute the Tone-to-Noise Ratio (TNR) according to the ECMA-418-1 (former 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/2025-r2/core-concepts/dpf-types#field) | Input PSD levels in Pa^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/2025-r2/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\_TNR | [`generic_data_container`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#generic-data-container) | Tone-to-Noise Ratio data. This data container contains the final TNR value (in dB), as well as TNR 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\_TNR\_results. Use the following identifiers to retrieve each data. - 'TNR\_max': Maximum (final) TNR value in dB, as a double; - 'TNR\_dB': TNR 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. These data stored in the class PsychoacousticIndicators\_TNR\_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/2025-r2/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\_TNR

**License**: avrxp\_snd\_level1

## Changelog

* Version 0.0.0: Initial release.
