On Tue, 2023-12-12 at 14:46 -0800, Stefano Antonelli wrote:
> #(define (add-midi-to-score score)
>(define (has-midi? score)
> (any (lambda (x) (ly:output-def-lookup x 'is-midi))
> (ly:score-output-defs score)))
>(if (has-midi? score) score
> #{ \score { $score \midi {}
On 2023-12-12 11:26, Werner LEMBERG
wrote:
One thing occurred to me. If the original \score did not have a
\midi block, would it be possible to ask lilypond to produce midi
output without modifying the input file?
On Tue, 2023-12-12 at 12:40 -0800, Aaron Hill wrote:
> Any better?
>
>
> #(define (add-midi-to-score score)
>(define (has-midi? score)
> (any (lambda (x) (ly:output-def-lookup x 'is-midi))
> (ly:score-output-defs score)))
>(if (has-midi? score) score
> #{ \score {
Aaron Hill writes:
> On 2023-12-12 1:04 pm, David Kastrup wrote:
>> Aaron Hill writes:
>>>
>>> #(define (add-midi-to-score score)
>>> (define (has-midi? score)
>>> (any (lambda (x) (ly:output-def-lookup x 'is-midi))
>> Wouldn't that need to be (ly:output-def-lookup x 'is-midi #f) ?
>
On 2023-12-12 1:04 pm, David Kastrup wrote:
Aaron Hill writes:
#(define (add-midi-to-score score)
(define (has-midi? score)
(any (lambda (x) (ly:output-def-lookup x 'is-midi))
Wouldn't that need to be (ly:output-def-lookup x 'is-midi #f) ?
The default is to return '() which I
Aaron Hill writes:
> On 2023-12-12 12:06 pm, Stefano Antonelli wrote:
>> On Tue, 2023-12-12 at 02:31 -0800, Aaron Hill wrote:
>>> Would this not work?
>>>
>>> #(define (add-midi-to-score score)
>>>#{ \score { $score \midi {} } #})
>>> toplevel-score-handler =
>>> #(lambda (score)
>>>
On 2023-12-12 12:06 pm, Stefano Antonelli wrote:
On Tue, 2023-12-12 at 02:31 -0800, Aaron Hill wrote:
Would this not work?
#(define (add-midi-to-score score)
#{ \score { $score \midi {} } #})
toplevel-score-handler =
#(lambda (score)
(collect-scores-for-book (add-midi-to-score
On Tue, 2023-12-12 at 02:31 -0800, Aaron Hill wrote:
> Would this not work?
>
>
> #(define (add-midi-to-score score)
>#{ \score { $score \midi {} } #})
>
> toplevel-score-handler =
> #(lambda (score)
>(collect-scores-for-book (add-midi-to-score score)))
>
Indeed it does!
On Tue, 2023-12-12 at 11:00 +0100, Jean Abou Samra wrote:
> > cat first.ly second.ly third.ly > out.ly
> > lilypond out.ly
> > But it's not portable. I'd have to do the equivalent in python if
> > there's no way to do it with lilypond.
>
> Not sure I understand the need, why do you need to
On 2023-12-12 2:01 am, Jean Abou Samra wrote:
One thing occurred to me. If the original \score did not have a \midi
block, would it be possible to ask lilypond to produce midi output
without modifying the input file?
No, this is not currently possible, although it would be a nice
addition.
>> One thing occurred to me. If the original \score did not have a
>> \midi block, would it be possible to ask lilypond to produce midi
>> output without modifying the input file?
>
> No, this is not currently possible, although it would be a nice
> addition.
Stefano, please file an issue for
> One thing occurred to me. If the original \score did not have a \midi
> block, would it be possible to ask lilypond to produce midi output
> without modifying the input file?
No, this is not currently possible, although it would be a nice addition.
signature.asc
Description: This is a
> If I can find a way to append to the input file, I can probably get rid
> of that scraping/parsing code completely. I came across -dread-file-
> list. If I understand I would need to create a file:
>
> ```
> $ cat list-of-files.txt
> first.ly
> song.ly
> last.ly
> ```
>
> And then
>
> ```
>
On Mon, 2023-12-11 at 17:22 +0100, Jean Abou Samra wrote:
> ly2video or not, you need to unfold repeats as soon as you want
> correct MIDI output. I agree that requiring to do it explicitly is
> not very user-friendly, but auto-adding \unfoldRepeats sounds like
> solving the problem at the wrong
On Mon, 2023-12-11 at 19:41 +0100, Jean Abou Samra wrote:
> Put
>
> break = {}
> pageBreak = {}
> in the -dinclude-settings file?
Wow. That's deceptively simple!
> You can put
>
> #(set! toplevel-music-functions (cons unfoldRepeats toplevel-music-
> functions))
> in -dinclude-settings.
This
> There is a case where I want to create a narrower page for a narrower
> screen. I can easily append a /paper {} block to the original file to
> do this. However, any manual breaks will probably not work at this
> newer width. How would you recommend dealing with this?
Put
```
break = {}
On Mon, 2023-12-11 at 17:22 +0100, Jean Abou Samra wrote:
> > We need a copy so we can introduce the space time dumper code which
> > boils down to a simple /include statement at the very top of the
> > file.
>
> You can do that via the -dinclude-settings option instead.
Good to know, thanks.
>
On Mon, 2023-12-11 at 03:49 -0800, Aaron Hill wrote:
> Why should ly2video need any such smarts at all? Since there are
> myriad
> ways an end user can structure their input files, let LilyPond do its
> job and have ly2video ask it for all the information needed. It
> sounds
> like ly2video is
> We need a copy so we can introduce the space time dumper code which
> boils down to a simple /include statement at the very top of the file.
You can do that via the `-dinclude-settings` option instead.
> It looks like ly2video also removes any \break, \noBreak, and
> \pageBreak it finds in
On 2023-12-10 9:33 pm, Stefano Antonelli wrote:
On Sun, 2023-12-10 at 08:46 -0500, Michael Werner wrote:
I'm not at all familiar with ly2video, so I really have no idea if
this'll be directly useful to you. But for getting the headers from
an included file, this is how I do it with nearly all
On Sun, 2023-12-10 at 08:46 -0500, Michael Werner wrote:
> And then I would have anotherFile.ly containing something like:
>
> \include "song.ly"
>
> \book {
> \myHeaders
> \score {
> \theMusic
> }
> }
Thanks for the suggestion Michael. I like that idea, but it doesn't
help with the
On Sun, 2023-12-10 at 10:56 +0100, Jean Abou Samra wrote:
> It would be better for ly2video not to modify the input file.
Technically, it modifies a copy of the input file. The scraping is
clunky and I don't like it though it seems necessary. The idea, I
suppose, is to make it easy for the
Hi Stef,
On Sat, Dec 9, 2023 at 11:07 PM Stefano Antonelli <
santone...@algosolutions.com> wrote:
> Any other options for getting the header block from an included file?
>
I don't know if this'll be directly usable in your use case, but I do
something like this with most of the music I
> I know I can run lilypond on song.ly and it will implicitly wrap it in
> a \score block, but is that contained in an intermediate file somewhere
> I can get access to?
No, there is no such file. The implicit wrapping happens at the level of
LilyPond's data structures, it's not a textual macro
Hello list,
The issue I'm facing is that I might have a song.ly that contains:
\header {
% author and stuff
}
\theMusic = new DrumStaff {
% the music
}
ly2video can't work with this file. It needs to see a \score block so
it can add unfold repeats, layout, and midi. ly2video actually
Anthony W. Youngman [EMAIL PROTECTED] writes:
[...] I can convert from midi to lily, and then I'd like
to be able to put a \transpose in there, convert from lily
to lily, and have the resulting output in concert pitch
(or octaves thereof).
Check the lyqi Emacs mode:
In message [EMAIL PROTECTED], Erik Sandberg
[EMAIL PROTECTED] writes
Since this intermediate file is a valid Lilypond file, an intermediate
pass can perform some kind of transformation
on it before passing it back to Lilypond for actual processing.
Is this reasonable ? or is Lilypond's internal
Citerar Darius Blasband [EMAIL PROTECTED]:
Hi,
I think it might be a good idea for Lilypond to provide a facility
which, based on an input file, provides
a normalized intermediate file which is itself a valid Lilypond file,
with exactly the same semantics as the
original one, but where
28 matches
Mail list logo