Hope you won’t mind me hopping in here a little late because this sounds 
similar to a project that I was using lilypond for. My workaround is, as you 
know, spinning up a temporary directory for the output and all the extra eps 
files, run lilypond, read the output file into program memory, delete the 
temporary directory, then serve over http via the buffer in memory. 

So to answer your question, there is no way to pipe output from lilypond, but 
the IO overhead even if you’re using something like a cloud provider HDD is 
very minimal compared to how long lilypond takes to render the output (more 
time would be saved by utilizing virtual host caching for the results, for 
example)

Felix, I’m curious what you mean by cropping the file. Sounds to me like you 
are trying to just write a small snippet of music, maybe a few measures, and 
not have the output flooded by whitespace all around the size of an A4 paper? 
This is also similar to what I was using lilypond for and there are ways to do 
this without any external apps. 

Thanks,
-William

Sent from my iPhone

> On Jul 15, 2022, at 15:17, DoubleFelix <doublef3...@gmail.com> wrote:
> 
> 
> Hello,
> 
> I'm using lilypond to programmatically generate sheet music. I already have a 
> system in place to crop the SVGs, but now I need to load them in my software. 
> I could use the default behavior of letting lilypond write to some file, and 
> then reading it, but file I/O tends to be pretty expensive, especially when 
> you're doing it in bulk like I am, so I'd like to avoid that.
> 
> My question is this: Is there a way to get lilypond to write the output to 
> stdout to save on performance, or do I need to use a file as a middleman? For 
> reference, my current command is:
> "lilypond --svg --loglevel=none file.ly"
> 
> Thanks,
> Felix

Reply via email to