AudacityLabels:
Filter:
AudacityLabels/Classes (extension) | Files

AudacityLabels
ExtensionExtension

Import labels from Audacity

Description

The Audacity open source sound editor, supports the marking and naming of soundfile regions (name, start, end), which may overlap with each other and which may be exported in a simple file format. This class imports such files and converts the information into a lookup dictionary of Events. If no label name has been given, the label index (an Integer) is used as a key instead. The events can then be played directly, or used in event patterns (see also: LabeledSoundFile).

To create the labels in Audacity, go to Tracks>Add Label At Selection.

To export them, use: File>Export Labels.

For interfacing with the event and pattern system, the class LabeledSoundFile can be used. For some examples, see the file intro.scd.

Class Methods

.read

Create a new instance an read labels into the dictionary

Arguments:

labelPath

Path to the file that contains the label information

Instance Methods

.at

Access the event for a specific label

Arguments:

wort

A symbol or string matching the label (as entered in Audacity).

.dict

access the dictionary

.read

Reads labels into the dictionary

Arguments:

labelPath

Path to the file that contains the label information

.parseAndAddLabels

Given a comma separated list as string, add the corresponding events into the dictionary

Arguments:

string

The string with the label information accordingto the audacity format.

labelPath

(optional) path to the file that contains the label information

.clear

Empty the dictionary