Function: org-babel-lilypond-attempt-to-play-midi
org-babel-lilypond-attempt-to-play-midi is a byte-compiled function
defined in ob-lilypond.el.gz.
Signature
(org-babel-lilypond-attempt-to-play-midi FILE-NAME &optional TEST)
Documentation
Attempt to play the generated MIDI file.
FILE-NAME is full path to lilypond file. If TEST is non-nil, the shell command is returned and is not run.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ob-lilypond.el.gz
(defun org-babel-lilypond-attempt-to-play-midi (file-name &optional test)
"Attempt to play the generated MIDI file.
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* ((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)))
(if test
cmd-string
(start-process
"\"Audition midi\""
"*lilypond*"
org-babel-lilypond-midi-command
midi-file)))
(message "No midi file generated so can't play!")))))