[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ob-lilypond.el doesn't generate midi files
From: |
Nick Dokos |
Subject: |
Re: ob-lilypond.el doesn't generate midi files |
Date: |
Fri, 27 Aug 2021 15:54:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Michael Maurer <maurer.michael@gmail.com> writes:
> On Thu, 26 Aug 2021 at 21:54, Nick Dokos <ndokos@gmail.com> wrote:
>>
>> Michael Maurer <maurer.michael@gmail.com> writes:
>>
>> > On Thu, 26 Aug 2021 at 15:03, Jonathan Gregory <jgrg@autistici.org> wrote:
>> >>
>> >> Hi
>> >>
>> >> On 26 Aug 2021, Michael Maurer wrote:
>> >>
>> >> > I've installed lilypond and customized ob-lilypond to use the
>> >> > appropriate helper programs, but although it generates & shows
>> >> > pdfs just fine, generating a midi file it does not. I execute
>> >> > tangle on the codeblock, and all I get is "No midi file
>> >> > generated so can't play!". org-version 9.4.6 emacs 27.2 Win 10
>> >>
>> >> Can you also send a MWE of the code you're using to generate the
>> >> score?
>> >>
>> >
>> > I used a test file I copied over from Frescobaldi
>> >
>> > #+begin_src lilypond :file test.pdf
>> > \version "2.18.2"
>> > \score {
>> > \drums {
>> > \time 2/4
>> > sn16 sn8 sn16 sn8 sn8:32 ~
>> > sn8 sn8 sn4:32 ~
>> > sn4 sn8 sn16 sn16
>> > sn4 r4
>> > }
>> > \layout { }
>> > \midi { }
>> > }
>> > #+end_src
>> >
>> > In Frescobaldi this gets me both midi-output and pdf. In Emacs with
>> > org it does say "Midi output to test.midi", but then there's that "no
>> > midi file generated" message.
>> >
>>
>> What happens if you save the contents of the source block into a file
>> and run lilypond on the file from the command line?
>>
>
> Both pdf and midi files get generated. Btw, ob-lilypond does generate
> the midi file as well, it just doesn't want to play it/recognize it.
> Maybe it's related to what helper app I've configured to open it? (but
> why that doesn't make sense, it's vlc btw).
>
>
Oh, I thought that it did not generate a midi file at all. So you are
saying that the midi file *is* produced and you *can* play it from the
command line with vlc, correct?
If that's the case, check the value of the variable
`org-babel-lilypond-midi-command' and see what happens when you invoke
that command on the midi file. In my case, the command is `xdg-open'
(I'm using Gnome on Fedora 33) and it opens Banshee to play it which
fails because of missing codecs. I installed the missing codecs and
`xdg-open foo.midi' sends the file to Banshee which can play it fine.
Also check if `org-babel-lilypond-arrange-mode' is t or nil: behavior
is very different depending on that.
Final thought: `xdg-open' starts whatever app it is supposed to run
in the background and returns immediately. That may cause problems with
babel. I still don't get anything when processing the file in babel.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
- ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/26
- Re: ob-lilypond.el doesn't generate midi files, Jonathan Gregory, 2021/08/26
- Re: ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/26
- Re: ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/26
- Re: ob-lilypond.el doesn't generate midi files, Nick Dokos, 2021/08/26
- Re: ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/27
- Re: ob-lilypond.el doesn't generate midi files,
Nick Dokos <=
- Re: ob-lilypond.el doesn't generate midi files, Maxim Nikulin, 2021/08/28
- Re: ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/28
- Re: ob-lilypond.el doesn't generate midi files, Jonathan Gregory, 2021/08/28
- Re: ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/28
- Re: ob-lilypond.el doesn't generate midi files, Michael Maurer, 2021/08/29
- Re: ob-lilypond.el doesn't generate midi files, Jonathan Gregory, 2021/08/30