dot-flatSpectrum: Flat spectrum per sound

.flatSpectrumR Documentation

Flat spectrum per sound

Description

Internal soundgen function, see flatSpectrum.

Usage

.flatSpectrum(
  audio,
  freqWindow = NULL,
  samplingRate = NULL,
  dynamicRange = 80,
  windowLength = 50,
  step = NULL,
  overlap = 90,
  wn = "gaussian",
  zp = 0,
  play = FALSE,
  saveAudio = NULL
)

Arguments

audio

a list returned by readAudio

freqWindow

the width of smoothing window, Hz. Defaults to median pitch estimated by analyze

samplingRate

sampling rate of x (only needed if x is a numeric vector)

dynamicRange

dynamic range, dB. All values more than one dynamicRange under maximum are treated as zero

windowLength

length of FFT window, ms

step

you can override overlap by specifying FFT step, ms (NB: because digital audio is sampled at discrete time intervals of 1/samplingRate, the actual step and thus the time stamps of STFT frames may be slightly different, eg 24.98866 instead of 25.0 ms)

overlap

overlap between successive FFT frames, %

wn

window type accepted by ftwindow, currently gaussian, hanning, hamming, bartlett, rectangular, blackman, flattop

zp

window length after zero padding, points

play

if TRUE, plays the processed audio

saveAudio

full (!) path to folder for saving the processed audio; NULL = don't save, ” = same as input folder (NB: overwrites the originals!)


tatters/soundgen documentation built on Aug. 22, 2023, 4:24 p.m.