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

746

Version

1.1.0

License

GPL (>= 2)

Maintainer

Andrey Anikin

Last Published

October 19th, 2017

Functions in soundgen (1.1.0)

addVectors

Add overlapping vectors
analyze

Analyze sound
analyzeFolder

Analyze sound
analyzeFrame

Analyze fft frame
beat

Generate beat
clumper

Clump a sequence into large segments
defaults

Shiny app defaults
divideIntoSyllables

Syllable structure of a bout
compareSounds

Compare sounds (experimental)
convertStringToFormants

Prepare a list of formants
evaluatePars

Evaluate parameters for optimization
fadeInOut

Fade-in and fade-out
ftwindow_modif

Fourier transform windows (seewave)
flatEnv

Flat envelope
forcePerPath

Force per path
generatePath

Generate path
getBandwidth

Get bandwidth
HzToSemitones

Convert Hz to semitones
Mode

Modified mode
downsample

Simple downsampling
estimateVTL

Estimate vocal tract length
findVoicedSegments

Find voiced segments
costPerPath

Cost per path
crossFade

Join two waveforms by cross-fading
findGrad

Find gradient
findSyllables

Find syllables
convert_sec_to_hms

Print time
costJumps

Cost of jumps
fart

Fart
findBursts

Find bursts
findZeroCrossing

Find zero crossing
getDom

Get lowest dominant frequency band
getEntropy

Entropy
getPitchCep

Cepstral pitch tracker
getPitchSpec

BaNa pitch tracker
getVocalFry_per_epoch

Constant subharmonics regime
interpolate

Interpolate
getEnv

Get amplitude envelope
getFormantDispersion

Get formant dispersion
getRandomWalk

Random walk
getCheckerboardKernel

Checkerboard kernel
getDiscreteContour

Discrete smooth contour from anchors
getFrameBank

Frame bank
matchPars

Match soundgen pars (experimental)
medianSmoother

Median smoothing
morphList

Morph lists
notesDict

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

Control rolloff of harmonics
matchColumns

Match number of columns
matchLengths

Resize vector to required length
getGlottalCycles

Divide f0 contour into glottal cycles
getSigmoid

Get sigmoid filter
getSmoothContour

Smooth contour from anchors
listDepth

List depth
log01

log01
reportTime

Report time
rnorm_bounded

Random draw from a truncated normal distribution
wigglePars

Wiggle parameters
zeroOne

Normalize 0 to 1
gaussian.w

Gaussian window
generateHarmonics

Generate harmonics
generateNoise

Generate noise
getNovelty

SSM novelty
getPitchAutocor

Autocorrelation pitch tracker
isCentral.localMax

Simple peak detection
permittedValues

Defaults and ranges
pitchManual

Manual pitch estimation in 260 sounds
sampleModif

sampleModif
segment

Segment a sound
ssm

Self-similarity matrix
to_dB

Convert to dB
playme

Play audio
presets

Presets
segmentFolder

Segment all files in a folder
segmentManual

Manual counts of syllables in 260 sounds
generateEpoch

Generate an epoch
generateGC

Generate glottal cycles
getIntegerRandomWalk

Discrete random walk
upsample

Upsample pitch contour
wiggleAnchors

Randomly modify anchors
getMelSpec

Mel-transformed spectrum
getSpectralEnvelope

Spectral envelope
getVocalFry

Subharmonics
morphDF

Morph dataframes
killDC

Kill envelope
mergeSyllables

Merge syllables
morph

Morph sounds
optimizePars

Optimize parameters for acoustic analysis
pathfinder

Pathfinder
reformatAnchors

Reformat anchors
reformatFormants

Reformat formants
snake

Snake
morphFormants

Morph formants
pathfinding_fast

Path through pitch candidates: fast
pathfinding_slow

Path through pitch candidates: slow
selfsim

Compute self-similarity
semitonesToHz

Convert semitones to Hz
soundgen

Generate a sound
soundgen_app

Soundgen shiny app
spectrogram

Spectrogram