play_music: Play a piece of music constructed from vectors of pitch and...

Description Usage Arguments Value

View source: R/play_music.R

Description

Play a piece of music constructed from vectors of pitch and duration

Usage

1
play_music(notes_pitch = NULL, notes_duration = NULL, tempo = 240)

Arguments

notes_pitch

Character vector of notes using standard musical note terminology. Append # or b for sharp of flat semitones. Default octave is octave 4 on a piano keyboard. Append octave number for lower or higher octaves.

notes_duration

Numeric vector of corresponding note durations in beats. Must be same length as notes_pitch.

tempo

Numeric tempo to be played in beats per minute.

Value

Music played in R console.


keithmcnulty/Rmusic documentation built on Dec. 17, 2019, 12:14 a.m.