playsong: Plays a song

Description Usage Arguments Details Examples

Description

A system independent way of playing a song made with makesong. If a player for Wave files hasn't been set using setWavPlayer then the function tries to autodetect an appropriate player.

Usage

1
  playsong(song)

Arguments

song

Either a character vector of class "songnotes" or a Wave object.

Details

The autodetection currently relies on xdg-mime. If this is not on the system and a valid Wave player isn't set then a warning will occur.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
song <- makesong(c("A5", "B5", "C5"))
odetojoy.song <- makesong(odetojoy, baseduration = 1/4)
furelise.song <- makesong(furelise, baseduration = 1/3)
playsong(song)
playsong(odetojoy.song)
playsong(furelise.song)

## End(Not run)

Dasonk/musicmakeR documentation built on May 6, 2019, 1:38 p.m.