leonawicz / tabr

R package: tabr. Notation-based and tidy music data analysis and transcription.
https://leonawicz.github.io/tabr/
Other
126 stars 10 forks source link

tab() with trackbind only returns two phrases #35

Closed ratnanil closed 4 years ago

ratnanil commented 4 years ago

If multiple tracks are bound together with trackbind() and then passed to tab() (via score()), only the first two phrases are printed in the sheet. Is 2 the maximum number of phrases?

library(tabr)
e1 <- p("e2","1*1", 6) %>%
  track(voice = 1)
e2 <- p("e3","1*1", 3)%>%
  track(voice = 2)
e3 <- p("e4","1*1", 1)%>%
  track(voice = 3)

trackbind(e1,e2,e3,id = rep(1,3))%>%
  score() %>%
  tab("test.pdf", midi = FALSE)

returns this:

grafik

leonawicz commented 4 years ago

You can have any number of tracks (in this context, tracks is basically equivalent to sets of staves like your pair of staves above).

But a single track like in your example only supports up to two voices. You would have to bump at least one of those three voices to its own track.

Voice IDs 1 and 2 also determine if note stems point up or down.

reference