sonlayer: Creating individual layers for sonify objects

Description Usage Arguments Conflicting defaults on sonlayer scalings

Description

These functions are a start on the layer functionality for sonify objects, analogous to ggplot2 layers. This creates a list object that can be included in a sonify object.

Usage

1
2
3
4
5
6
  sonlayer(shape = "notes", shape_options = NULL, stat =
  NULL, stat_params = NULL, data = NULL, mapping = NULL)

  shape_notes(...)

  shape_csound(...)

Arguments

shape

A character string representing the overall style of the audio plot (analogous to geoms from the ggplot2 package).

shape_options

Additional options specific to the shape

stat

The statistic to be calculated for the layer

stat_params

Additional parameters specific to the stat

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.

...

Layer parameters to be passed to sonlayer

Conflicting defaults on sonlayer scalings

Each shape has its own default scalings (see link{getShapeDef} to view these defaults. It's quite possible that some default scalings for a parameter differ between scalings; if this is the case, the default scaling for the earlier sonlayer type, as it appears in the $sonlayers slot of a sonify object, takes precedence.

Default scalings are, of course, ignored when they are explicitly declared; if you don't like the behavior of a default scaling you can always define your own (see sonscaling and scaleShortcuts.


playitbyr documentation built on May 2, 2019, 6:08 p.m.