# NOT RUN {
x <- "a# b_ c, d'' e3 g_4 A m c2e_2g2 cegh" # includes invalid syntax
data.frame(
x = strsplit(x, " ")[[1]],
note = is_note(x),
chord = is_chord(x),
either = noteworthy(x))
is_diatonic("ace ac#e d e_", "c")
x <- "a# b_ c,~ c, d'' e3 g_4 c2e_2g2"
noteworthy(x) # is it noteworthy; a validity check for any string
x <- as_noteworthy(x) # coerce to 'noteworthy' class, conform formatting
is_noteworthy(x) # check for 'noteworthy' class
x
summary(x)
x <- as_noteworthy(x, format = "vector", octaves = "integer",
accidentals = "flat")
x
summary(x)
# }
Run the code above in your browser using DataLab