save_music: Save a piece of music constructed from vectors of pitch and...

Description Usage Arguments Value

View source: R/save_music.R

Description

Save a piece of music constructed from vectors of pitch and duration as a wave file.

Usage

1
2
save_music(notes_pitch = NULL, notes_duration = NULL,
  output_file = NULL, tempo = 240)

Arguments

notes_pitch

Character vector of notes using standard musical note terminology. Append # or b for sharp or 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.

output_file

Character string path to desired file location

tempo

Numeric tempo to be played in beats per minute.

Value

Saved wave file of music.


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