playitbyr Getting Started Support--Help, Bugs, and Documentation GitHub Sonification Resources

shape_dotplot {playitbyr}R Documentation

Create a dotplot layer

Description

Creates a dotplot layer using the sound of a snare drum.

Usage

  shape_dotplot(jitter = 0, ..., data = NULL,
    mapping = NULL)

Arguments

jitter

The maximum size, in seconds, of how much to jitter time by when there are multiple notes at the same pitch and time (the sonic equivalent of overplotting). The default, 0, means no jitter occurs.

...

data, settings, and mappings to pass to sonlayer (see Details)

data

The data.frame to be sonified for this layer. If blank, the data from the parent sonify object is used.

mapping

A sonaes object.

Details

The audio dotplot creates a sense of how the distribution is spread out in time. Users are only expected to really use the time parameter for mapping, but they may want to fiddle with the other aspects of the sound for aesthetic reasons.

When more than one value appears at a given time, this shape automatically adds noise to "jitter" the values so they can be heard distinctly.

These parameters are available for setting or mapping:

time

The starting time of the snare sound (in seconds).

pitch

The pitch of the note, in the Csound oct notation notation for pitches, where 8 is middle C and 1 represents an octave, to the corresponding frequency in Hertz. By default this is scaled to the nearest musical (chromatic) pitch. (See scale_pitch_continuous.)

dur

The duration of the note (relative to the total time if relative = TRUE, in seconds otherwise).

To set a sound parameter to a value, you simply include it as an extra argument in shape_scatter; to map a parameter, you set the mapping for the layer or the sonify object using sonaes (see examples in shape_scatter).

Value

A sonlayer object that can be added onto a sonify object.

Author(s)

Originally contributed by Sam Ferguson. Csound instrument created by Hans Mikelson.

References

S. Ferguson, W. Martens and D. Cabrera, “Statistical Sonification for Exploratory Data Analysis”, in The Sonification Handbook, ed. Hermann, Hunt, Neuhoff. Available: http://sonification.de/handbook/

Examples

x <- sonify(iris[1:10,], sonaes(time = Petal.Length)) + shape_dotplot(jitter = 0.3)
## Not run: print(x)