writeAudio: Write audio

View source: R/io.R

writeAudioR Documentation

Write audio

Description

Internal soundgen function.

Usage

writeAudio(x, audio, filename, scale_used = NULL)

Arguments

x

numeric vector

audio

list returned by readAudio containing samplingRate, bit, scale, scale_used

filename

full path and filename including .wav

scale_used

actually used scale (max(abs(x))) - overrides audio$scale_used

Details

Writes a .wav file to disk based on the bit/scale/samplingRate contained in the internally generated audio object. The point with using this function is to package tuneR::Wave + normalize + writeWave in a soundgen-specific way. Unlike seewave::savewav, writeAudio does NOT normalize or rescale the input.


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