Learn R Programming

seewave (version 1.7.6)

songmeter: Reading and interpreting SongMeter file name

Description

This function reads and decomposes the files names generated by SongMeters, audio digal recorders produced by the society Wildlife Acoustics.

Usage

songmeter(x)

Arguments

x
a character vector with file names, either .wac or .wav

Value

  • The function returns a data.frame with the following columns:
  • modeldevice model, either "SM2" or "SM3"
  • prefixprefix of the file, specifying for instance to recording site
  • micmicrophone information specifying if the recording is mono left channel ("monoL"), mono right ("monoR") or stereo ("stereo"). This works for SM3 only, NA for SM2
  • yearyear of recording
  • monthmonth of recording
  • dayday of recording
  • hourhour of recording
  • minminute of recording
  • secsecond of recording
  • timeall time of recording information in POSIX format
  • geological, TRUE if the device was GPS synchronized

itemize

  • PREFIX: prefix set when programming the SongMeter

item

  • XXX: microphone information
  • YYYY: year
  • MM: month
  • DD: day
  • HH: hour
  • MM: month
  • SS: minute

cr

Please note that the function does not read the content of audio file but the name of the file.

Details

The digital recorder SongMeter (either SM2 or SM3 device model) produced by the society 'Wildlife Acoustics' generates '.wav' or '.wac' files which name include useful information. Here are the character format of the files:
  • SM2:PREFIX_YYYYMMDD_HHMMSS.wav
SM3:
  • without geolocalisationPREFIX_XXX_YYYYMMDD_HHMMSS.wav
with geolocalisation PREFIX_XXX_YYYYMMDD$HHMMSS.wav

References

See Wildlife Acoustics website for details regarding the SongMeter 2 and 3: http://www.wildlifeacoustics.com/

See Also

strptime for the POSIX time format.

Examples

Run this code
file1 <- "MNHN_20141225_234500.wav"   ## SM2 file
file2 <- "CNRS_0+1_20130824_153000.wav"  # SM3 file without geolocalisation
file3 <- "PARIS_-0-_20150410$195550.wav"  # SM3 file with geolocalisation
file4 <- "MNHN_20141225_234500.txt" # not a .wav or a .wac file
file5 <- "myfile.wav"  # not a Wildlife Acoustics filename
files <- c(file1, file2, file3, file4, file5)
songmeter(files)

Run the code above in your browser using DataLab