From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +EuqAhURLWH8dAAAgWs5BA (envelope-from ) for ; Mon, 30 Aug 2021 19:10:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id INXGORQRLWGSJgAAbx9fmQ (envelope-from ) for ; Mon, 30 Aug 2021 17:10:44 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 59584AB8 for ; Mon, 30 Aug 2021 19:10:44 +0200 (CEST) Received: from localhost ([::1]:40750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKkny-0000SM-AO for larch@yhetil.org; Mon, 30 Aug 2021 13:10:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKklg-0000QW-3O for emacs-orgmode@gnu.org; Mon, 30 Aug 2021 13:08:20 -0400 Received: from confino.investici.org ([212.103.72.250]:45023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKkld-0008Jq-Fh for emacs-orgmode@gnu.org; Mon, 30 Aug 2021 13:08:19 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4GyxbJ4lNxz10st for ; Mon, 30 Aug 2021 17:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1630343276; bh=NBI0QeR7wUNwZiaSBbirMlNm5vFl39Vj5cKNliJjDh0=; h=References:From:To:Subject:Date:In-reply-to:From; b=DB46H1JtRzAq89cPbgQcf4OuiRajRYPGFN7lUClNTt5TjTEUwJr5ZqkJ/lzklZCKB xmaRKhROhWBAzQlP14heprYTMPZq/CLHkyGAVxYv6lAA5+/iCkOvRgW8vBduQ/YoMG 1zE5G07HtupgS/6xWr+KCBRCrjzym7IjcenHVTio= Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: jgregory@autistici.org) by localhost (Postfix) with ESMTPSA id 4GyxbH61PMz10hk for ; Mon, 30 Aug 2021 17:07:55 +0000 (UTC) References: <87zgt4tlcy.fsf@autistici.org> <87ilzsm1d9.fsf@alphaville.usersys.redhat.com> <87tujall3t.fsf@alphaville.usersys.redhat.com> <87tuj9u3cs.fsf@autistici.org> User-agent: mu4e 1.5.11; emacs 27.1 From: Jonathan Gregory To: emacs-orgmode@gnu.org Subject: Re: ob-lilypond.el doesn't generate midi files Date: Mon, 30 Aug 2021 14:02:42 -0300 In-reply-to: Message-ID: <87y28i3lp5.fsf@autistici.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=212.103.72.250; envelope-from=jgrg@autistici.org; helo=confino.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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=1630343444; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NBI0QeR7wUNwZiaSBbirMlNm5vFl39Vj5cKNliJjDh0=; b=l8hqDsP9L02gnx5sfpp+eNH4/aexgZdPTWYA8wAMb50erXcFRUTbdO1zjldoCCdk6wuJ76 rYV8p+pLFcXWa7fpr3s2sZj7Z4eGxXEtkat+LtDSLyTHkD7nWbVemtzmecUw5CqrX+OnuS N1RgL1+bx5kZBzUDI2bgil6EbaG+MJ2yk9kC0kMxMgxdX/GeVnrE0ueSt/UFNBu8S/Z7my sll0hu/VJjKvmosbqrG7SvzAIAEdGYd6Ch0SoHaUnjp8/fnMyTZprZigcOZQxyC44eRtik TL3r7VPNv8j2c6aKTo3MTF30WP+TN17k8YpwyOHQ4T3yvvP9PEnytiacvhj0nw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630343444; a=rsa-sha256; cv=none; b=URAsOD30IM0iBRQma+X2mzTh4yRkYqUL13r0dIXEws36f0WKU9HeuQ/1/DKs03ig1vNjA9 K9/J/shjoTZvJiKUZbWucFx+GSoU5raCYTh24Bzy0Qrv+ItDcPCzg/7T1WqYqrqsASKptL B3U7PWQy9XocfzlLQuKQVSSYMmbh6Wp8Z94AmTfiCG9k4KX8/OzEKlFhYCjqY4NujpBV/0 YMfMlmPl5pQl3xpUUPUh4sqwyYAa/2fmy7l+3eIVK90rncBakasyW/XxYrGncv3LxXQxeF mJgudFoT2++cyb77/FoEuTf0snXYHNJy7yTqoXfF05HPuJmj+rEXSFDD7y5esA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=autistici.org header.s=stigmate header.b=DB46H1Jt; spf=pass (aspmx1.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: -2.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=autistici.org header.s=stigmate header.b=DB46H1Jt; dmarc=none; spf=pass (aspmx1.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: 59584AB8 X-Spam-Score: -2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: Of1x/FvzbPBv --=-=-= Content-Type: text/plain; format=flowed Hi On 29 Aug 2021, Michael Maurer wrote: > Yep, that's it. Modified ob-lilypond.el and recompiled it. > Timidity works as helper, couldn't get vlc to work. Maybe the > file ending should be modifiable via org-babel-lilypond-commands > as well, or make ob-lilypond.el look for *.mid or *.midi. I'm > pretty confident *.mid is the default setting for lilypond on > win, and not my doing. I attached a patch to use a different suffix on Windows. Thanks for your help. -- Jonathan --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Set-the-MIDI-file-extension-conditionally.patch >From 1929b8082b9cff2a4bd99c573b2a2bd50b76b184 Mon Sep 17 00:00:00 2001 From: Jonathan Gregory Date: Mon, 30 Aug 2021 13:49:48 -0300 Subject: [PATCH] Set the MIDI file extension conditionally * lisp/ob-lilypond.el (org-babel-lilypond-attempt-to-play-midi): By default, LilyPond outputs .mid files for Windows and .midi for everything else. See: TINYCHANGE --- lisp/ob-lilypond.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index eae1779ce..e197ea7a6 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -337,7 +337,9 @@ If TEST is non-nil, the shell command is returned and is not run." FILE-NAME is full path to lilypond file. If TEST is non-nil, the shell command is returned and is not run." (when org-babel-lilypond-play-midi-post-tangle - (let ((midi-file (org-babel-lilypond-switch-extension file-name ".midi"))) + (let* ((ext (if (eq system-type 'windows-nt) + ".mid" ".midi")) + (midi-file (org-babel-lilypond-switch-extension file-name ext))) (if (file-exists-p midi-file) (let ((cmd-string (concat org-babel-lilypond-midi-command " " midi-file))) -- 2.25.1 --=-=-=--