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 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("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

706

Version

1.3.1

License

GPL (>= 2)

Maintainer

Andrey Anikin

Last Published

October 4th, 2018

Functions in soundgen (1.3.1)

crossFade

Join two waveforms by cross-fading
defaults

Shiny app defaults
flatEnv

Flat envelope
getSmoothContour

Smooth contour from anchors
generatePath

Generate path
forcePerPath

Force per path
getBandwidth

Get bandwidth
getSigmoid

Get sigmoid filter
costJumps

Cost of jumps
costPerPath

Cost per path
fart

Fart
estimateVTL

Estimate vocal tract length
analyzeFolder

Analyze folder
drawContour

Draw contour
convertStringToFormants

Prepare a list of formants
findGrad

Find gradient
findBursts

Find bursts
convert_sec_to_hms

Print time
ftwindow_modif

Fourier transform windows (seewave)
findVoicedSegments

Find voiced segments
evaluatePars

Evaluate parameters for optimization
divideIntoSyllables

Syllable structure of a bout
gaussian.w

Gaussian window
downsample

Simple downsampling
findSyllables

Find syllables
findZeroCrossing

Find zero crossing
generateEpoch

Generate an epoch
getFrameBank

Frame bank
generateGC

Generate glottal cycles
getEnv

Get amplitude envelope
getVocalFry_per_epoch

Constant subharmonics regime
getGlottalCycles

Divide f0 contour into glottal cycles
getRandomWalk

Random walk
htmlPlots

HTML for clickable plots
fade

Fade
getIntegerRandomWalk

Discrete random walk
getCheckerboardKernel

Checkerboard kernel
morph

Morph sounds
getFormantDispersion

Get formant dispersion
morphDF

Morph dataframes
getRolloff

Control rolloff of harmonics
getDiscreteContour

Discrete smooth contour from anchors
getLoudness

Get loudness
getPitchCep

Cepstral pitch tracker
morphFormants

Morph formants
generateHarmonics

Generate harmonics
getLoudnessPerFrame

Get loudness per frame
morphList

Morph lists
getSpectralEnvelope

Spectral envelope
permittedValues

Defaults and ranges
semitonesToHz

Convert semitones to Hz
generateNoise

Generate noise
getDom

Get lowest dominant frequency band
phon2sone

Convert phon to sone
getEntropy

Entropy
snake

Snake
log01

log01
ssm

Self-similarity matrix
getVocalFry

Subharmonics
matchColumns

Match number of columns
getMelSpec

Mel-transformed spectrum
killDC

Kill DC
to_dB

Convert to dB
getNovelty

SSM novelty
notesDict

Conversion table from Hz to musical notation
getPitchAutocor

Autocorrelation pitch tracker
reformatFormants

Reformat formants
getPitchSpec

BaNa pitch tracker
interpolMatrix

Interpolate matrix
listDepth

List depth
isCentral.localMax

Simple peak detection
matchPars

Match soundgen pars (experimental)
matchLengths

Resize vector to required length
reportCI

Report CI
soundgen_app

Soundgen shiny app
soundgen

Generate a sound
pitchManual

Manual pitch estimation in 260 sounds
optimizePars

Optimize parameters for acoustic analysis
iso226

iso226
osc_dB

Oscillogram dB
interpolate

Interpolate
playme

Play audio
pathfinder

Pathfinder
scaleSPL

Scale SPL
schwa

Schwa-related formant conversion
segment

Segment a sound
selfsim

Compute self-similarity
segmentManual

Manual counts of syllables in 260 sounds
segmentFolder

Segment all files in a folder
zeroOne

Normalize 0 to 1
spectrogram

Spectrogram
presets

Presets
reformatAnchors

Reformat anchors
medianSmoother

Median smoothing
spectrogramFolder

Save spectrograms per folder
reportTime

Report time
upsample

Upsample pitch contour
mergeSyllables

Merge syllables
wiggleAnchors

Randomly modify anchors
rnorm_bounded

Random draw from a truncated normal distribution
splitContour

Split contour
pathfinding_fast

Path through pitch candidates: fast
spreadSpec

Spread spectrum
wiggleGC

Wiggle glottal cycles
pathfinding_slow

Path through pitch candidates: slow
sampleModif

sampleModif
scaleNoiseAnchors

Scale noise anchors
wigglePars

Wiggle parameters
HzToSemitones

Convert Hz to semitones
addFormants

Add formants
addVectors

Add overlapping vectors
Mode

Modified mode
clumper

Clump a sequence into large segments
analyze

Analyze sound
analyzeFrame

Analyze fft frame
beat

Generate beat
compareSounds

Compare sounds (experimental)