Description Usage Arguments Details Value See Also Examples
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).
1 |
... |
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 or
constant values is the heart of making the sonification
happen and making it possible to render. But sonaes
does not check to make sure that all mappings are filled
in, since the user can add on more mappings (using
+.sonify
) interactively. However, this is
checked by checkSonify
when the object is
to be rendered.
Also, every item that is mapped to a data.frame
column in a sonify
object must also have a scale
associated with it before rendering; see
sonscaling
.
A sonaes
object, used in or added to a
sonify
object or sonlayer
.
sonify
, sonscaling
,
octToFreq
. Also, see
aes
from the ggplot2
package, which inspired this function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## 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_notes()
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_linear(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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.