Learn R Programming

⚠️There's a newer version (2.7.3) 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()
  • Shiny app for editing intonation contours (opens in a browser): pitch_app()
  • 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

827

Version

1.5.1

License

GPL (>= 2)

Maintainer

Andrey Anikin

Last Published

October 12th, 2019

Functions in soundgen (1.5.1)

crossFade

Join two waveforms by cross-fading
divideIntoSyllables

Syllable structure of a bout
findBursts

Find bursts
costPerPath

Cost per path
filled.contour.mod

Modified filled.contour
defaults_analyze

Defaults and ranges for analyze()
fart

Fart
defaults

Shiny app defaults
findGrad

Find gradient
generateGC

Generate glottal cycles
generateHarmonics

Generate harmonics
analyzeFrame

Analyze fft frame
convert_sec_to_hms

Print time
findSyllables

Find syllables
compareSounds

Compare sounds (experimental)
drawContour

Draw contour
flatSpectrum

Flat spectrum
convertStringToFormants

Prepare a list of formants
forcePerPath

Force per path
estimateVTL

Estimate vocal tract length
getFrameBank

Frame bank
getFormantDispersion

Get formant dispersion
findVoicedSegments

Find voiced segments
getDiscreteContour

Discrete smooth contour from anchors
ftwindow_modif

Fourier transform windows (seewave)
getIntegerRandomWalk

Discrete random walk
getRandomWalk

Random walk
getRMSFolder

RMS amplitude per folder
getGlottalCycles

Divide f0 contour into glottal cycles
intplPitch

Interpolate pitch contour
getMelSpec

Mel-transformed spectrum
getDom

Get lowest dominant frequency band
getLoudnessPerFrame

Get loudness per frame
isCentral.localMax

Simple peak detection
generateNoise

Generate noise
costJumps

Cost of jumps
pitch_app

Interactive pitch editor
reportTime

Report time
modulationSpectrumFolder

Modulation spectrum per folder
rnorm_truncated

Random draw from a truncated normal distribution
morphList

Morph lists
morphFormants

Morph formants
modulationSpectrum

Modulation spectrum
playme

Play audio
generatePath

Generate path
downsample

Simple downsampling
fade

Fade
findZeroCrossing

Find zero crossing
getCheckerboardKernel

Checkerboard kernel
getLoudness

Get loudness
flatEnv

Flat envelope
gaussian.w

Gaussian window
getSigmoid

Get sigmoid filter
getBandwidth

Get bandwidth
matchLengths

Resize vector to required length
evaluatePars

Evaluate parameters for optimization
getRough

Get roughness
getRolloff

Control rolloff of harmonics
iso226

iso226
getLoudnessFolder

Loudness per folder
killDC

Kill DC
matchPars

Match soundgen pars (experimental)
getSmoothContour

Smooth contour from anchors
gaussianSmooth2D

Gaussian smoothing in 2D
permittedValues

Defaults and ranges for soundgen()
matchColumns

Match number of columns
getEntropy

Entropy
logMatrix

Log-warp matrix
normalizeFolder

Normalize folder
generateEpoch

Generate an epoch
phon2sone

Convert phon to sone
segment

Segment a sound
getEnv

Get amplitude envelope
soundgen_app

Interactive sound synthesizer
soundgen

Generate a sound
segmentFolder

Segment all files in a folder
ssm

Self-similarity matrix
getRMS

RMS amplitude per frame
getPitchAutocor

Autocorrelation pitch tracker
getNovelty

SSM novelty
getPrior

Get prior for pitch candidates
summarizeAnalyze

Summarize the output of analyze()
htmlPlots

HTML for clickable plots
optimizePars

Optimize parameters for acoustic analysis
getVocalFry_per_epoch

Constant subharmonics regime
wiggleGC

Wiggle glottal cycles
wigglePars

Wiggle parameters
spectrogram

Spectrogram
spectrogramFolder

Save spectrograms per folder
osc_dB

Oscillogram dB
scaleNoiseAnchors

Scale noise anchors
upsample

Upsample pitch contour
reformatAnchors

Reformat anchors
sampleModif

sampleModif
presets

Presets
listDepth

List depth
medianSmoother

Median smoothing
mergeSyllables

Merge syllables
to_dB

Convert to dB
switchColorTheme

Switch color theme
getVocalFry

Subharmonics
interpolMatrix

Interpolate matrix
getPitchSpec

BaNa pitch tracker
log01

log01
getPitchCep

Cepstral pitch tracker
getSpectralEnvelope

Spectral envelope
semitonesToHz

Convert semitones to Hz
pathfinder

Pathfinder
pDistr

Proportion of total
segmentManual

Manual counts of syllables in 260 sounds
reformatFormants

Reformat formants
snake

Snake
notesDict

Conversion table from Hz to musical notation
zeroOne

Normalize 0 to 1
reportCI

Report CI
selfsim

Compute self-similarity
pitchManual

Manual pitch estimation in 260 sounds
wiggleAnchors

Randomly modify anchors
pitchSmoothPraat

Pitch smoothing as in Praat
interpolate

Interpolate
morph

Morph sounds
morphDF

Morph dataframes
scaleSPL

Scale SPL
schwa

Schwa-related formant conversion
pathfinding_slow

Path through pitch candidates: slow
pathfinding_fast

Path through pitch candidates: fast
splitContour

Split contour
transplantFormants

Transplant formants
spreadSpec

Spread spectrum
updateAnalyze

Update analyze
clumper

Clump a sequence into large segments
Mode

Modified mode
addPitchCands

Plot pitch candidates
analyzeFolder

Analyze folder
beat

Generate beat
addFormants

Add formants
HzToSemitones

Convert Hz to semitones
addVectors

Add overlapping vectors
analyze

Analyze sound