lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text listing output in .txt file


From: mskala
Subject: Re: Text listing output in .txt file
Date: Thu, 3 Aug 2017 07:27:09 -0500 (CDT)
User-agent: Alpine 2.20 (LNX 67 2015-01-07)

On Wed, 2 Aug 2017, Daniel SanmartĂ­n Nieto wrote:
> Is it possible to get a .txt output with a listing of text inputs written
> throughout the music file?

Does this have to be done all in Lilypond?  Because it would be trivial to
write your bits of text as comments with "%" and then extract them
into a separate file using an external utility like grep or perl.
Something like:

{
  c4 d e f |
% text 1
  g f e d |
% text 2
}

and then

grep '%' score.ly > score.txt

which would give

% text 1
% text 2

or, more elegantly because it separates out just the comment text,

perl -ne 'print "$1" if /%\s*(.*)/' score.ly > score.txt

-- 
Matthew Skala
address@hidden                 People before principles.
http://ansuz.sooke.bc.ca/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]