beat {drumr}R Documentation

Play a drum sound

Description

beat plays a drum beat.

Usage

beat(drum = "snare", kit = "acoustic", expr = NULL)

Arguments

drum

character string or number specifying which drum is to be played by specifying one of the built in sounds. The default is "snare". Every kit includes at least four pieces:

  1. "kick"

  2. "snare"

  3. "hihat"

  4. "crash"

If drum does not match any of the options in this list, a random sound will be played.

kit

character string specifying which kit is to be used. The default is "acoustic." Possible kits are:

  1. "acoustic"

  2. "hiphop"

  3. "electro"

  4. "beatbox"

  5. "world"

  6. "r2d2"

If kit does not match any of the options in this list, a random sound will be played.

expr

An optional expression to be executed before the sound.

Examples

# Play a "snare" sound from the "acoustic" kit
beat()

# Play a bass sound from the hiphop kit.
beat(drum="kick", kit="hiphop")


[Package drumr version 0.1.0 Index]