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, version 1.1.0 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 in a browser: RShowDoc('sound_generation', package = 'soundgen') RShowDoc('acoustic_analysis', package = 'soundgen')

Installation

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 in a 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.1.1

License

GPL (>= 2)

Maintainer

Andrey Anikin

Last Published

December 2nd, 2017

Functions in soundgen (1.1.1)

Mode

Modified mode
HzToSemitones

Convert Hz to semitones
beat

Generate beat
analyzeFrame

Analyze fft frame
addFormants

Add formants
addVectors

Add overlapping vectors
clumper

Clump a sequence into large segments
analyze

Analyze sound
compareSounds

Compare sounds (experimental)
drawContour

Draw contour
analyzeFolder

Analyze sound
estimateVTL

Estimate vocal tract length
costJumps

Cost of jumps
crossFade

Join two waveforms by cross-fading
costPerPath

Cost per path
convert_sec_to_hms

Print time
defaults

Shiny app defaults
downsample

Simple downsampling
divideIntoSyllables

Syllable structure of a bout
convertStringToFormants

Prepare a list of formants
findVoicedSegments

Find voiced segments
findGrad

Find gradient
findZeroCrossing

Find zero crossing
findSyllables

Find syllables
getCheckerboardKernel

Checkerboard kernel
flatEnv

Flat envelope
getDiscreteContour

Discrete smooth contour from anchors
generateEpoch

Generate an epoch
fart

Fart
generateGC

Generate glottal cycles
findBursts

Find bursts
getDom

Get lowest dominant frequency band
generatePath

Generate path
getEntropy

Entropy
getEnv

Get amplitude envelope
getBandwidth

Get bandwidth
getFormantDispersion

Get formant dispersion
forcePerPath

Force per path
evaluatePars

Evaluate parameters for optimization
generateHarmonics

Generate harmonics
fade

Fade
ftwindow_modif

Fourier transform windows (seewave)
generateNoise

Generate noise
gaussian.w

Gaussian window
getNovelty

SSM novelty
getIntegerRandomWalk

Discrete random walk
getPitchAutocor

Autocorrelation pitch tracker
getSpectralEnvelope

Spectral envelope
getVocalFry

Subharmonics
getVocalFry_per_epoch

Constant subharmonics regime
mergeSyllables

Merge syllables
interpolate

Interpolate
matchPars

Match soundgen pars (experimental)
getFrameBank

Frame bank
medianSmoother

Median smoothing
getGlottalCycles

Divide f0 contour into glottal cycles
pathfinding_fast

Path through pitch candidates: fast
getPitchCep

Cepstral pitch tracker
getMelSpec

Mel-transformed spectrum
getSigmoid

Get sigmoid filter
getPitchSpec

BaNa pitch tracker
getSmoothContour

Smooth contour from anchors
isCentral.localMax

Simple peak detection
pathfinding_slow

Path through pitch candidates: slow
killDC

Kill envelope
reportTime

Report time
permittedValues

Defaults and ranges
rnorm_bounded

Random draw from a truncated normal distribution
getRandomWalk

Random walk
morphFormants

Morph formants
playme

Play audio
getRolloff

Control rolloff of harmonics
presets

Presets
matchColumns

Match number of columns
to_dB

Convert to dB
matchLengths

Resize vector to required length
listDepth

List depth
morphDF

Morph dataframes
log01

log01
morphList

Morph lists
upsample

Upsample pitch contour
notesDict

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

Split contour
sampleModif

sampleModif
ssm

Self-similarity matrix
segment

Segment a sound
morph

Morph sounds
wiggleAnchors

Randomly modify anchors
optimizePars

Optimize parameters for acoustic analysis
wigglePars

Wiggle parameters
pathfinder

Pathfinder
reformatAnchors

Reformat anchors
pitchManual

Manual pitch estimation in 260 sounds
reformatFormants

Reformat formants
segmentFolder

Segment all files in a folder
segmentManual

Manual counts of syllables in 260 sounds
soundgen_app

Soundgen shiny app
snake

Snake
spectrogram

Spectrogram
soundgen

Generate a sound
zeroOne

Normalize 0 to 1
selfsim

Compute self-similarity
semitonesToHz

Convert semitones to Hz