Learn R Programming

rice (version 2.2.0)

radio: Listen to radiocarbon being measured

Description

A sonification of the amount of C14 being detected in an AMS.

Usage

radio(
  age,
  duration = 10,
  duration.unit = c(),
  is.F = FALSE,
  use.cc = FALSE,
  as.decays = FALSE,
  wght = 1,
  play = interactive(),
  as.clicks = TRUE,
  click_length = 80,
  as.tone = TRUE,
  tone.volume = 0.5,
  wobble = c(),
  sr = 44100,
  visualise = TRUE,
  cex = 0.5,
  return.sound = FALSE,
  ...
)

Value

A sound (tone and or clicks) is played and returned invisibly.

Arguments

age

The age of the sample (in C14 BP by default, or in cal BP if use.cc=FALSE).

duration

How long the sample will count (and sound) for in seconds. Defaults to 10 seconds.

duration.unit

Unit of the duration. Left empty by default (c()) which then makes seconds the unit ('s'), or if as.decays is used, days ('d'). Even if set to 'd', the sound will be played back using the seconds unit ('s').

is.F

By default, ages are assumed to be in either cal BP or 14C BP. If is.F=TRUE, age is assumed to be on the F14C scale.

use.cc

Whether or not to use the calibration curve. If set to use.cc=FALSE (the default), then we assume that the age is the radiocarbon age (this enables ages beyond the reach of the calibration curves to be used).

as.decays

Work with the C14 decays. Defaults to FALSE, which works with the number of C14 atoms instead. If set to true, you'll need larger sample sizes (wght) and longer counting times (duration) to get decent counts.

wght

The weight of the sample (in mg). Defaults to 1 mg.

play

Whether or not to play the sound

as.clicks

Make the C-14 counts sound as clicks, based on random Poisson sampling. Defaults to TRUE.

click_length

Length of the clicks. Defaults to 80, but can be altered to make the clicks sound different (larger values leave a larger 'echo')

as.tone

Make the C-14 frequency (counts per second) sound as a wave (e.g., 105 cps becomes a 105 Hz sine wave). This can either be a constant wave or be meandering (see `wobble`).

tone.volume

Volume of the tone/wave relative to that of the clicks.

wobble

Drift of the tone along the mean. Defaults to 0.00001. Increasing this value can cause the sound to change from a stable tone (low values of `wobble`) via an unstable one to noise and eventually clicks. Values outside the 0-1 range are unlikely to work as expected.

sr

Sampling rate. This audio quality defaults to 44100 (per second), which is based on the CD standard.

visualise

the counts and calculation of the C14 age. Defaults to TRUE.

cex

Size of the font. Defaults to cex=0.6.

return.sound

Return the sound as an invisible object. If set to FALSE (the default), instead returns the counts and the calculated C14 age.

...

Optional constants to be entered into the function `howmuchC14`

Author

Maarten Blaauw

Details

The sonification can be heard as 'Geiger counter-like' clicks (individual C14 atoms ending up in the detector) and/or as a possibly slightly meandering sine wave (e.g., for a sample of age 5000 14C BP, we'd count c. 105.6 atoms per second in the AMS, so this would become a tone of frequency 105.6 Hz). The calculations are based on the function howmuchC14.

Instead of counting the particles themselves (as done in an AMS), we can also count the decay events as used in radiometric counting. In this case, we need much larger samples (wght) and longer counting times (duration).

To produce and listen to the sounds, the package 'audio' (and possibly 'tuneR') has to be installed. A warning will be provided if it isn't installed. Note that the calculations in this function do not include error multipliers or corrections such as for fractionation and backgrounds.

Examples

Run this code
  radio(0)
  radio(45000)
  # decay events over 1 hour in 1 gram of carbon of age 500 14C BP:
  radio(500, as.decays=TRUE, wght=1000, duration=1/24) 

Run the code above in your browser using DataLab