aux_sonifysignal: Convert seismic signal to sound (sonification)

View source: R/aux_sonifysignal.R

aux_sonifysignalR Documentation

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
)

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.

Value

Sound file in wav format, written to disk.

Author(s)

Michael Dietze

Examples


## Not run: 

## 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)

## End(Not run)


coffeemuggler/eseis documentation built on Aug. 19, 2023, 9:57 p.m.