Learn R Programming

⚠️There's a newer version (2.7.2) of this package.Take me there.

soundgen

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.

Key functions:

  • Sound synthesis from R console: soundgen()
  • Shiny app for sound synthesis (opens in a browser): soungen_app()
  • Acoustic analysis of a wav/mp3 file: analyze()
  • Measuring syllables, pauses, and bursts in a wav/mp3 file: 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')

Installation

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:

  • First install brew according to the instructions here: https://brew.sh/
  • Then run the following from the terminal
    brew install libsndfile
    brew install fftw
  • Finally, install soundgen in R:
    install.packages("soundgen")

Copy Link

Version

Install

install.packages('soundgen')

Monthly Downloads

746

Version

1.4.0

License

GPL (>= 2)

Maintainer

Andrey Anikin

Last Published

March 13th, 2019

Functions in soundgen (1.4.0)

HzToSemitones

Convert Hz to semitones
flatEnv

Flat envelope
Mode

Modified mode
drawContour

Draw contour
forcePerPath

Force per path
ftwindow_modif

Fourier transform windows (seewave)
estimateVTL

Estimate vocal tract length
clumper

Clump a sequence into large segments
compareSounds

Compare sounds (experimental)
gaussian.w

Gaussian window
getBandwidth

Get bandwidth
getDiscreteContour

Discrete smooth contour from anchors
getCheckerboardKernel

Checkerboard kernel
convertStringToFormants

Prepare a list of formants
getFormantDispersion

Get formant dispersion
getDom

Get lowest dominant frequency band
convert_sec_to_hms

Print time
getRMSFolder

RMS amplitude per folder
getRMS

RMS amplitude per frame
getFrameBank

Frame bank
fart

Fart
interpolate

Interpolate
getSmoothContour

Smooth contour from anchors
isCentral.localMax

Simple peak detection
findBursts

Find bursts
getSpectralEnvelope

Spectral envelope
logMatrix

Log-warp matrix
morph

Morph sounds
morphDF

Morph dataframes
matchColumns

Match number of columns
morphFormants

Morph formants
presets

Presets
reformatAnchors

Reformat anchors
gaussianSmooth2D

Gaussian smoothing in 2D
segment

Segment a sound
pathfinding_fast

Path through pitch candidates: fast
morphList

Morph lists
pathfinding_slow

Path through pitch candidates: slow
segmentFolder

Segment all files in a folder
splitContour

Split contour
spectrogram

Spectrogram
spectrogramFolder

Save spectrograms per folder
generateEpoch

Generate an epoch
getLoudness

Get loudness
upsample

Upsample pitch contour
getLoudnessFolder

Loudness per folder
wiggleAnchors

Randomly modify anchors
spreadSpec

Spread spectrum
getNovelty

SSM novelty
wiggleGC

Wiggle glottal cycles
getPitchAutocor

Autocorrelation pitch tracker
getRough

Get roughness
getSigmoid

Get sigmoid filter
listDepth

List depth
log01

log01
wigglePars

Wiggle parameters
normalizeFolder

Normalize folder
notesDict

Conversion table from Hz to musical notation
pDistr

Proportion of total
analyzeFrame

Analyze fft frame
addFormants

Add formants
addVectors

Add overlapping vectors
pathfinder

Pathfinder
sampleModif

sampleModif
beat

Generate beat
crossFade

Join two waveforms by cross-fading
defaults

Shiny app defaults
divideIntoSyllables

Syllable structure of a bout
findGrad

Find gradient
scaleNoiseAnchors

Scale noise anchors
semitonesToHz

Convert semitones to Hz
downsample

Simple downsampling
evaluatePars

Evaluate parameters for optimization
findSyllables

Find syllables
snake

Snake
getLoudnessPerFrame

Get loudness per frame
getMelSpec

Mel-transformed spectrum
fade

Fade
generateGC

Generate glottal cycles
generateHarmonics

Generate harmonics
getGlottalCycles

Divide f0 contour into glottal cycles
analyze

Analyze sound
analyzeFolder

Analyze folder
findVoicedSegments

Find voiced segments
getIntegerRandomWalk

Discrete random walk
getPitchCep

Cepstral pitch tracker
getPitchSpec

BaNa pitch tracker
getVocalFry

Subharmonics
iso226

iso226
findZeroCrossing

Find zero crossing
generateNoise

Generate noise
generatePath

Generate path
killDC

Kill DC
pitchManual

Manual pitch estimation in 260 sounds
getEntropy

Entropy
getVocalFry_per_epoch

Constant subharmonics regime
medianSmoother

Median smoothing
getEnv

Get amplitude envelope
getRandomWalk

Random walk
mergeSyllables

Merge syllables
playme

Play audio
optimizePars

Optimize parameters for acoustic analysis
reportTime

Report time
osc_dB

Oscillogram dB
rnorm_bounded

Random draw from a truncated normal distribution
getRolloff

Control rolloff of harmonics
segmentManual

Manual counts of syllables in 260 sounds
scaleSPL

Scale SPL
schwa

Schwa-related formant conversion
selfsim

Compute self-similarity
zeroOne

Normalize 0 to 1
htmlPlots

HTML for clickable plots
interpolMatrix

Interpolate matrix
matchLengths

Resize vector to required length
matchPars

Match soundgen pars (experimental)
modulationSpectrum

Modulation spectrum
modulationSpectrumFolder

Modulation spectrum per folder
permittedValues

Defaults and ranges
phon2sone

Convert phon to sone
reformatFormants

Reformat formants
reportCI

Report CI
soundgen

Generate a sound
soundgen_app

Soundgen shiny app
ssm

Self-similarity matrix
to_dB

Convert to dB
costJumps

Cost of jumps
costPerPath

Cost per path