Outputting to stdout

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Outputting to stdout

Krystian Chachuła
Hey everybody!

Is there a way of making lilypond output the generated png to stdout? My
intention is to animate a score in a Python script.

Krystian

Reply | Threaded
Open this post in threaded view
|

Re: Outputting to stdout

David Wright
On Fri 21 Aug 2020 at 22:00:54 (+0200), Krystian Chachuła wrote:
>
> Is there a way of making lilypond output the generated png to stdout?
> My intention is to animate a score in a Python script.

The shortest way is illustrated at
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00368.html
but I haven't tested it. My own method, which uses a named pipe, is
further up the thread, but as it splits across the months, here's the link:
https://lists.gnu.org/archive/html/lilypond-user/2020-04/msg00500.html

Obviously substitute PNG for SVG.

Cheers,
David.

Reply | Threaded
Open this post in threaded view
|

Re: Outputting to stdout

csmcd

Another way to hack it on Linux:

ln -s /dev/stdout my_file.png
lilypond --png my_file.ly | my_program
rm my_file.png

Regards,
Curt

On 8/21/2020 4:02 PM, David Wright wrote:
On Fri 21 Aug 2020 at 22:00:54 (+0200), Krystian Chachuła wrote:
Is there a way of making lilypond output the generated png to stdout?
My intention is to animate a score in a Python script.
The shortest way is illustrated at
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00368.html
but I haven't tested it. My own method, which uses a named pipe, is
further up the thread, but as it splits across the months, here's the link:
https://lists.gnu.org/archive/html/lilypond-user/2020-04/msg00500.html

Obviously substitute PNG for SVG.

Cheers,
David.