soundgen (version 1.5.0)

addPitchCands: Plot pitch candidates

Description

Internal soundgen function.

Usage

addPitchCands(pitchCands, pitchCert, pitchSource, pitch,
  candPlot = list(), pitchPlot = list(col = rgb(0, 0, 1, 0.75), lwd =
  3), addToExistingPlot = TRUE, showLegend = TRUE, ...)

Arguments

pitchCands, pitchCert, pitchSource

matrices of pitch candidates, their certainty, and pitch tracking method used as generated internally by analyze(); columns = STFT frames, rows = candidates

pitch

best guess at pitch contour; length = ncol(pitchCands)

candPlot, pitchPlot

lists of graphical settings for plotting candidates and pitch contour, respectively

addToExistingPlot

if TRUE, assumes that a spectrogram is already plotted; if FALSE, sets up a new plot

showLegend

if TRUE, shows a legend

...

other graphical parameters used for creating a new plot if addToExistingPlot = FALSE

Details

Plots pitch candidates or adds them to a spectrogram.

Examples

Run this code
# NOT RUN {
s = soundgen()
a = analyze(s, 16000, windowLength = 25, step = 25,
            summary = 'extended', plot = FALSE)
spectrogram(s, 16000, windowLength = 25, step = 5)
addPitchCands(pitchCands = a$pitchCands,
              pitchCert = a$pitchCert,
              pitchSource = a$pitchSource,
              pitch = a$result$pitch)
# }

Run the code above in your browser using DataLab