addPitchCands: Plot pitch candidates

Description Usage Arguments Details Examples

View source: R/utilities_pitch_postprocessing.R

Description

Internal soundgen function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
addPitchCands(
  pitchCands,
  pitchCert,
  pitchSource,
  pitch,
  timestamps = NULL,
  candPlot = list(),
  pitchPlot = list(),
  extraContour = NULL,
  extraContour_pars = list(),
  priorMean = NULL,
  priorSD = NULL,
  pitchFloor = NULL,
  pitchCeiling = NULL,
  addToExistingPlot = TRUE,
  showLegend = TRUE,
  y_Hz = FALSE,
  ...
)

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

extraContour

another contour to add to the plot, such as harmHeight, Hz

addToExistingPlot

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

showLegend

if TRUE, shows a legend

y_Hz

if TRUE, plot in Hz, otherwise in kHz

...

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

Details

Plots pitch candidates or adds them to a spectrogram.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

## End(Not run)

soundgen documentation built on June 20, 2021, 1:06 a.m.