Handling of Analyzer output in Audacity

From Audacity Wiki
Jump to: navigation, search
Peter 09Jan20 - this page is just to document the differing approaches in Audacity and plug-ins in the handling of the output from Analyzers.

It shows a lack of consistency between Audacity's shipped analyzers - and we do like "consistency" in Audacity. We have no control over external plug-ins but I do much prefer Chris Cannam's approach with Vamp analyzers in creating a fresh label track for each analysis and labeling the output track with the name of the particular Vanp analysis too used; he never overwrites any pre-existng label tracks.

It is documentation only, it is not a recommendation for change.

Can o worms.jpg
Can o' worms firmly shut, but clearly labelled
This page documents the differing approaches in Audacity and plug-ins in the handling of the output from Analyzers. In particular the nomenclature and usage of the output label tracks.


Contents

  1. Overview
  2. Built-in Analyzers
  3. Audacity's Nyquist Plug-in Analyzer
  4. External (Vamp) Plug-in Analyzers
  5. Other External Plug-in Analyzers


Overview

Most of Audacity's Analyzers (built-in and Nyquist plug-ins) create their analysis output as a set of labels in a label track. Third-party analysis plug-ins (Vamp for example) often do likewise.

The three types of Analyzers have subtle differences in how they handle the label tracks that are created or used for their output. Normally if just an audio track is selected and an Analyzer run, then the output is sent to a newly-created label track - the labeling of the track varies by Analyzer type (as explained in detail below).

If label tracks are selected along with the audio prior to running an Analyzer then the Analyzer may or may not use one of the selected audio tracks, depending upon which Analyzer type it is. For details please see below.

Observation

The best way to run any Analyzer is to just select audio track(s) and no label tracks and then run the Analyzer.


Built-in Analyzers

Currently we only have one C++ coded built-in analyzer and that is Find Clipping

For the output of its analysis Find Clipping will create a label track called "Clipping" and show the clipping labels in there.

However, if a label track named "Clipping" already exists (or several label tracks named "Clipping") Find Clipping places the labels into the first label track named "Clipping" (this track name is case sensitive).

Unlike the Audacity Nyquist effects, Find Clipping will ignore any label track(s) used as part of the selection and will always use the top-most label track named "Clipping" regardless of whether or not it forms part of the selection made for the analysis.

Examples

Analysis label track behaviors - Find Clipping just audio selected.png
Find Clipping with just audio selected

Here the user has a stereo track and a label track (outlined in red). The selection was made only in the Audio Track and then Find Clipping was run.

Observe that Find Clipping creates a new label track in addition to the pre-existing label track and that the created analysis track is named "Clipping"


Analysis label track behaviors - Find Clipping redlined.png
Find Clipping with two label tracks named "clipping", one selected

This example shows an audio track with two pre-existing label tracks both named "Clipping".

The lower "Clipping" track was selected by the user along with the audio (outlined in red).

Observe that Find Clipping ignores that selection and used instead the un-selected but top-most label track named "Clipping" for its output.


Audacity's Nyquist Plug-in Analyzers

Audacity comes supplied with a further three Analyzers: Beat Finder, Silence Finder and Sound Finder. These are Nyquist plug-ins and thus appear "below the line" in the Analyze menu.

  • If the user just selects audio and then runs one of these Analyzers, the output will be placed in a newly created label track This label track will be given the default name "Label Track".
  • If the user's selection includes label track(s) as well as audio and they then run one of these Analyzers, the output labels from the Analyzer will be placed in your top-most selected label track. Note carefully that this may be a user's carefully set-up label track labelling their audio.

Example-1

Straightforward use, simple selection of just the audio track for analysis

Analysis label track behaviors - Beat Finder creates new label track.png
Beat Finder creates new label track named "Label Track"

Not quite as helpful as Find Clipping - you might want to rename the analysis track.

Example-2

Analysis label track behaviors - Beat Finder overwrite label track.png
Beat Finder overwrites the user's label track

Here the user has selected their audio track and two label tracks the top-most track was the user's label track labeling their audio.

After running Beat Finder the output labels have been placed in the top-most track mixing up the user's audio labels and the Beat Finder output labels.

Example-3

Analysis label track behaviors - Beat Finder no overwrite of label track.png
Beat Finder user's label track not overwritten

In contrast here the user moved the label track they created to receive the output of Beat finder to be the topmost.

All three tracks were selected, but this time the output from Beat Finder goes to the new empty, top-most, track.

Thus leaving the user's label track with their audio labels un-altered.


External (Vamp) Plug-in Analyzers

With Vamp plug-ins, regardless of whether or not any label track or tracks are selected along with the audio, the Vamp analysis will be placed in a newly-created label track each time. The name of that label track will reflect the particular Vamp analysis plug-in that was used.

This means that a user's pre-existing label track labeling their audio is never over-written by a Vamp plug-in.

It also means that if you run the same Vamp plug-in twice, then you will get two analysis label tracks. Note though that both will have the same name derived from the plug-in used (see example below).

Example

Analysis label track behaviors - Vamp creates new label tracks.png
Vamp creates new label tracks (ignores selected label track)

Here the user had an audio track and a label track, with a selection made in both tracks (outlined in red).

They then ran:

  1. Bar and Beat Tracker: Bars,
  2. Bar and Beat Tracker: Beat count,
  3. Bar and Beat Tracker: Bars = for a second time.

Observe that the selected label track remains untouched, unaltered And that there is a second label track named "Bar and Beat Tracker: Bars"


Other External Plug-in Analyzers

Other external plug-in analyzers have not been tested.