Internal soundgen function
guessPhase_GL(
spec,
phase,
nIter,
samplingRate,
overlap,
wn,
windowLength_points,
step_points,
verbose = TRUE,
plotError = TRUE
)
the spectrogram that is to be transform to a time series: numeric matrix with frequency bins in rows and time frames in columns
an initial guess at the phase: numeric matrix of the same dimensions as spec
the number of iterations of the GL algorithm (Griffin & Lim, 1984), 0 = don't run
sampling rate of x
(only needed if x
is a
numeric vector, rather than an audio file)
overlap between successive FFT frames, %
window type: gaussian, hanning, hamming, bartlett, rectangular, blackman, flattop
STFT window length in points
STFT step in points
if TRUE, prints estimated time left every 10% of GL iterations
if TRUE, produces a scree plot of squared error over GL iterations (useful for choosing `nIter`)
Returns a matrix of the same dimensions as `spec` containing the guessed phase.
Uses the iterative method proposed by Griffin & Lim (1984) to guess the phase of a magnitude spectrogram.