time <- "8*3 16 4.. 16 16 2 2 4. 8 4 4 8*4 1"
x <- string_unfold(time)
x
string_fold(x) == time
notes <- "a, b, c d e f g# a r ac'e' a c' e' c' r r r a"
x <- string_fold(notes)
x
string_unfold(x) == notes
Run the code above in your browser using DataLab