Performs parametric synthesis of sounds with harmonic and noise
components such as animal vocalizations or human voice. Also offers tools
for spectral analysis, audio segmentation, self-similarity matrices,
modulation spectra, morphing, etc., as well as interactive web apps for
manually corrected pitch tracking and formant measurement. Reference:
Anikin (2019)
R package for sound synthesis and acoustic analysis.
Homepage with help, demos, etc: http://cogsci.se/soundgen.html
Source code on github: https://github.com/tatters/soundgen
Performs parametric synthesis of sounds with harmonic and noise components such as animal vocalizations or human voice. Also includes tools for spectral analysis, pitch tracking, audio segmentation, self-similarity matrices, morphing, etc.
soundgen()
soungen_app()
analyze()
segment()
For more information, please see the vignettes on sound synthesis and acoustic analysis:
vignette("sound_generation", package="soundgen")
vignette("acoustic_analysis", package="soundgen")
Or, to open the vignettes in a browser:
RShowDoc('sound_generation', package = 'soundgen')
RShowDoc('acoustic_analysis', package = 'soundgen')
To install the current release from CRAN: install.packages("soundgen")
NB: Make sure all dependencies have been installed correctly! For problems with seewave, see http://rug.mnhn.fr/seewave/
On Macs, you may need to do the following:
brew install libsndfile
brew install fftw
install.packages("soundgen")
CHANGES IN SOUNDGEN VERSION 1.4.0 [13-March-2019]
MAJOR (affect back-compatibility):
NEW FUNCTIONS:
MINOR:
spectrogram(), getLoudness(): better temporal alignment of the waveform, spectrogram, and loudness contour
analyze(), analyzeFolder(): more precise time stampts for STFT frames
getLoudness(), analyze(): both functions produce mutually consistent estimates; option to specify the "scale" (maximum possible amplitude) of input waveforms (for audio files, the scale is determined automatically), making loudness estimates dependent on the actual vs. theoretically possible amplitude; all sounds were effectively normalized to max amplitude in earlier versions
soundgen_app(): more intelligent behavior of pitch range
Updated vignettes and demos
CHANGES IN SOUNDGEN VERSION 1.3.2 [10-January-2019]
MINOR:
BUG FIXES:
soundgen(), getRolloff(): rolloffOct argument now really controls the change of rolloff per octave above the fundamental frequency, as intended; note that this affects many presets, which have been updated accordingly
soundgen(): proper control of pitch drift with pitchDriftDep
soundgen(), soundgen_app(): pitchFloor and pitchCeiling fully control pitch range, without needing to override permittedValues with "invalidArgAction = 'ignore'"
analyze(): plotting symbols for pitch candidates in plot legend
CHANGES IN SOUNDGEN VERSION 1.3.1 [04-October-2018]
NEW FUNCTIONS:
MINOR:
BUG FIXES:
analyzeFolder(): the result is returned with correct class (numeric instead of factor)
flatEnv(): fixed a bug that prevented correct removal of DC offset ("killDC")
generateNoise(): proper interpolation of user-specified "spectralEnvelope" (renamed from "filterNoise")
soundgen_app(): fixed a bug introduced in 1.3.0 that caused the app to crash when switching to a new preset
soundgen_app(): proper plotting of amplGlobal and spectrogram view of formantsNoise
CHANGES IN SOUNDGEN VERSION 1.3.0 [31-August-2018]
Back-compatible with soundgen 1.2.X. The main change is abolishing the distinction between anchors (previously pitchAnchors, ampAnchors, etc.) and other vectorized arguments to soundgen (jitterDep, rolloff, etc.) Most vectorized arguments can now be either numeric vectors or dataframes.
NEW FUNCTIONS:
MAJOR:
MINOR:
soundgen() and related functions: "throwaway" is deprecated and replaced with "dynamicRange"
spectrogram(), soundgen_app(): added dynamic range, support for plotting the oscillogram on a dB scale, and adjustable size of spectrogram/oscillogram panels
soundgen_app(): fixed a bug introduced in 1.2.1 that crashed the app when changing sylLen. Thanks to Andrew Chang for pointing this out
Updated vignettes on sound synthesis and analysis, a new vignette on reproducing an existing sound with soundgen (webpage only, not published with the package because of large audio files)
CHANGES IN SOUNDGEN VERSION 1.2.1 [04-August-2018]
NEW FUNCTIONS:
MINOR:
analyze(): spectral median (medianFreq) and spectral centroid (specCentroid) added as separate outputs; type ?analyze() for details
soundgen(): a new argument shimmerLen for controlling the period of shimmer (cf. jitterLen)
soundgen(): a new argument noiseFlatSpec for more advanced control of the spectrum of the unvoiced component
soundgen(): more intelligent automatic adjustment of pitch ceiling, floor, pitch sampling rate, and sampling rate for extreme pitch values
crossFade(): accepts different shapes of fade-in/out
flatEnv(): minor debugging, default method is now "hil" (see ?seewave::env)
schwa() returns relative formant frequencies in both percentages and semitones
Updated url's in documentation
Updated vignettes on sound synthesis and particularly on sound analysis, including a new section on DIY extraction of custom spectral descriptors
CHANGES IN SOUNDGEN VERSION 1.2.0 [04-March-2018]
Back-compatibible with soundgen 1.1.x. Old code will mostly produce the same results, except for moving noise formants and amplitude envelopes in polysyllabic sounds.
MAJOR:
NEW FUNCTIONS:
MINOR:
soundgen(): an option to add extra stochastic formants to the unvoiced component, just like for the voiced component. To do so, specify "vocalTract" explicitly (see vignette 2.12.1)
soundgen(): the expected range of amplAnchors is now (throwaway, 0), e.g. (-80, 0), and for amplAnchorsGlobal 0 means no change. Values on the old scale will still work (see vignette 2.8)
soundgen(): a negative pause (overlap) is allowed between bouts (but not between syllables)
soundgen(): attack can be different at the beginning and end of a syllable, e.g. "attackLen = c(50, 100)"
getSmoothContour(): proper handling and plotting of anchors that need downsampling, interpolation forced exactly through the specified anchors with interpol = 'approx'
segmentFolder(), analyzeFolder(): new argument "htmlPlots" to create an html file with a table of click-to-play plots; new default strategy for saving plots (see "savePlots" argument)
analyze(), analyzeFolder(), segment(), segmentFolder(): new argument "res" for proper control of the size and resolution of the output plots
CHANGES IN SOUNDGEN VERSION 1.1.2 [23-January-2018]
NEW FUNCTIONS:
MINOR:
soundgen(): very rapid or instantaneous attack is now achievable without adjusting windowLength
soundgen(): a new top-level scaling factor formantWidth for simple control of formant bandwidth
soundgen(): noiseAnchors are scaled appropriately as syllable length varies due to jitter, while post-syllabic noiseAnchors are not scaled with syllable duration (i.e. the length of post-syllabic aspiration is held constant as syllable length varies)
soundgen(): interpol affects the smoothing of mouth anchors
analyze(), segment(): streamlined and extended plotting options, fixed a bug in saving plots
segment(): fixed a bug that caused pauseLen_sd to always return NA
spectrogram(): proper handling of silent or very short input
spectrogram(): fixed a bug in denoising routines
morph(): fixed a bug with noiseAnchors that are NULL in one sound and another bug caused by changes in duplicated() that were introduced in the new version of r-devel. Thanks to Kurt Hornik for pointing this out
CHANGES IN SOUNDGEN VERSION 1.1.1 [02-December-2017]
NEW FUNCTIONS:
MINOR:
soundgen(): support for discontinuous contours such as pitch jumps, new arguments to soundgen for controlling interpolation between anchors (new arguments: "interpol", "discontThres", "jumpThres")
soundgen(): all tempEffects default to 1 and act like scaling factors, a new tempEffect added ("specDep")
soundgen(): invalidArgAction propagates through temperature effects, ensuring that "weird" parameter values outside the ranges in permittedValues are processed properly
soundgen(): vectorized rolloffNoise
soundgen(): slightly modified effects of creakyBreathy hyperparameter
soundgen_app(): fixed a bug introduced in soundgen 1.1.0, which caused the app to crash with simplified formant specification
Extended and updated vignette on sound generation
Miscellaneous small-scale debugging
CHANGES IN SOUNDGEN VERSION 1.1.0 [19-October-2017]
MAJOR
MINOR
NEW FUNCTIONS:
flatEnv(): normalizes amplitude envelope dynamically, i.e., keeping loudness constant throughout the sound
estimateVTL(): estimates the length of vocal tract based on formant frequencies
fart(): a simplified version of soundgen() for simple and rapid generation of a particular type of sounds, like raspberries, ripping noises, etc
beat(): generation of percussive noises like drum-like beats, clicks, etc
RELEASE OF SOUNDGEN VERSION 1.0.0 [04-September-2017]