Learn R Programming

eseis (version 0.8.0)

aux_sonifysignal: Convert seismic signal to sound (sonification)

Description

The function converts a seismic signal to sound and saves it as a wav file.

Usage

aux_sonifysignal(
  data,
  file,
  aggregate = 1,
  amplification = 10^6,
  speed = 1,
  dt
)

Value

Sound file in wav format, written to disk.

Arguments

data

eseis object to be converted to sound file

file

Character value, file name under which the sonified signal is saved.

aggregate

Numeric value, factor by which the seismic file is aggregated before conversion. Aggregation is performed by linear interpolation.

amplification

Numeric value, amplification factor. Default is 10^6.

speed

Numeric value, factor by which sampling rate is increased to make sound sensible. The higher the speed value, the higher is the tone. Default is 1 (100 Hz seismic signal becomes 100 Hz sound signal).

dt

Numeric value, samplig rate. Only needed if data is not an eseis object.

Author

Michael Dietze

Examples

Run this code

if (FALSE) {

## load example data
data(rockfall)

## deconvolve and taper signal
s <- signal_deconvolve(data = rockfall_eseis)
s <- signal_taper(data = s, p = 0.05)

## sonify as is (barely sensible, due to too low frequency)
aux_sonifysignal(data = s, 
                 file = "~/Downloads/r1.wav")

## sonify at 20-fold speed
aux_sonifysignal(data = s, 
                 file = "~/Downloads/r1.wav", 
                 speed = 20)
}

Run the code above in your browser using DataLab