Learn R Programming

seewave (version 1.3)

export: Export sound data

Description

Export sound data as a text file that can be read by a wave player like 'Goldwave')

Usage

export(wave, f,
file = paste(as.character(deparse(substitute(wave))),".txt",sep=""),
...)

Arguments

wave
data describing the time wave to be exported.
f
sampling frequency of wave.
file
name of the new file
...
other write.table parameters.

Details

Creates a new text file with a header describing the main features of the sound (wave). For instance, for a 2 s sound with a sampling frequency of 8000 Hz, the header will be: [ASCII 8000Hz, Channels: 1, Samples: 160000, Flags: 0]. This type of file can be read by wave players like Goldwave (http://www.goldwave.com/).

Examples

Run this code
a<-synth(f=8000,d=2,cf=2000,plot=FALSE)
export(a,f=8000)

Run the code above in your browser using DataLab