Skip to content

Commit

Permalink
gridly: Add format-cell-file-name function (WIP)
Browse files Browse the repository at this point in the history
This is a preliminary function used to produce an alternative
file name for scores produced by \gridCompileCell.

TODO: Retrieve the number of segments in the grid and pad the
'segment' part of the file name with an appropriate number of zeroes.
(I don't know how to retrieve that number).
  • Loading branch information
uliska committed Feb 26, 2015
1 parent b90a9c2 commit 814e195
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ly/gridly/__main__.ily
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ gridGetLyrics =
'SequentialMusic
'elements lyrics))))

#(define (format-cell-file-name parser part segment)
(format "~a-~a-~a"
(ly:parser-output-name parser)
part
segment))

gridCompileCell =
#(define-void-function
(parser location part segment)
Expand Down Expand Up @@ -341,7 +347,10 @@ gridCompileCell =
(ly:book-process book
#{ \paper {} #}
#{ \layout {} #}
(ly:parser-output-name parser))
(format-cell-file-name
parser
part
segment))
#{ \setOption gridly.segment-range #cache-segment #}))))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit 814e195

Please sign in to comment.