From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: ob-lilypond Date: Mon, 27 Jun 2011 13:00:17 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbBQa-0001jq-3j for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 09:00:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbBQY-00078l-AL for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 09:00:36 -0400 Received: from lo.gmane.org ([80.91.229.12]:48890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbBQX-00078S-Ut for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 09:00:34 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QbBQV-0002ZK-Jp for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 15:00:31 +0200 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Jun 2011 15:00:31 +0200 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Jun 2011 15:00:31 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi This is an invitation to try / test ob-lilypond - enabling LilyPond Score Generation / Arrangement from within org-mode. Available on Github at https://github.com/mjago/ob-lilypond This is a beta release, but includes examples, instructions, and tests, and has been tested on OSX and nix. Any further testing would be helpful. Following is the readme.org file which is rendered correctly on Github... ---> * Emacs Org Babel LilyPond Mode ** Purpose Allow LilyPond Score Generation to take place within Emacs Org-mode using literate programming principles. ** Examples Several examples are included *** Misty (Jazz Standard utilising org-mode to organise voice and other data) - Here is an example Org LilyPond File]] exported as HTML - Resultant Score exported in pdf format - Generated Score export of individual Pages (png) *** Modal Cycles (Utilises org-babel and noweb to generate notes) - Generated Score - Generated Midi File *** Modal Cycles 2 (Utilises org-babel and noweb to generate notes) - Generated Score - Generated Midi File *** Modes in the Key of C (another example of polyglot lilypond programming) - Generated Score Generated MIDI File ** Features - Optional Automated LilyPond Compilation following the "Tangling" of a "Literate Org LilyPond" file - Optional Automated display of resultant Musical Score following compilation - Optional Automated playing of the resultant MIDI file following compilation - Highlights syntax errors in Org file following a failed compilation - Integrates with LilyPond-Mode - Cross-Platform (OSX, nix, win32) ** Usage *** Compiling lilypond source Hitting 'C-c C-c' within a lilypond block initiates ly-tangle (tangling of all lilypond blocks). Depending on the feature settings, ob-lilypond will then either display a pdf of the score, play the generated midi file, both, or neither. 'M-x ly-tangle' can also be called from anywhere in the file and can be tied to a function key with something like... #+begin_src emacs-lisp (global-set-key [f8] 'ly-dev-tangle) #+end_src *** Commands Some commands are included to quickly disable certain post-tangle activities... - ly-toggle-midi-play (toggle whether midi will be played following a successful compilation) - ly-toggle-pdf-display (toggle whether pdf will be displayed following a successful compilation) NOTE:- If using Timidity for midi playback, kill the midi stream with C-g in Emacs ** Setup (add to emacs init file) *** Cloning ob-lilypond The Files need to be downloaded to your relevant dotfiles directory... #+BEGIN_SRC sh git clone https://github.com/mjago/ob-lilypond.git ob-lilypond #+END_SRC *** Emacs Initialisation file setup Require library... #+BEGIN_SRC emacs-lisp (add-to-list 'load-path (concat dotfiles-dir "ob-lilypond/lib")) (require 'ob-lilypond) #+END_SRC Add lilypond to your list of babel languages... #+BEGIN_SRC emacs-lisp (org-babel-do-load-languages 'org-babel-load-languages '((ruby . t) (C . t) (emacs-lisp . t) (sh t) (dot t) (clojure t) (ditaa t) (lilypond t) )) #+END_SRC ** Requirements *** Mac OS X - [[http://lilypond.org/][Lilypond]] can be obtained [[http://lilypond.org/][here]] *** nix - Lilypond is available here or via the the package manager - For MIDI, [[http://timidity.sourceforge.net/][Timidity]] is available [[http://timidity.sourceforge.net/][here]] or via the package manager - For PDF, [[http://live.gnome.org/Evince/Downloads][Evince]] is available [[http://live.gnome.org/Evince/Downloads][here]] or via package manager *** Win32 - Currently untested ** Testing Tests are provided and can be run by opening test/ob-lilypond-tests.org and running the following commands... - M-x eval-buffer (within ob-lilypond-tests.org - M-x ert (t) Tests are run automatically on source/test file save if ly-project (below) has been executed ** Development Included also is dev/ob-lilypond.org which includes various helper commands used for development, and the development todo list - ly-project (code block - evaluate with C-c C-c and execute M-x ly-project) - load appropriate files - set up windows - setup project development environment - add continuous testing post-save hook - map F4 to switch between src or test files to control file (dev/ob-lilypond.org) - map F8 to 'ly-dev-tangle (tangle test/test-build/test.org file from anywhere) - Remove post-save-hook code block - Development todo list <--- Regards Martyn