render.audio: Rendering sound using the audio package

Description Usage Arguments Details Value Note

Description

These functions are not intended to be called directly by the user. render is a generic that takes a sonify object and determines which method to call based on the class of the object; play_audioSample plays the resulting audioSample object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  ## S3 method for class 'audio'
 render(x, audioSample = FALSE, ...)

  audio_layer(sonlayerscore, out, samp.rate, ...)

  ## S3 method for class 'notes'
 audio_layer(sonlayerscore, out,
  samp.rate, ...)

  .createNoteAudio(noterow, samp.rate)

Arguments

x

A score object created by .getScore

...

Currently ignored.

sonlayerscore

An element of the score list–the score produced for a specific layer. The class of this determines the shape to be rendered

out

A matrix containing the rendered output of any previously rendered sonlayers, or a blank matrix large enough to contain the output of this one.

samp.rate

The sampling rate, in Hertz

noterow

A row of the data.frame returned by .getScore, spoon-fed to .createNoteAudio one by one by render.audio

Details

render.audio calls .createNoteAudio for every note in the data frame returned by .getScore. Finally, play_audioSample is called to produce sound.

Value

render.audio returns an audioSample object (from the audio package).

.createNoteAudio creates each individual note one by one for each row returned by .getNotes.

play_audioSample is called for its side effect, to produce the sound of the sonification.

Note

This file is currently under heavy development and will be changing drastically in the development version.


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