Learn R Programming

emuR (version 2.5.0)

create_spectrogram_image_as_raster: Create spectrogram image as raster

Description

Create spectrogram image as raster

Usage

create_spectrogram_image_as_raster(
  audioFilePath,
  begin = 0,
  end = 0,
  windowSizeInSecs = 0.01,
  alpha = 0.16,
  lowerFreq = 0,
  upperFreq = 5000,
  window = "GAUSS",
  dynRangeInDB = 70,
  audioChannel = 1,
  preEmphasisFilterFactor = 0.97,
  invert = FALSE
)

Value

a image raster object

Arguments

audioFilePath

path to audio file to plot spectrogram of

begin

begin time in seconds (passed into begin parameter of wrassp::read.AsspDataObj)

end

end time in seconds (passed into end parameter of wrassp::read.AsspDataObj)

windowSizeInSecs

window size in seconds

alpha

value of spectrogram

lowerFreq

lower frequency limit of spectrogram

upperFreq

upper frequency limit of spectrogram

window

window type used in spectrogram calculation. Allowed values are:

  • "BARTLETT"

  • "BARTLETTHANN"

  • "BLACKMAN"

  • "COSINE"

  • "GAUSS" (the default)

  • "HAMMING"

  • "HANN"

  • "LANCZOS"

  • "RECTANGULAR"

  • "TRIANGULAR"

dynRangeInDB

dynamic range in DB of spectrogram

audioChannel

channel of audio file to draw spectrogram of (only applicable when using multi-channel audio files)

preEmphasisFilterFactor

used in time domain for amplifying high-freqs

invert

invert the colors of the spectrogram