internaldf: Internal functions to generate output 'data.frame' from a...

Description Usage Arguments Value Not yet implemented Note

Description

These functions, together, are used to generate a standardized data.frame, rather like a Csound score, that is then used by whatever method renders the sounds (currently only rendering in R as sine waves is supported).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
  .getScore(x)

  .getSonlayerScore(x, sonlayernum)

  .getSonlayerMappings(x, sonlayernum, remove.null = TRUE)

  .getSonlayerData(x, sonlayernum, transform = TRUE)

  .getSonlayerStat(x, sonlayernum)

  .getSonlayerShape(x, sonlayernum)

  .rescaleDataByParam(x, param, column)

  .getDefaultScalingByParam(param, shapes)

  .getDefaultShapeOptions(shapename)

  .getSonlayerShapeOptions(x, sonlayernum)

  scorePreprocessor(sonlayerscore)

Arguments

x

A sonify object

sonlayernum

The layer number of the sonify object. This is a placeholder for future implementation of a layering functionality (modeled after ggplot2 objects).

remove.null

Logical indicating whether to remove missing mappings from the returned list of mappings. .getSonlayerScore calls this with TRUE to avoid cluttering calculations; but checkSonify calls this with FALSE since it bases its approach on having the null slots in.

transform

A logical indicating whether to perform the given statistical transformation (stat) to the layer.

param

The sound parameter

column

The data.frame column (vector) to be rescaled

shapes

A character vector of names of shapes included in the sonify object

shapename

The name of the shape to get the defaults for

sonlayerscore

The score generated for a specific sonlayer by .getSonlayerScore()

Value

The end product of all this is a data.frame object that is used as an input to the rendering process

Not yet implemented

.getStat currently just returns NULL. It is intended that it will eventually return a function that .getSonlayerData can use to transform a data.frame, or NULL if no tranformation is requested. This function (and its only call in .getSonlayerData) will likely change soon.

Note

These functions (particularly .getSonlayerScore) assume that every shape has a single output row for each input data row after applying statistical tranformations

all scorePreprocessor methods must calculate length of sonification and return that as an attribute length of the data frame.


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