sonaes {playitbyr} | R Documentation |
Creates a sonaes
object, which is a list
containing the desired mappings of data columns or
constants onto each sound parameter. This is intended be
added to a sonify
object (or included in its
construction).
sonaes(...)
... |
Sonic parameter mappings, specific to the shape being rendered. All arguments must be named, with the argument names sonic parameters and the values either numeric values (to set the sonic parameter to that value as a constant) or a column of the data.frame that is to be sonified (with or without quotes). |
Setting sonic parameters to data.frame
columns is
the heart of making the sonification. The sound
parameters that can be the arguments of sonaes
depend on the kinds of layers present; see
sonify
for a list of the possible kinds of
layers.
A sonaes
object, used in or added to a
sonify
object or sonlayer
.
sonify
. Also, see
aes
from the ggplot2
package, which inspired this function.
## Maps Petal.Width onto tempo, ## Sepal.Width onto pitch, ## and sets scalings ## (not terribly informative, since the order is ## arbitrary) x <- sonify(iris, sonaes(tempo=Petal.Width, pitch=Sepal.Width)) + shape_scatter() summary(x) ## Not run: x ## Quite long! ## Use a different tempo scaling than default ## to hear more of the data faster ## Not run: x + scale_tempo_continuous(c(300, 1000)) ## Map Petal.Width onto 'time' instead y <- x + sonaes(time=Petal.Width) summary(y) ## Not run: y ## Seems clipped, so increase duration ## Not run: y + sonaes(dur=4)