dot-fade: Fade per sound

.fadeR Documentation

Fade per sound

Description

Internal soundgen function

Usage

.fade(
  audio,
  fadeIn = 1000,
  fadeOut = 1000,
  fadeIn_points = NULL,
  fadeOut_points = NULL,
  samplingRate = NULL,
  shape = c("lin", "exp", "log", "cos", "logistic", "gaussian")[1],
  steepness = 1,
  plot = FALSE,
  width = 900,
  height = 500,
  units = "px",
  res = NA,
  ...
)

Arguments

audio

a list returned by readAudio

fadeIn, fadeOut

length of segments for fading in and out, ms (0 = no fade)

fadeIn_points, fadeOut_points

length of segments for fading in and out, points (if specified, override fadeIn/fadeOut)

samplingRate

sampling rate of x (only needed if x is a numeric vector)

shape

controls the type of fade function: 'lin' = linear, 'exp' = exponential, 'log' = logarithmic, 'cos' = cosine, 'logistic' = logistic S-curve

steepness

scaling factor regulating the steepness of fading curves (except for shapes 'lin' and 'cos'): 0 = linear, >1 = steeper than default

plot

if TRUE, produces an oscillogram of the waveform after fading

width, height, units, res

graphical parameters for saving plots passed to png

...

other graphical parameters


soundgen documentation built on Sept. 12, 2024, 6:29 a.m.