getVocalFry: Subharmonics

Description Usage Arguments Details Value Examples

View source: R/subharmonics.R

Description

Internal soundgen function.

Usage

1
2
getVocalFry(rolloff, pitch_per_gc, subFreq = 100, subDep = 100,
  throwaway = -120, shortestEpoch = 300)

Arguments

rolloff

matrix of original amplitudes of each harmonic in f0 stack returned by getRolloff (columns=time, rows=frequency bins)

pitch_per_gc

vector of the same length as ncol(rolloff)): f0 in Hz, one value per glottal cycle

subFreq

target frequency of subharmonics, Hz (lower than f0, adjusted dynamically so f0 is always a multiple of subFreq)

subDep

the width of subharmonic band, Hz. Regulates how quickly the strength of subharmonics fades as they move away from harmonics in f0 stack. Low values produce narrow sidebands, high values produce uniformly strong subharmonics

throwaway

discard harmonics and noise that are quieter than this number (in dB, defaults to -120) to save computational resources

shortestEpoch

minimum duration of each epoch with unchanging subharmonics regime, in ms

Details

Adds subharmonics to the main (f0) harmonic stack, forming sidebands.

Value

Returns a list consisting of a list of rolloff matrices (one matrix per epoch) and a dataframe of epochs.

Examples

1
2
3
4
5
6
7
8
pitch_per_gc = c(400, 500, 600, 700)
rolloff = getRolloff(pitch_per_gc, rolloff = -30)
# one epoch, two subharmonics
rolloff_subh = soundgen:::getVocalFry(rolloff, pitch_per_gc,
  subFreq = 200, subDep = 150, shortestEpoch = 100)
# three epochs with 2/3/4 subharmonics
rolloff_subh = soundgen:::getVocalFry(rolloff, pitch_per_gc,
  subFreq = 200, subDep = 150, shortestEpoch = 0)

tatters/soundgen_beta documentation built on May 14, 2019, 9 a.m.