![]() |
How
to
|
How to:
PREPARATION
CALL DETECTION AND RECOGNITION
MEASUREMENT
RESULTS
GRAPHING
TOOLS
IF THINGS GO WRONG
PREPARATION
Your analyses will be much easier and more powerful if you start with clean recordings. Using expensive equipment might help but will not warrant good recordings. Besides trying to obtain the right equipment for each situation and goals, and learning how the equipment works, one should learn how to find the best situation to obtain clean recordings. You might want to consider at least:
Modern
computers make it very easy to plug in a music player and produce digital sound
files. Make sure that you understand how the process works so that you can get
the most out of your original recordings. In special, learn how to deal
with saturation, sample rate, bit size, filtering and compression.
File format is not a big issue anymore, as good
converter utilities are available for free download from the internet. One must
be careful, however, not to convert unintentionally from a complete to a simplified
format and loose data. Currently, Sound Ruler deals only with plain PCM .wav
files, mono or stereo (you choose one channel to analyze) with any sample rate
and bit size.
The
best way of editing and cataloging your field material will depend on the use
that you are going to make of it. The size of each sound file is not a limiting
factor for Sound Ruler, as it slices up long files and deals with them one chunk
at a time. As far as your computer does not have a problem with storing and
accessing a very large file in the disk, there is no size limit.
If you like to put each sound in a separate
file, consider leaving some space before and after, or the call delimitation
algorithms might not be able to find the end of the calls.
If you like to keep each field cut whole
in a file, you will love Sound Ruler because you can do all your analysis strait
from the originals.
If Sound Ruler's modest filters attend your needs,
you can restrict pre-analysis filtering to the minimum necessary to prevent
aliasing (if it is a problem) when you digitize the sounds. Having 'crude' originals
gives you the freedom choose the most appropriate filtering method and parameters
for each analysis.
Sound Ruler is not intended to be a full featured
sound editor. There are several good editors on the market that are free or
have reasonable prices. You can take advantage, however, of Sound Ruler's capability
of saving sections or calls after they have been amplified, bandpass filtered
and/or filtered with a tuning curve. Go to the menu File - Save Sound.
Sound
Ruler's main window is resizable, but two designs are available, to maximize
the plot display area at screen resolutions of 800 x 600 pixels or 1024 x 800
pixels.
To change your display, go to the menu "Options"-"Display",
choose a size and save the new settings.
NOTE: In the stand alone versions, you have to
close Sound Ruler to change the main window. If you do not actually save the
new settings, Sound Ruler will open in the next time with the same window design.
Go
to the menu "File" and select "Open". After
you choose a .wav file to open, a window will popup showing the duration of
the file and asking you to specify a section duration. Sound Ruler deals with
long files dividing them into sections. One section is displayed at a time and
analyzed. You should choose a section length that will allow you to visually
identify calls in it easily.
IMPORTANT
- there is a practical high limit for section duration. If you specify a long
section and it does not fit in the RAM memory of you computer, the hard drive
will be used for temporary storage, and that will produce a significant slow
down. To find out about the limit for your machine, start with a very short
duration (1 s) and increase it successively. Each time you open a file, your
computer should access the hard drive proportionally longer, as more data have
to be read from the disk. After some point, the computer starts accessing the
hard disk for a disproportionately long time. You will know that specifying
section durations that long will not be productive.
After you choose a section duration, the first
section is plotted in the Section Oscillogram and played. A list of sections
is displayed on the main window. You can now navigate your file, using
the "Next" button or clicking on the number of the section that you
want to inspect.
If
a call is cut by the end of the section, you can use the "Length (s)
" control in the "Section" area of the main window to make
the section slightly shorter or longer. The duration of the next section is
automatically adjusted to account for your change. The duration of each section
is always logged into the results, for repeatability of the analysis.
If the sound is so weak that you cannot see it
well, you can use the "Ampl(%)" control in the main window.
Keep in mind that amplifying the section will might help you visualize the sounds
better, but the analysis will be very course, due to the lack of signal. Digitally
amplifying a sound DOES NOT recover a lacking signal. In addition, remember
to set this to 100 before starting any analysis involving amplitude
calibration.
CALL DETECTION AND RECOGNITION
To
generate graphs an measure sounds, calls have to be recognized within the section.
This can be done manually or automatically. The method used at
this stage does not influence the precision of the results, as each call will
be measured in detail later on.
Do it manually to keep it simple and easy, or
automatically to make it objective and fast.
The manual procedure should be more appropriate
when you are using Sound Ruler to produce figures and want to create
plots with arbitrary limits.
Manual - Left-click at the beginning and at the end of each call in the section and click on the Manual button on the right side of the section list. It does not have to be very precise because a fine delimitation is still to be done. In case you click in the wrong place, click in the Sections list on the number of the current section to refresh it and do your selections again.
When you click on the "Manual" button, Sound Ruler will produce several plots. The first one is a oscillogram, and it is a zoom into the first call that you delimited in the section. The second one is a spectrogram of the same segment of sound, and the third one is a power spectrum, calculated across the point of maximum energy in the call.
Sound Ruler uses a blue line to show you graphically what it did. A blue line on the Section Oscillogram marks the limits of each call, as Sound Ruler recognized them. A blue line on the Call Oscillogram shows the limits of each pulse, and on the Spectrogram it shows how the dominant frequency was tracked. Notice that on the Call Oscillogram, the blue line is created by actually linking nine points of measurement (peak and 90%, 50%, 10% and 1% amplitude on each side), so it is not supposed to track the shape of the envelope exactly, but to be correct at the inflection points. If you want to see the measurement points in detail, click on the pop up list over the Power Spectrum plot and select Oscillogram.
Besides the blue lines, Sound Ruler also indicates the point of maximum amplitude of the call with a black circle on the Call Oscillogram. For better visual reference, the blue line on this plot is always displayed on the positive side of the signal, and the black circle is always displayed on the negative side. This might cause them to look slightly off if the signal is asymmetric as they always reflect the absolute maximum measurements.
You
can now roll the mouse over any of the graphs, and the relevant data at each
point will be displayed on the status bar, at the bottom of the screen. Sound
Ruler incorporates Mouse Log, for casual quick logging
of measurements.
To navigate the file, click on the number of the
call that you want plotted, or click on another section and command a new recognition
of calls.
Automatic
recognition can be very useful when you analyze many calls of a kind.
Computers today are fast and can take many measurements in a moment. One key
factor for a good analysis is a careful initial adjustment of the settings
and parameters used to recognize the sounds. Time spent finding the best settings
is rewarded with good sound recognition and translates into quick analysis.
Why can't Sound Ruler itself find the best settings?
Some times the decisions have to be in your hands, so that the program can be
versatile. I am working on "customizable default behaviors", where
Sound Ruler tries to come up with a good solution and you can still modify it.
But it will hardly get to the point in which you will not need to know what
the program is doing.
The
procedure for automatic recognition is basically the same for calls within the
section plot and for pulses within the call plot, and the following text is
meant to apply to both. The main difference is that when recognizing calls,
one is mostly interested on speed, whereas when recognizing pulses and measuring
the call, the main concern should be precision. The algorithms for recognizing
pulses are more powerful but slower than the ones to recognize calls.
When doing automatic recognition, Sound Ruler
needs to know what it is looking for. That information is contained in the parameters
that are used for recognition. You can inform those parameters by typing them
in (menu "Options"-"Section").
A
more intuitive approach is to show Sound Ruler a sample call and
let it get the parameters from the sample.
Recognition with a Sample: examine a section of
sound and choose an average call. Left-click at the beginning and at the end
of the call. Left-click once more over the next call. Now click on the button
"Sample" on the right side of the section list. All the calls
in the section should become recognized (blue gate around them). In addition,
the parameters of the sample call are in memory now, so you do not need to repeat
the procedure for the next sample. Just click on the "Auto"
button and the same parameters will be used.
Do not expect everything to get perfectly recognized and display on the first time that you click "Sample" or "Auto". The process usually takes some iteration, in which you adjust settings and try them on some calls. The next items explain how to adjust the most common settings.
Lets say that you dropped the microphone during the recording and now you have a terrible loud noise in your recording, that is recognized as a call. Right-click (red bars will appear) before and after the noise, and it will be ignored by the recognition algorithm.
This is true both for the Section Oscillogram and for the Call Oscillogram.
Recognition
window adjustment
The algorithm that recognizes calls within the
Section is very simplistic, so that it can be quick. As a result, calls are
frequently recognized but the edges are cut short in the second plot (Call Oscillogram).
Sound Ruler tries to account for this by including some extra space around
what was recognized in the next plot. You can change the amount of extra space
in the menu "Options"-"Section" , choosing
the options available for "Time displayed around calls".
Improving
the automatic recognition
When you give Sound Ruler a sample call, it learns
what to expect. You can still tell it how carefully it should search, how rigorous
it should be, and what method it should use (go to Menu "Options",
"Section").
Carefulness: to account for the oscillatory
nature of sounds, Sound Ruler takes measurements from "chunks" of
sound samples and after each measurement it moves a certain number of samples
forward, to measure the next chunk. The "Smooth" parameter
defines the size of a chunk and the "Resolution" parameter
defines the number of sample advanced between measurements (menu Options-Section
or Call, detection). Small numbers for both parameters should improve precision
at the cost of speed. At very small values of Smooth, however, recognition
should deteriorate, dependent on the frequency structure of the sound. The default
settings should already be pretty close to the ones that will produce the best
results, so try the other options first.
Rigorousness:
for each parameter measured from the call, you can define a "Range"
parameter (menu "Options"-"Section or Call", the values
for the recognition +/- prop values) which determines the range of values around
the expectation that are acceptable. Valid values go from 0 to 1, representing
a proportion of the expected value. For example, if the parameter
duration is 1 second and the range is 0.5, values between 0.5 and 1.5 will be
accepted. It frequently helps a lot to relax the rigorousness when you are not
getting all your sound recognized.
Method: the simpler the better. Clean recordings
of isolated calls should be easily recognized based on amplitude only. Any combination
of the following additional traits can be taken into account:
- duration
- interval
- frequency (for
pulses within calls only)
Have in mind that adding traits in addition to
amplitude to the recognition method will only reduce the range of sound that
get recognized. It is great for preventing undesired sounds from being recognized,
but it will not help to recognize sounds that are being ignored.
Recognizing pulses within a call
There
are a few differences between the procedure for recognizing pulses within a
call and the procedure for calls within a section. When recognizing pulses there
is no direct manual option because measurements are taken during the recognition
pass and the limits of the pulses do influence the results at this stage.
If
pulses do not get properly recognized within a call, you can resolve the problem
with intelligent recognition or a slightly different method of manual
indication.
When recognizing pulses within calls, there is
frequently a gradual change along the call on some or all the parameters
being measured, so that the pulses at the extremes of the call are not recognized.
You can use intelligent
recognition to account for those gradual changes. Intelligent recognition
is necessary for proper recognition of the pulses of most species that produce
trilled sounds. Go to the menu "Options"-"Call" and choose
one option for " Expectation for Next Pulse" and select one of the
five options of intelligent adjustment, with progressive order of complexity:
- Expected value
equals set value (normal measurement without adjustments)
- Expected value
equals the value of the previously measured pulse
- The proportion
(expected/previous) equals the proportion between the previous 2 pulses. In
other words (expected / p0) = (p0 / p-1).
- The difference
between the proportion (expected/previous) and the proportion between the previous
2 pulses equals the difference obtained between the last two proportions. In
other words (expected / p0) - (p0 / p-1) = (p0 / p-1) - (p-1 / p-2).
- The proportion
between (the proportion (expected/previous) and the proportion between the previous
2 pulses), equals the proportion obtained between the last two proportions.
In other words (expected / p0) / (p0 / p-1) = (p0 / p-1) / (p-1 / p-2).
Sometimes, there are abrupt changes among
the pulses, that can not be properly accounted for even with intelligent recognition.
You can use manual indication to get SoundRuler to recognize pulses that
were left out, or to merge extra inappropriate recognition events to the real
pulse. To do that, run the pulse recognition, then delimit each area where you
want one pulse to be recognized with left-click green bars, and click
on the "Auto" button in the Call area. Sound Ruler will not
take your limits as true, but instead, it will look for a pulse within the segment
that you delimited. The blue recognition gate should now incorporate one pulse
within each of the segments that you selected.
MEASUREMENT
Mouse
Log is Sound Ruler's tool for simple manual measurement logging. It is started
and stopped at the menu Tools - Mouse Log. When Mouse Log is started, it opens
Text Pad and pastes a general header in it. You can then (or any time later)
add your own notes. Then the right button of the mouse switches function and
becomes the trigger for logging measurements. You keep using the left button
to navigate the sound file and recognize pieces of sound, and when you right-click
on any of the plots, a new line of data appears in the Text Pad.
Harmonics
are multiple integers of the fundamental frequency of vibration of the sound
making structures. For each sound that is analyzed, Sound Ruler will measure
the amplitude of each of the harmonics defined in "Options", "Call",
"Measurement", "Harmonics".
To
determine the frequency of each of the harmonics in a call, it is necessary
to determine the fundamental frequency. Sound Ruler has an algorithm that does
it automatically, but it does not perform well in all situations. You can go
to "Options", "Call", "Measurement", select manual
"detection method" and specify the harmonic that it the dominant frequency
manually in the "dom harmon #" box of the main window. If you try
the automatic method and it does perform well in most cases, you can still adjust
the dominant frequency manually in the "dom harmon #" box of the main
window for some calls, and you will be asked if the change should affect the
current call only or if you want to switch to manual mode.
For each call and pulse, the dominant frequency is measured at the peak amplitude and also at nine amplitude markers along the call (see Measurement of spectral traits). Functional comparisons among the nine points require them to be taken along the same harmonic.
Sound Ruler
tracks the dominant frequency along the whole call, starting at the global peak
and going to the extremities. In animal calls, it is not uncommon for the dominant
frequency to vary among harmonics along the call.
If you want to examine frequency modulation, you
might want to force frequency tracking to follow the same harmonic along the
whole call, independent of it being or not the dominant frequency. Going to
"Options", "Call", "Measurement", you can control
frequency tracking in two ways: you can set a fix range of frequencies within
which frequency tracking has to occur along the call, or you can restrict the
width of the frequency range that is examined around the dominant frequency
to determine the dominant frequency in the next moment.
It
is easy to count pulses in a call when the amplitude falls to base line among
them. It is pretty common, however, for animals to produce sounds with noticeable
amplitude modulation, but incomplete separation between pulses. Sound
Ruler normally requires that amplitude to fall to less than 10% of previously
measured peak, to determine the end of a pulse.
The incomplete pulses setting allows you to also
count and measure pulses when the amplitude valley among them is not
less than 10% of the previous peak. There is still the limit that the valley
has to be at least lower than 50% of the amplitude of the previous peak (this
might change in the future, if requested). You can control what gets recognized
as a pulse in the menu "Options", "Call", "Measurement"
by setting "Critical ampl modulation". This setting specifies
the size of the peak that needs to follow an amplitude valley, for it to be
considered a new peak, and not just a bump in the fall of the previous peak.
The value is the proportion between the amplitude of the following peak and
the bottom of the valley. For example, a setting of 2 will require the peak
after the valley to have an amplitude at least twice as high as the bottom of
the valley. If you leave this setting at -1, incomplete pulses is disabled.
RESULTS
Navigating through the results
Sound Ruler includes a result navigator which allows you to check on all the results for a given analysis. If a call is reanalyzed, the new values replace the old ones. You can choose between displays of the raw data, summaries calculated from those data or the settings that were used.
When you click on any variable displayed in the result list, a brief explanation of that variable appears as a tooltip or in the status bar, depending on your display setting.
To Copy the results, or Describe
all variables displayed in the result list at any time to the Text Pad, click
on the Copy or Describe buttons above the result list.
For
simple quick measurements, you probably want to use the click on the Copy
button (above the results list) to have the data for each call pasted into
the Text Pad, or use the Mouse Log.
For more elaborate analysis, Sound Ruler offers
spreadsheet and database oriented output.
Think of Sound Ruler as a text editor. As you
proceed with the analysis, it accumulates data in the RAM memory and the data
is written to the disk when you command save (menu "File", "Save
Data"). The data are not erased from memory when you command save. Successive
save hits will incorporate the additions and reanalyses done since the last
save action.
The longer your analysis goes unsaved, the larger
the loss in case of a power outage, a computer malfunction, or a software bug,
so SAVE FREQUENTLY. To help the forgetful, Sound Ruler includes an AutoSave
function ("on" by default) that you can set at the menu "Options","General".
If you want to clean the memory and start a new
results file, go to menu "File", "Clear Data". DO NOT
save your new data under the old name after a Clear Data action or you will
replace your old data and loose them.
If you are doing extensive analysis of trilled
sounds on a computer with limited RAM, it is recommended that you stop
periodically, save the data, clear the data from memory and start saving to
a new file. Full result data can take megabytes of RAM and start to compromise
the performance of the computer.
You can choose (menu Options - Save) between saving
or not 3 groups of data for calls and pulses:
Summary Data
- a set of descriptors commonly used in bioacoustics, calculated from the raw
data.
Raw Data
- the actual results of the measurements. Contains positional data that allows
for exact reanalyzes of signals and raw information for calculation of quantities
not supplied in Summary.
Settings
- all the settings used to analyze that call. These might be important for reporting
with the results and for repeating an analysis.
There
are two ways of outputting the data:
One redundant
table - Simple but slow, it is one spreadsheet table in coma-delimited (.csv)
MSExcel-ready file. Each line in the table contains the results for one pulse.
It is a slow method because all the call and analysis information is repeated
for each pulse.
Two relational
tables - This is Sound Ruler's most efficient save method. It produces two
separate coma-delimited (.csv) MSExcel, MSAccess ready files. One has the results
for a call and all of its settings on each line. The other has the results for
a pulse on each line. Both have a CallID field which provides a unique key per
call, and establishes the relational link between the two tables.
Well
adjusted settings can save an enormous amount of time during the analysis, but
it might take some time to find the best settings. In SoundRuler, you have to
do it only once, as you can save your settings at the menu Options - Settings
- Save.
In studies involving analysis of series of similar
sounds, it might be interesting to form a library of the settings that work
best for analyzing each type of sound. Having your settings stored can save
you time at the beginning of each analysis and warrant consistency across analyses.
The settings files are text files with *.ini extension.
You can open them in Text Pad or a better editor and add notes to the variable
sized header or manually edit values.
NOTE: Settings based on number of samples, such
as FFT size, are sensitive to sampling rate. If you work with sounds digitized
at various sampling rates, you will might have to prepare multiple settings
files.
Save settings: whenever you are satisfied
with your settings for analyzing a type of sound, go to the menu "Options",
"Settings", "Save"
Load
settings: to recover settings from a previous analysis, go to the menu "Options",
"Settings", "Load".
If your settings became messed up and you want
to start over, go to the menu "Options", "Settings", "Load
defaults".
GRAPHING
Saving, copying and pasting figures
Sound
Ruler is a great tool for graphing sounds. You can export any combination
of graphs, edit them, and quickly generate batches of custom figures
with a same format but varying the data (see bellow). In any of its windows,
you can copy and paste you graphs as bitmaps or metafiles,
print them or save them in a variety of formats.
Go to the "File" menu, choose
"Save Figure" and select the formats in which you want to save
your figure.
You can also go to the "Edit"
menu and choose "Copy Figure" to paste the figure directly
into your text editor, presentation software or other application. The metafile
format should produce a smaller addition to your target file, but it the bitmat
should better preserve the original features. If you need to change the size
of the figure, resizing the original should produce better results than resizing
the pasted figure.
Navigate your sound files until you find a sound that you want to graph. Use auto or manual recognition to generate the derived graphs. Go to the menu "File", "Export Graphs" and choose the plots that you want to export. A new window will open with clean copies of the graphs that you chose. Here you can extensively edit your figure and each of the plots inside it.
When
satisfied with the result, you can:
- Save: go to the menu "File",
"Save Figure" and choose a format.
- Copy: go to the menu "Edit",
"Copy Figure" and choose a bitmap (raster) or metafile (vectorial).
- Print: go to the menu "File",
"Print".
- Refresh: leave this window open but return
to the main window. Resume navigating your file, find a new call and recognize
it. Now return to the graph window and click on the menu "Refresh
Data ". The graph data will be replaced with the data from the new
call.
Batch graphing and figure templates
If
you save your figures in Matlab's .fig format, you will be able to latter on
reload them and edit or refresh the data. This way you can save templates of
the figures in the size and arrangement that you use most often, and generate
series of figures with standardized format in seconds.
To load a figure that was previously saved in
the .fig format, go to the menu "File", "Export Graphs"
and click on the "Open" button.
Note: if you want to keep the time axes the same
for each figure, make sure that you go to the menu "Options",
"Section" and set "time displayed around the call"
to "centered", with its duration specified in samples or milliseconds.
TOOLS
Problem solving with Sound Math
Sound
Math is a new addition to Sound Ruler, with the challenge of helping the user
to integrate and visualize the quantitative relations between the factors involved
in bioacoustics. Future releases should add visual aids, more detail and new
scenarios.
It is mostly designed for teaching, but it can
be useful when designing new experimental setups or for quick math checks. Please
refer to how it works for a descriptions
of the mathematical relations among fields.
Currently, usage is very simple: change one field,
and the related ones are updated. If you click on the Copy button, a report
of the current scenario is pasted into the Text Pad.
If
you have a calibration signal in a sound file, Sound Ruler can easily calibrate
the display and all the measurements done on your recordings. You can calibrate
in volts or in decibels, and the changes are done in real time, with no need
to save calibrated versions of the recordings.
Open the file that contains your calibration signal
and left-click inside of the calibration signal twice, on the Section Oscillogram,
selecting a piece of the sound.
The
duration of the piece that you select will depend on your goal. You might want
a duration that corresponds to the integration time that you use in your sound
pressure level meter (0.2 s for fast and 0.5 for slow), or longer durations
that correspond to average measurements (how
it works).
Go to the menu Tools - Amplitude Calibration.
Sound Ruler shows you the measurements that it took on the piece of signal that
you selected. Enter the magnitude and select the unit that corresponds to your
calibrated signal.
The
Section Oscillogram is updated and the amplitude is now displayed in pascals
or volts, matching the unit of the calibration signal.
NOTE: Amplitude calibration currently affects
only the results and plots for the oscillograms. Results and plots for spectrograms
and power spectra cannot be calibrated yet.
Sound
Ruler incorporates simple hi, low and bandpass butterworth filters that
can produce great improvements in files with noise that does not overlap in
frequency with the signal of interest (tape recorder humming, 60 Hz, wind, hands
on the microphone, other species of animals, etc.).
The filter is represented by a horizontal red
line across the Spectrogram. By default, only a high pass filter is active,
with its cutting point at 80 Hz. To set the filter, right-click on the plot
to move the hipass line and right-click to move the lowpass line. Then click
on the "Update filter" button above the Spectrogram to filter
the section with the new settings. You can also set the filter by going to the
menu "Options"- "General". You will need to define
(Manual, Sample or Auto) the call again and then the filter will be active.
Also the filter will continue to be active after you open another file. If you
want to erase the filter, then click the "Erase filter" button.
Keep
in mind that the filter does not produce a categorical cut at the critical value,
but a sharp gradual ramp of amplitude reduction. Therefore, do not click too
close to the signals of interest, or you might bias the results of your analysis.
Sound Ruler also incorporates a module for general
design of complex filters, called Tuning Curve.
It is independent of the plain filter module, and besides tuning curves, it
can be used to produce a variety of filters.
Building a tuning curve filter
This tool allows you to design a filter that matches the spectral sensitivity
of the animals that are the natural receivers of your sounds. This way you can
visualize and measure your recordings in the way the animals perceive them.
You can vary the filter and repeat the analysis to look at how different species
perceive a sound, how mates vs. predators perceive an advertisement signal,
the structure of signals and hearing as a function of body size, etc.
Searching the scientific literature, you can find
data ranging from behavioral experiments in which the whole animal is tested,
down to electrophysiological data that show what the ears are perceiving and
even single cell recordings, which can reveal how each neuron involved in audition
reacts to sound input.
What you need is a table with two columns, listing
the sensitivity (in decibels) at each frequency. The interval between frequencies
is not fixed and does not need to be constant. The frequencies should range
anywhere between zero and half of the sampling rate, and should be in ascending
order.
NOTE: Filter files are text files with *.ini extension.
You can open them in Text Pad or a better editor and add notes to the header
or manually edit values.
Sound
Ruler will take the sensitivity at the lowest frequency that you enter and extrapolate
it down to zero, and do the same from your highest frequency up to the Nyquist
frequency (sampling rate / 2).
Filters should be defined in a text file with
a variable sized header for notes, ended by a line that starts with @@==. This
line is followed by the list of values, containing one frequency, a coma and
one sound pressure level in each line. Try editing one of the example filters
at <soundruler's folder>\filters.
To design the filter, go to the menu "Tools"
- "Tuning Curve" and click on the Build Filter button. Sound Ruler
will ask for the filter file and it will plot a graph showing the match between
your data and the filter. Adjust the Filter Order field, to find a good compromise
between filter complexity and fidelity.
NOTE: The filter building algorithm tends to produce
smooth transitions. If you define a filter with sharp angles using few points,
you will not obtain a good match, even at high filter order (see the example
U_filter). Sharp angles need to be defined with several points to produce tight
matches.
When
you click on the Apply Filter button, the section is updated with the new filter.
You can experiment passing white noise through the filter and examining the
power spectrum to see its effect, or simply play it.
Use the Enable Filter and Close buttons to turn
the filter on and off without having to rebuild it.
The
Cross Correlation Analysis (CCA) tool quantifies the amount of overlap between
two plots, and is commonly used as an index of similarity. Have in mind that
calls are complex traits and overlap on the plot does not weight acoustic characters
equally. For example, imagine a normalized comparison between spectrograms,
where the index is adjusted to vary from zero, if there is no overlap to 1,
if the signals are identical. If two tonal sounds such as whistles differ in
20% of the frequency, the might not overlap at all and receive a score of zero,
whereas if they differ in 20% of the duration, they will overlap most of the
time and receive a score of about 0.8.
The CCA algorithm actually slides the second plot
against the first one, and calculates the correlation coefficient at each step
of the slide. The program reports the maximum correlation obtained for a pair
of plots and the delay at which it was found.
In the case of Spectrogram correlations, you can
slide the plots in two dimensions (time and frequency) or time only. A 2D slide
might be appropriate in cases where call frequency is linked to body size. A
2D slide will measure the correlation removing the absolute time and frequency
to emphasize duration, AM and FM. It will produce two kinds of delay measurements:
time and frequency. You will know how different various calls were in absolute
frequency while the cross correlation indexes will be corrected for frequency.
Sound Ruler allows you to measure the traits in
your recordings and perform CCAs in a single pass. As each call is recognized
and measured, you can click on the CCA button by the Calls list, to assign that
call to the CCA.
When you are done measuring calls, go to the menu Tools - Cross Correlation and edit the list of assigned calls.
You
can actually have this window open from the start to check on the list of calls
as you add new ones. Select the plots that you want to correlate, and if you
want the measures normalized or not. As mentioned before, normalization forces
the values to range from 0 to 1, representing no overlap to complete overlap.
This is useful to eliminate the effect of differences in amplitude. Two sounds
that differ only in amplitude will have a score of 1 if the CCA is normalized.
CCAs of Spectrograms can take a while to calculate
because calculations are done for each frequency at each moment. You can edit
the Amount of Overlap Between FFTs field in the menu Options - Spectrogram to
find the best compromise between time resolution and calculation time. Check
on the status bar of the CCA window to see how many CCAs and correlations will
need to be calculated for each type of CCA. The calculation progress is indicated
on the status bar of the main window.
When
a call is assigned to CCA, it is taken as recognized by the blue line on the
Call Oscillogram. Edit the Extra Time field if you want to include the very
tips of the sounds, that the recognition algorithm might have cut. When you
click on the Run button, you will be asked for a filename, to save the results
in spreadsheet format. Independent of filling or canceling that window, Sound
Ruler will also paste the results into the TextPad.
The
output is a square matrix with a diagonal of zeros, above which the delays are
shown, and bellow which the correlations are shown.
IMPORTANT: When you click Run in the CCA
the window, each call is read again from the disk, it is filtered, the tuning
curve is applied, the FFTs are calculated and then the cross correlation is
calculated. This is to allow for CCAs of many calls without having to hold them
in memory. Currently, the settings for each call are not memorized and
all calls receive the same filters and FFT settings that are current when you
click on Run. In addition, all calls must have the same sample rate.
The bottom line is: when you start selecting calls for a CCA, you can not alter
any of the settings.
NOTE: Calls do not need to have the same duration,
as they are padded with zeros when necessary. In CCAs of power spectra, FFT
length is fixed, as set for display. If the call is shorter than the FFT length,
it is padded with zeros. It it is longer, only a piece of the call with 1 FFT
length is used, and it is centered at the point of maximum call amplitude.
I
agree that the TextPad is still in stone age!
I might come up with a way of adding sliding bars
or at least make it scroll as new data get in, but other parts of Sound Ruler
are currently at higher priority.
At least for now, try to use some other text editor
to do the heavy editing and use the keyboard to navigate the text. Click on
the text and you can go strait to the bottom with Ctrl + End, and strait to
the top with Ctrl + Home.
IF THINGS GO WRONG
The sequence of steps below was designed to minimize your frustration, bring you a solution quickly and reduce the chance of encountering problems again.
If
it is the first time that you are trying something and it does not work, please
put some time into trying to find the answer in the help files, the suggested
reading or the program itself.
If you find the solution and the problem was due
to poor documentation or unintuitive operation of the program, please email
a report (find the address on the menu Help - About). These problems are usually
hard to detect but easy to fix, and your contribution is invaluable for resolving
them.
If you do not find the solution to the problem,
please read the next items.
Let
us try a quick fix first. Save the data (optional) and go to the menu File -
Clear Data. The memory is cleared and and you are ready to continue without
having to close the program.
If
Clear Data does not help, you can close SoundRuler and reopen it, but the settings
will be lost.
If
the problem is still there or keeps reoccurring, please go to the website and
check on the download page at http://soundruler.sourceforge.net/download-en.net.htm.
Check on the number of the version that you are
using. There might be a newer version available for download, with a fix for
the problem.
If
the problem keeps happening and it was not documented yet, please email a report
to get it fixed! (find
the address on the menu Help - Contact).
To diagnose the problem, we have to be able to
repeat it. Please include in your report:
- A description
of the procedure that causes the error.
- The last lines
of output on the black screen (windows and script versions).
- The version of
SoundRuler that you are using (menu Help - About).
- It might be useful
to attach the sound file that was in use when the error happened.