aspiers / ly2video

generating videos from LilyPond projects
GNU General Public License v3.0
150 stars 22 forks source link

Didn't find any notes with \TabStaff #123

Closed iostapyshyn closed 3 weeks ago

iostapyshyn commented 4 weeks ago

I am trying to use ly2video to generate a video with a guitar tab, but it fails with the following error message:

ERROR: Didn't find any notes; something must have gone wrong with the use of dump-spacetime-info.

Here's the minimal reproducible example:

\score {
  \new TabStaff {
    c d e f g a b c'
  }
  \layout { }
  \midi {}
}

I am trying to process it with $ ly2video -i example.ly, with LilyPond 2.24.3 (running Guile 3.0). Is there something I'm missing?

iostapyshyn commented 4 weeks ago

The diff below seems to fix the issue. What do you think, @aspiers?

diff --git a/ly2video/cli.py b/ly2video/cli.py
index 3795c06..31ee443 100755
--- a/ly2video/cli.py
+++ b/ly2video/cli.py
@@ -1390,6 +1390,14 @@ def writeSpaceTimeDumper():
     \DrumStaff
     \override BarLine.after-line-breaking = #dump-spacetime-info-barline
   }
+  \context {
+    \TabVoice
+    \override TabNoteHead.after-line-breaking = #dump-spacetime-info
+  }
+  \context {
+    \TabStaff
+    \override BarLine.after-line-breaking = #dump-spacetime-info-barline
+  }
   \context {
     \Voice
     \override NoteHead.after-line-breaking = #dump-spacetime-info