From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GAc0OTRDKWHlVAEAgWs5BA (envelope-from ) for ; Fri, 27 Aug 2021 21:55:32 +0200 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UO+LNDRDKWGTQAAAbx9fmQ (envelope-from ) for ; Fri, 27 Aug 2021 19:55:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id 576A04D02 for ; Fri, 27 Aug 2021 21:55:32 +0200 (CEST) Received: from localhost ([::1]:45660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJhwp-0003bd-Dd for larch@yhetil.org; Fri, 27 Aug 2021 15:55:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJhvr-0003U1-3K for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 15:54:32 -0400 Received: from ciao.gmane.io ([116.202.254.214]:43216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJhvo-0000wm-U4 for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 15:54:30 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mJhvk-000AI7-Dx for emacs-orgmode@gnu.org; Fri, 27 Aug 2021 21:54:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Nick Dokos Subject: Re: ob-lilypond.el doesn't generate midi files Date: Fri, 27 Aug 2021 15:54:14 -0400 Message-ID: <87tujall3t.fsf@alphaville.usersys.redhat.com> References: <87zgt4tlcy.fsf@autistici.org> <87ilzsm1d9.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:AVOlA1JQykTNLapiGxfyV+5MwDE= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630094132; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gS8kxbkn1SEFOReeDIxjddK2kybVvlYQmW0O/YdaOfQ=; b=uD7zYBhlv7jXgoa/zueIV5fSzQ1q1m4WlLCd6sEzxEFvFtYEzgRW0m0l4vvMHyhGMiUuZj SF1A/eeuKqC2eFDAaFRPx2WNMZexgqCfR33gSLMryaZqJYmknrxmDG30TiALR23eY9PP8/ SZVqaArdHcHoLXDHOt3ubPQsf3LsaWVdFmUhNoeVCCN1xKn54qutFu/a32dEC3JWUFQomy 87L4C9Df1CgUsATPwzco/r/Lw738DyPkYdgnfGihpG93nMgUtan+Ee0mNtjDQtoX4ZsxcF aWX4jonfIHBv2OgFPgvQlw/7FGHgXg9Te9H1LCqhnftL41eI3hB40dm7XypxaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630094132; a=rsa-sha256; cv=none; b=Cy5GVyZ6Fir4SVHvyUjOE9wkAmGb59bB7ijpLb3AataNpfpxAFq4VFwHLsmZ8M3K2+qmq4 eDSpkvZ8NJdgAO636GTpqAncVuLsbWTVNoeW5rL3PDF9i5grmgynsrZfgVOLXjJ4NZeFBm /LP/T4uCvwHCrf9cdMzEt5Om13N/mFFbz2sGWpr3Z/V2Gtc7uBe9Iu1A/h/FXmq0SCH3Ex tHvEYIq3SUGvQskUqtjZeUDtDzDJiaRxWnR37S6DN5tebux480g6yPtMOCGsuT994Be6cg N1bddajKnnwd8BcsozLvThTMtY9Dm5Zepw8AVhmSA2gYZkUHMnhSpFhwuuAaaQ== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.83 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 576A04D02 X-Spam-Score: -1.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9yalP/6r4zUd Michael Maurer writes: > On Thu, 26 Aug 2021 at 21:54, Nick Dokos wrote: >> >> Michael Maurer writes: >> >> > On Thu, 26 Aug 2021 at 15:03, Jonathan Gregory 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