Learn R Programming

⚠️There's a newer version (2.7.4) 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 file: analyze()
  • Measuring syllables, pauses, and bursts in a .wav file: segment()

For more information, please see the vignettes on sound synthesis and acoustic analysis:

vignette("acoustic_analysis", package="soundgen")
vignette("sound_generation", 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

2,954

Version

1.1.2

License

GPL (>= 2)

Maintainer

Andrey Anikin

Last Published

January 23rd, 2018

Functions in soundgen (1.1.2)

analyzeFrame

Analyze fft frame
beat

Generate beat
HzToSemitones

Convert Hz to semitones
Mode

Modified mode
clumper

Clump a sequence into large segments
compareSounds

Compare sounds (experimental)
addFormants

Add formants
addVectors

Add overlapping vectors
drawContour

Draw contour
estimateVTL

Estimate vocal tract length
fart

Fart
findBursts

Find bursts
convertStringToFormants

Prepare a list of formants
convert_sec_to_hms

Print time
flatEnv

Flat envelope
forcePerPath

Force per path
getFrameBank

Frame bank
getGlottalCycles

Divide f0 contour into glottal cycles
getSpectralEnvelope

Spectral envelope
getVocalFry

Subharmonics
evaluatePars

Evaluate parameters for optimization
fade

Fade
getCheckerboardKernel

Checkerboard kernel
permittedValues

Defaults and ranges
pitchManual

Manual pitch estimation in 260 sounds
playme

Play audio
presets

Presets
ssm

Self-similarity matrix
to_dB

Convert to dB
getDiscreteContour

Discrete smooth contour from anchors
getEnv

Get amplitude envelope
getFormantDispersion

Get formant dispersion
listDepth

List depth
costJumps

Cost of jumps
costPerPath

Cost per path
findVoicedSegments

Find voiced segments
findZeroCrossing

Find zero crossing
generateEpoch

Generate an epoch
generateGC

Generate glottal cycles
getIntegerRandomWalk

Discrete random walk
getMelSpec

Mel-transformed spectrum
log01

log01
sampleModif

sampleModif
schwa

Schwa-related formant conversion
segmentManual

Manual counts of syllables in 260 sounds
selfsim

Compute self-similarity
analyze

Analyze sound
analyzeFolder

Analyze sound
crossFade

Join two waveforms by cross-fading
defaults

Shiny app defaults
findGrad

Find gradient
findSyllables

Find syllables
generatePath

Generate path
getBandwidth

Get bandwidth
getDom

Get lowest dominant frequency band
getSigmoid

Get sigmoid filter
getSmoothContour

Smooth contour from anchors
matchColumns

Match number of columns
upsample

Upsample pitch contour
wiggleAnchors

Randomly modify anchors
divideIntoSyllables

Syllable structure of a bout
downsample

Simple downsampling
ftwindow_modif

Fourier transform windows (seewave)
gaussian.w

Gaussian window
getNovelty

SSM novelty
getPitchAutocor

Autocorrelation pitch tracker
getPitchCep

Cepstral pitch tracker
getPitchSpec

BaNa pitch tracker
getEntropy

Entropy
getRandomWalk

Random walk
getRolloff

Control rolloff of harmonics
mergeSyllables

Merge syllables
morph

Morph sounds
optimizePars

Optimize parameters for acoustic analysis
matchLengths

Resize vector to required length
pathfinding_fast

Path through pitch candidates: fast
matchPars

Match soundgen pars (experimental)
medianSmoother

Median smoothing
morphDF

Morph dataframes
generateHarmonics

Generate harmonics
generateNoise

Generate noise
getVocalFry_per_epoch

Constant subharmonics regime
interpolate

Interpolate
pathfinding_slow

Path through pitch candidates: slow
pathfinder

Pathfinder
segment

Segment a sound
segmentFolder

Segment all files in a folder
isCentral.localMax

Simple peak detection
killDC

Kill envelope
morphList

Morph lists
notesDict

Conversion table from Hz to semitones above C0 to musical notation
reportTime

Report time
rnorm_bounded

Random draw from a truncated normal distribution
spectrogram

Spectrogram
reformatAnchors

Reformat anchors
reformatFormants

Reformat formants
soundgen

Generate a sound
soundgen_app

Soundgen shiny app
splitContour

Split contour
wigglePars

Wiggle parameters
zeroOne

Normalize 0 to 1
morphFormants

Morph formants
semitonesToHz

Convert semitones to Hz
snake

Snake