Canary Overview

by Pat Leonard last modified 2007-03-27 08:37

Canary is a software tool for the digital acquisition, manipulation, analysis, and measurement of sound on Macintosh computers. Canary was developed by the Cornell Bioacoustics Research Program with support from the National Science Foundation and the Cornell Lab of Ornithology to provide a low-cost, user-friendly research and teaching environment tailored to the needs of biologists working with acoustic signals. Many of the capabilities provided by Canary have previously been available only in much more expensive software packages.

Canary's user interface and documentation are designed to make these features accessible to users who may not have extensive backgrounds in acoustics or signal processing, without sacrificing the power and rigor demanded by sophisticated users.

Canary runs only on Macintosh computers booted under Mac OS 9.2 and older:
Canary does not run properly in Classic mode on computers booted under Mac OS X. For sound analysis on computers running Mac OS X or Windows, we recommend Raven.

Canary files can be converted to Mac Binary and AIFF format for use in Raven.
Free programs are available here to convert Canary-format sound files to AIFF and MacBinary formats.
For information on opening Raven-saved files in Canary, go to the Canary FAQ page.

Index


Overview

The main components of the Canary working environment are signal windows, the command panel, the measurement panel, and the data log (Figure 1 below).

A signal window may contain one, two, or three panes, containing waveform, spectrogram, or spectrum views of all or part of a signal. The number of signal windows that may be open at one time is limited only by the available memory.

The command panel provides graphic, mouse-operated controls for adjusting the horizontal and vertical scales of the three panes, for showing and hiding each pane, and for controlling sound playback.

The measurement panel can be configured to display any combination of signal measurements based on either the current mouse position (e.g., time, frequency, amplitude), a highlighted region (e.g., peak amplitude in a selected section) or signal parameters (e.g., sampling rate, spectrum filter bandwidth). Over 70 individual measurements and parameters are available for display in the measurement panel.

The data log records values from the measurement panel with a single mouse-click. The data log can then be saved in a variety of formats for easy export to statistical, spreadsheet, word-processing, or other programs.

CanaryScreen.GIF
Figure 1. The Canary working environment, showing a signal window, the command panel, measurement panel, and data log.

Summary of features

Canary 1.2.4 provides the following capabilities:

  • Data acquisition: Canary can acquire (digitize) audio data using the Macintosh's built-in sound input port. An acquired signal is instantly displayed as a waveform in its own window. Signals can be played back at a variety of speeds.

Canary can acquire either one- or two-channel signals.
Signals can be acquired either to memory (RAM) or directly to a disk file.

  • Signal editing: Cut, copy, paste, delete, or amplify any section of a signal with a few mouse clicks. Sections of a signal that have been cut or copied can be pasted into any location in the same signal or into a different signal.

Filter selected part of a signal to eliminate energy from a specific frequency band.

  • Spectrum analysis: Canary provides explicit control of all parameters of STFT (short-time Fourier transform) spectrum analysis to calculate and display spectrograms and spectra (see below).

Spectrogram contrast and darkness are fully adjustable from command panel.

Save named sets of spectrogram or spectrum parameters in preference files for quick retrieval.

  • Correlations: Canary lets you calculate correlations between pairs of spectrograms or waveforms. Correlations are useful for detecting the presence of one signal within another (possibly noisy) signal. Spectrogram correlations can be used as a rudimentary measure of the similarity between spectrograms. Waveform correlations are useful for determining time delays between occurrences of the same signal in different files.
  • Batch processing: Canary can automatically perform the same operation on an arbitrarily large number of files, and save the results. Simply place all of the files to be processed in one folder, specify the parameters for the process once, and all files will be processed without any further interaction. Batch processes available are spectrogram and spectrum calculation, correlation, and file type conversion.
  • Printing and graphics export: You can print the contents of the active window directly from Canary to any Macintosh printer. If the printer does not support grayscale printing (e.g., ImageWriter II, Personal LaserWriter SC), spectrogram images are automatically dithered (shades of gray are simulated by varying dot densities). To support the export of PICT graphics to other Macintosh applications, Canary is distributed with the Flash-It(tm) shareware screen-capture utility.
  • Sound level calibration: To facilitate measurements based on absolute signal strength, Canary lets you calibrate signals and copy calibration parameters between signals recorded under the same conditions.

Calibrate signals using either an acoustical or electrical paradigm.

Specify decibel reference values for sound pressure, intensity, voltage, and power.

Save a default calibration for automatic application to new signals.

  • Multiple file formats: Canary can read and write sound files in SoundEdit(tm) and AIFF (Audio Interchange File Format) formats, as well as Canary's own format, which lets you save a signal with a spectrogram and spectrum in one file. You can also save or retrieve sounds, spectrograms, spectra, or correlation arrays in binary, text, or MATLAB(tm) formats.
  • Complete documentation: Canary comes with a comprehensive (200+ pages) User's Manual. In addition to detailed discussions of all program features, the manual includes appendices that explain the basic concepts of digital signal representation, spectrum analysis and sound amplitude measurements.

Spectrum analysis


Canary provides extensive control over the generation and display of spectrograms, which are calculated using the short-time Fourier transform (STFT). The spectrum analysis dialogs make explicit the relationships among frame length, filter bandwidth, and window function, and allow you to control either filter bandwidth or frame length directly. You can also control time and frequency resolution of the grid of points at which the spectrogram's amplitude values are calculated, and choose from five different window functions. Figure 2 illustrates how Canary's spectrum analysis options allow you to control the tradeoff between time and frequency resolution to produce spectrograms emphasizing different properties of a signal.

CanarySpeechGram.GIF

Figure 2. Canary offers many options for adjusting the tradeoff between time and frequency resolution and other spectrogram parameters. All three spectrograms are of the utterance "Good morning" digitized at 22.3 kHz. (a) Wide-band spectrogram emphasizing temporal features; note individual glottal pulses clearly visible. Filter bandwidth = 1.4 kHz. (b) Narrow-band spectrogram emphasizing frequency structure; note frequency bands of glottal pulse and formants. Filter bandwidth = 88 Hz. (c) Spectrogram with medium-band filter shows glottal pulse and formant structure. Filter bandwidth = 353 Hz.

In addition to spectrograms, Canary can also display a "spectral slice" through a signal at a specified point in time, or an averaged spectrum of a specified interval.

For those who are not already conversant with spectrum analysis, an appendix to the Canary User's Manual provides a non-mathematical introduction that explains the relationships between concepts such as frame length, filter bandwidth, and window function.

Quantitative comparison of signals (correlation)


Canary's correlator enables you to make quantitative comparisons between spectrograms or waveforms. The correlator takes two spectrograms or waveforms as input, and incrementally slides them past each other in time, calculating a correlation coefficient between the inputs at successive discrete time offsets. The output is a plot of correlation versus the time offset between the signals (Figure 3). The peak value of a spectrogram correlation can provide an objective measure of one type of similarity between two spectrograms.

CanarySpgCorr.GIF

Figure 3. Spectrogram correlation between two renditions of a syllable type in the song of a northern mockingbird. Renditions (a) and (b) were produced during a single song bout, but separated by several minutes in time. (c) Correlation between spectrograms (a) and (b).

System requirements


Hardware
Canary 1.2.4 will run on any PowerMac, including G3 and G4 processors. Canary also runs on any older 68020 or better Macintosh that is equipped with a math coprocessor and adequate memory (RAM; see below). Canary runs under System 7 through through Mac OS 9.1. Canary runs in Classic mode on Macs running Mac OS X. A separate version, Canary 1.2 LC, is available to run on 680x0 machines that lack a math co-processor.

Canary requires a minimum of 2.5 megabytes of RAM to run. (This figure refers to memory available for Canary itself, not the total amount installed on your machine. Keep in mind that system software can take up several megabytes, depending on what utilities and system extensions are installed.) This amount of memory is sufficient to make a medium-resolution spectrogram (resolution = 5.8 mS x 43.5 Hz) of a signal slightly more than 2 seconds long, digitized at 22.3 kHz. The actual amount of memory needed for any particular application is roughly linearly dependent on the number and length of signals that are to be open at one time, the sampling rate at which the signals are digitized, and the time and frequency resolution of spectrograms that are calculated. Even for a given signal, there are hundreds of combinations of spectrogram parameters that will require different amounts of memory. However, the following formulas can serve as a guide to the approximate amount of memory needed for signals of different lengths digitized at 22.3 kHz (remember that 1024 Kbytes = 1 Mbyte):

  • Waveform only: approx.1700 Kbytes + (100 Kbytes/sec * signal duration)
  • Waveform + medium-resolution spectrogram (e.g., resolution = 5.8 mS x 43.5 Hz): approx. 1700 Kbytes + (300 Kbytes/sec * signal duration)
  • Waveform + high-resolution spectrogram (e.g., resolution = 1.4 mS x 10.8 Hz): approx. 1700 Kbytes + (2900 Kbytes/sec * signal duration) These figures should be regarded only as rough indications of memory requirements.


More details here on how to configure a system for running Canary.

Downloading

Canary 1.2.4 is now available without cost. To download components of Canary, use the links below:

Support


Support from BRP for users who purchased a license for Canary will continue through the end of 2005. After that, all users should visit the Canary user forum (http://canary.RavenSoundSoftware.com) to discuss questions, problems, solutions, and issues with other Canary users.

Users who download the free version of Canary should visit the Canary user forum for support.

For more information on digital sound:


Two appendices from the Canary 1.2.4 Manual are offered below. Click on the specific appendix to download a pdf file.

  • Appendix A, "Digital Representation of Sound", provides a brief explanation of how sound is represented digitally. An understanding of the basic principles introduced here (such as digital sampling, sampling rate, and sample size) will be helpful in using Canary or any other sound analysis software.
  • Appendix B, "A Biologist's Introduction to Spectrum Analysis", provides some conceptual background for making and interpreting spectrograms and spectra with Canary. It introduces the short-time Fourier transform (STFT), the mathematical technique used by Canary for making spectrograms. A second aim of this appendix is to explain some of the limitations and tradeoffs intrinsic to spectrum analysis of time-varying signals. The discussions in this appendix assume a basic understanding of how sound is recorded and represented digitally. If you are not already acquainted with concepts such as sampling rate and amplitude resolution (sample size), read Appendix A.