Learn R Programming

soundgen (version 2.7.0)

htmlPlots: HTML for clickable plots

Description

Internal soundgen function

Usage

htmlPlots(
  x,
  savePlots,
  changesAudio,
  suffix,
  extension = "png",
  width = "900px"
)

Arguments

x

path to a folder, one or more wav or mp3 files c('file1.wav', 'file2.mp3'), Wave object, numeric vector, or a list of Wave objects or numeric vectors

savePlots

a list of full names of files (with paths and extensions)

changesAudio

if TRUE, it means we modify the input audio, so the result shouldn't be saved in the original folder (if savePlots = '')

suffix

an extra string to add before the extension, usually the name of the function that calls htmlPlots, eg "spectrogram"

extension

file extension for the saved plots

width

the default width of flex elements in html

Details

Writes an html file for displaying clickable plots in a browser.

Examples

Run this code
if (FALSE) {
## Functions that modify audio
# relative paths
flatEnv('/home/allgoodguys/Downloads/temp', savePlots = '')
flatEnv('/home/allgoodguys/Downloads/temp',
  savePlots = '/home/allgoodguys/Downloads/temp/compr',
  saveAudio = '/home/allgoodguys/Downloads/temp/compr')

# absolute paths
flatEnv('/home/allgoodguys/Downloads/temp', savePlots = '',
  saveAudio = '/home/allgoodguys/Downloads/temp/compr')
flatEnv('/home/allgoodguys/Downloads/temp',
  savePlots = '~/Downloads/temp/plots_compr')


## Functions that only analyze audio
getRMS('/home/allgoodguys/Downloads/temp', savePlots = '')
getRMS('/home/allgoodguys/Downloads/temp',
  savePlots = '~/Downloads/temp/plots_rms')
}

Run the code above in your browser using DataLab