Learn R Programming

music (version 0.1.2)

strings: Separate notes into vector of strings

Description

Convenience function to separate notes into vector of strings

Usage

strings(x, sep = " ")

Arguments

x

String: A single character object which consists of multiple notes separated by sep e.g. "C4 Eb4 G4 D5"

sep

String: the character that separates notes in x. Default = " "

Author

E.D. Gennatas

Details

Makes it easy to copy-paste notes into other functions e.g. playChord(strings("C4 Eb4 G4 D5"))

Examples

Run this code
strings("C4 Eb4 Gb4 Bb4")

Run the code above in your browser using DataLab