Stereo Channel Similarity Meter — User Guide

Measures the percentage of near-identical samples between the left and right channels of a stereo sound object, indicating mono compatibility.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This is an analysis tool that calculates the percentage of samples that are nearly identical in value between the left and right channels of a selected stereo Sound object. This measurement provides an indication of the stereo file's mono compatibility and the degree to which the audio in both channels is correlated.

What is channel similarity? Channel similarity, in this context, is the measure of how often the sample values of the Left and Right channels are within a minimal tolerance of each other (specifically, if the absolute difference is less than a negligible threshold). A high similarity percentage suggests that a large portion of the audio is effectively mono or centrally panned, which can be useful for diagnostics in mixing and mastering.

The calculation is performed by iterating through the sound's samples at a defined step, comparing the values of the two channels at the same time point, and counting the instances where the difference is negligible.

Quick start

  1. Load a stereo Sound object into Praat.
  2. Select the Sound object in the Praat Objects window.
  3. Run the script: PraatRun script…Stereo Channel Similarity Meter.praat (The usage is to Select a Sound object in Praat and run this script).
  4. If the selected sound is not stereo, the script will exit and display an error message.
  5. The result, a percentage value labeled Similarity, will be printed to the Praat Info window.
Output: The script outputs the result to the info window in the format: Similarity: X.Y%, where X.Y is the calculated percentage of similar samples.
Important: The script requires a stereo file (a sound object with exactly 2 channels). If the selected sound has any other number of channels, the script will not run. The process removes the temporary channel objects created during the analysis, leaving only the original stereo Sound object in the list.

Implementation Details

Analysis Steps

The script's operation is split into three main phases: preparation, comparison, and final calculation.

Code Snippets

The core of the similarity check is in the conditional statement within the loop:

difference = abs(value1 - value2) if difference < similarSamples = similarSamples + 1 endif

The script uses the formula to calculate the final percentage:

similarity = (similarSamples / comparedSamples) * 100