Re: [O] ob-lilypond and 'Symbol’s function definition is void: org-babel-get-header'

2018-09-02 Thread Henrik Frisk
Den tis 21 aug. 2018 23:39Nicolas Goaziou  skrev:

> Hello,
>
> Henrik Frisk  writes:
>
> > I have been trying out ob-lilypond and it works really well, except for
> the
> > arrange mode. Any attempt to run ly-tangle results in 'Symbol’s function
> > definition is void: org-babel-get-header' and so does an attempt to
> export
> > a file, such as the example file, in basic mode to html for instance.
> >
> > I was thinking it was related to sh/shell since this appears to be a
> common
> > issue with regard to this error, but the ob-lilypond does not appear to
> use
> > any reference to sh (the doc for ob-lilypond does). I also tried to load
> > ob-core as was suggested in some post but that didn't work either.
> >
> > Other tangle other languages works fine.
> >
> > Any suggestions?
>
> `org-babel-get-header' was removed in Org 9.0 and current ob-lilypond.el
> doesn't call this function. My guess is you are mixing a new Org release
> with an old "ob-lilypond.el".
>

Sorry for not replying earlier, I missed this message. Thanks, that points
me in a useful direction I think!

Best,
Henrik

>


Re: [O] ob-lilypond and 'Symbol’s function definition is void: org-babel-get-header'

2018-08-21 Thread Nicolas Goaziou
Hello,

Henrik Frisk  writes:

> I have been trying out ob-lilypond and it works really well, except for the
> arrange mode. Any attempt to run ly-tangle results in 'Symbol’s function
> definition is void: org-babel-get-header' and so does an attempt to export
> a file, such as the example file, in basic mode to html for instance.
>
> I was thinking it was related to sh/shell since this appears to be a common
> issue with regard to this error, but the ob-lilypond does not appear to use
> any reference to sh (the doc for ob-lilypond does). I also tried to load
> ob-core as was suggested in some post but that didn't work either.
>
> Other tangle other languages works fine.
>
> Any suggestions?

`org-babel-get-header' was removed in Org 9.0 and current ob-lilypond.el
doesn't call this function. My guess is you are mixing a new Org release
with an old "ob-lilypond.el".

Regards,

-- 
Nicolas Goaziou



Re: [O] ob-lilypond and LaTeX floats/captions

2016-02-26 Thread James Harkins

On February 27, 2016 5:57:01 AM Nicolas Goaziou  wrote:


> My question, then, is: What is needed to get ob-lilypond to support
> LaTeX floats and captions? (I have a sneaky feeling it isn't trivial,
> but it's worth asking in any case.)

You are applying the name and caption to the source block, which is
removed (:exports results), not to the results of the source block. So,
you need to generate the results first, or at least put a RESULTS
keyword below, and apply the name and caption to it.


A-ha. Thank you. So, "What is needed to get ob-lilypond to support LaTeX 
floats and captions" is to RTFM ;)


I have often exported source code to LaTeX listings, but only infrequently 
exported results. So I wasn't clear on the mechanism. Now that you explain 
it, it makes perfect sense: the properties belong to an entity that I asked 
it not to export.


Thanks again - I can take it from here.

(PS This project is a write-up of an improvisational composition -- a lot 
of text description of the procedure, with some examples in musical 
notation along the way. It blows my mind that I can write the lilypond 
scores directly into the org document, and it all renders with C-c C-e l p. 
org-mode FTW! Again!)


hjh

Sent with AquaMail for Android
http://www.aqua-mail.com







Re: [O] ob-lilypond and LaTeX floats/captions

2016-02-26 Thread Nicolas Goaziou
Hello,

"James Harkins"  writes:

> I currently have a few LilyPond source code blocks that are working quite 
> well as inline graphics (exported to LaTeX), e.g.:
>
> #+BEGIN_SRC lilypond :exports results :noweb yes :file ex1.eps
> ...
> #+END_SRC
>
> When I export, it (correctly) asks if I want to evaluate the source block, 
> and the export (correctly) includes the line:
>
> \includegraphics[width=.9\linewidth]{ex1.eps}
>
> So far, so good.
>
> Now, I would like to make the results a floating figure, with a caption and a 
> #+name reference. So I added the following to the above block:
>
> #+name: ex1
> #+caption: One possible form of "seed" material to start the performance.
> #+BEGIN_SRC lilypond :exports results :noweb yes :file ex1.eps
> ...
> #+END_SRC
>
> ... but the #+name is not converted into a label, and the #+caption is also 
> ignored.
>
> My question, then, is: What is needed to get ob-lilypond to support
> LaTeX floats and captions? (I have a sneaky feeling it isn't trivial,
> but it's worth asking in any case.)

You are applying the name and caption to the source block, which is
removed (:exports results), not to the results of the source block. So,
you need to generate the results first, or at least put a RESULTS
keyword below, and apply the name and caption to it.

Regards,

-- 
Nicolas Goaziou



Re: [O] ob-lilypond test failures

2015-09-13 Thread Nick Dokos
Rasmus  writes:

> Hi,
>
> I get lilypond errors when running make test now and I didn't see any old
> messages about this.
>
> The errors persists even after installing lilypond.
>
> For ob-lilypond/ly-attempt-to-open-pdf:
>
> pdf-info-query: epdfinfo: Error opening 
> /home/rasmus/src/code/org-mode/testing/examples/ob-lilypond-test.pdf:No such 
> file or directory
>
> For ob-lilypond/ly-attempt-to-play-midi:
>
> Test failed: ((should (equal "No midi file generated so can't
> play!" (org-babel-lilypond-attempt-to-play-midi midi-file))) :form
> (equal "No midi file generated so can't play!" "No midi file generated
> so can’t play!") :value nil :explanation (array-elt 29
> (different-atoms (39 "#x27" "?'") (8217 "#x2019" "?’"
>
> I don't know anything about lilypond.  I can make the tests not run when
> lilypond is not present, but as said, they don't even seem to work when
> lilypond is present.  I installed version 2.18.2.
>
> Thanks,
> Rasmus

I get passes:

,
|...
|passed   65/587  ob-lilypond/feature-provision
|passed   66/587  ob-lilypond/ly-arrange-mode
| No pdf file generated so can't display!
|passed   67/587  ob-lilypond/ly-attempt-to-open-pdf
| No midi file generated so can't play!
|passed   68/587  ob-lilypond/ly-attempt-to-play-midi
|passed   69/587  ob-lilypond/ly-check-for-compile-error
|...
`

but I didn't go any further to try to figure out who is producing
the messages.

I have lilypond installed.

Org-mode version 8.3.1 (release_8.3.1-234-g8c85c9 @
/home/nick/elisp/org-mode/lisp/)

-- 
Nick




Re: [O] ob-lilypond

2015-03-30 Thread Patrick L. Schmidt
Nick,

thank you very much for your helpful suggestions! After loading ob-lilypond.el, 
test-ob-lilypond.el and org-test.el from the git repo 38/42 tests passed. After 
I also loaded ob-org.el (git-repo) only one test failed. So I guess my org-mode 
version 8.2.7b (installed via elpa) is too old???  I tried to install the 
latest version from the git repo following the instructions at 
http://orgmode.org/manual/Installation.html.  But M-x org-version still returns 
org-mode version 8.2.7b. Do I have to get rid of the elpa-versions of org-mode. 
If yes, what’s the best way to do so?

Thanks a million!
patrick
On 29.03.2015, at 23:27, Nick Dokos ndo...@gmail.com wrote:

 pls p.l.schm...@gmx.de writes:
 
 Hey all,
 
 looks like I’m having quite a few problems with ob-lilypond (Org-mode 
 version 8.2.7b).
 To ensure that my setup is correct I ran the tests mentioned on 
 http://orgmode.org/worg
 /org-contrib/babel/languages/ob-doc-lilypond.html#sec-9:
 
M-x load-file RET ~/path/to/current/org-mode-git-repository/testing/lisp/
test-ob-lilypond.el
M-x ert RET RET
 
 And this is what I got (short version):
 
Selector: t
Passed: 6
Failed: 36 (36 unexpected)
Total:  42/42
 
Started at:   2015-03-25 13:32:19+0100
Finished.
Finished at:  2015-03-25 13:32:19+0100
 
...FFF…F
 
 Am I missing something? How can I get this to work?
 
 
 Probably missing a load-file: in addition to ob-lilypond.el
 and test-ob-lilypond.el, you need to load org-test.el (which
 is in the testing subdir of the git repo).
 
 With those three loaded (in addition to org-mode itself of course), all
 42 tests pass in my setup:
 
 Org-mode version 8.3beta (release_8.3beta-882-gf8731e @
 /home/nick/elisp/org-mode/lisp/)
 
 HTH,
 Nick



Re: [O] ob-lilypond

2015-03-29 Thread pls
Hey all,

looks like I’m having quite a few problems with ob-lilypond (Org-mode version 
8.2.7b). To ensure that my setup is correct I ran the tests mentioned on 
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html#sec-9:

M-x load-file RET 
~/path/to/current/org-mode-git-repository/testing/lisp/test-ob-lilypond.el
M-x ert RET RET

And this is what I got (short version):

Selector: t
Passed: 6
Failed: 36 (36 unexpected)
Total:  42/42

Started at:   2015-03-25 13:32:19+0100
Finished.
Finished at:  2015-03-25 13:32:19+0100

...FFF…F

Am I missing something? How can I get this to work?

Thanks for any help!
patrick

Error message (long version):
Selector: t
Passed: 6
Failed: 36 (36 unexpected)
Total:  42/42

Started at:   2015-03-25 13:32:19+0100
Finished.
Finished at:  2015-03-25 13:32:19+0100

...FFF...F

F ob-lilypond/ly-arrange-mode
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-arrange-mode))
  :form
  (boundp org-babel-lilypond-arrange-mode)
  :value nil))

F ob-lilypond/ly-attempt-to-open-pdf
(void-variable org-babel-lilypond-display-pdf-post-tangle)

F ob-lilypond/ly-attempt-to-play-midi
(void-variable org-babel-lilypond-play-midi-post-tangle)

F ob-lilypond/ly-check-for-compile-error
(void-function org-babel-lilypond-check-for-compile-error)

F ob-lilypond/ly-command-ly/bound
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-ly-command))
  :form
  (boundp org-babel-lilypond-ly-command)
  :value nil))

F ob-lilypond/ly-command-ly/stringp
(void-variable org-babel-lilypond-ly-command)

F ob-lilypond/ly-command-midi/bound
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-midi-command))
  :form
  (boundp org-babel-lilypond-midi-command)
  :value nil))

F ob-lilypond/ly-command-midi/stringp
(void-variable org-babel-lilypond-midi-command)

F ob-lilypond/ly-command-pdf/bound
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-pdf-command))
  :form
  (boundp org-babel-lilypond-pdf-command)
  :value nil))

F ob-lilypond/ly-command-pdf/stringp
(void-variable org-babel-lilypond-pdf-command)

F ob-lilypond/ly-commands/customize
(ert-test-failed
 ((should
   (equal
(list org-babel-lilypond-ly-command org-babel-lilypond-pdf-command 
org-babel-lilypond-midi-command)
(list nonsense bla fasel)))
  :form
  (equal
   (nil nil nil)
   (nonsense bla fasel))
  :value nil :explanation
  (list-elt 0
(different-types nil nonsense

F ob-lilypond/ly-commands/darwin
(ert-test-failed
 ((should
   (equal
(list org-babel-lilypond-ly-command org-babel-lilypond-pdf-command 
org-babel-lilypond-midi-command)
(list /Applications/lilypond.app/Contents/Resources/bin/lilypond 
open open)))
  :form
  (equal
   (nil nil nil)
   (/Applications/lilypond.app/Contents/Resources/bin/lilypond open 
open))
  :value nil :explanation
  (list-elt 0
(different-types nil 
/Applications/lilypond.app/Contents/Resources/bin/lilypond

F ob-lilypond/ly-commands/other
(ert-test-failed
 ((should
   (equal
(list org-babel-lilypond-ly-command org-babel-lilypond-pdf-command 
org-babel-lilypond-midi-command)
(list lilypond xdg-open xdg-open)))
  :form
  (equal
   (nil nil nil)
   (lilypond xdg-open xdg-open))
  :value nil :explanation
  (list-elt 0
(different-types nil lilypond

F ob-lilypond/ly-commands/windows-nt
(ert-test-failed
 ((should
   (equal
(list org-babel-lilypond-ly-command org-babel-lilypond-pdf-command 
org-babel-lilypond-midi-command)
(list lilypond  )))
  :form
  (equal
   (nil nil nil)
   (lilypond  ))
  :value nil :explanation
  (list-elt 0
(different-types nil lilypond

F ob-lilypond/ly-compile-lilyfile
(void-variable org-babel-lilypond-ly-command)

F ob-lilypond/ly-compile-post-tangle
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-compile-post-tangle))
  :form
  (boundp org-babel-lilypond-compile-post-tangle)
  :value nil))

F ob-lilypond/ly-display-pdf-post-tangle
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-display-pdf-post-tangle))
  :form
  (boundp org-babel-lilypond-display-pdf-post-tangle)
  :value nil))

F ob-lilypond/ly-gen-html
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-gen-pdf))
  :form
  (boundp org-babel-lilypond-gen-pdf)
  :value nil))

F ob-lilypond/ly-gen-png
(ert-test-failed
 ((should
   (boundp 'org-babel-lilypond-gen-png))
  :form
  (boundp org-babel-lilypond-gen-png)
  :value nil))

F ob-lilypond/ly-gen-svg
(ert-test-failed
 ((should
   (boundp 

Re: [O] ob-lilypond

2015-03-29 Thread Nick Dokos
pls p.l.schm...@gmx.de writes:

 Hey all,

 looks like I’m having quite a few problems with ob-lilypond (Org-mode version 
 8.2.7b).
 To ensure that my setup is correct I ran the tests mentioned on 
 http://orgmode.org/worg
 /org-contrib/babel/languages/ob-doc-lilypond.html#sec-9:

 M-x load-file RET ~/path/to/current/org-mode-git-repository/testing/lisp/
 test-ob-lilypond.el
 M-x ert RET RET

 And this is what I got (short version):

 Selector: t
 Passed: 6
 Failed: 36 (36 unexpected)
 Total:  42/42

 Started at:   2015-03-25 13:32:19+0100
 Finished.
 Finished at:  2015-03-25 13:32:19+0100

 ...FFF…F

 Am I missing something? How can I get this to work?


Probably missing a load-file: in addition to ob-lilypond.el
and test-ob-lilypond.el, you need to load org-test.el (which
is in the testing subdir of the git repo).

With those three loaded (in addition to org-mode itself of course), all
42 tests pass in my setup:

Org-mode version 8.3beta (release_8.3beta-882-gf8731e @
/home/nick/elisp/org-mode/lisp/)

HTH,
Nick




Re: [O] ob-lilypond code cleanup

2014-08-20 Thread Achim Gratz
Nicolas Goaziou writes:
 FWIW, I think prefix conformance should go to maint.

Patch has been split and just the prefix conformance committed to maint
in b8bd2147cb.

Introduction of defcustom, some code cleanups and associated tests
committed to master in 64821bd967.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] ob-lilypond code cleanup

2014-08-18 Thread Nicolas Goaziou
Hello,

Achim Gratz strom...@nexgo.de writes:

 Triggered by the discussion about it, I've looked at ob-lilypond and
 found that it should be cleaned up a bit.  The defvars holding the
 various commands should really be defcustoms, but I've ran out of time
 for now.  If anybody thinks this should go to maint please say so,
 otherwise I will commit on master.

FWIW, I think prefix conformance should go to maint.

Also, you shouldn't use `pcase' as Org preserves compatibility with
Emacs 23.


Regards,

-- 
Nicolas Goaziou



Re: [O] ob-lilypond code cleanup

2014-08-18 Thread Achim Gratz
Nicolas Goaziou writes:
 FWIW, I think prefix conformance should go to maint.

OK.

 Also, you shouldn't use `pcase' as Org preserves compatibility with
 Emacs 23.

Thanks for the reminder.  In any case, these will need to become
defcustoms as well.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] ob-lilypond code cleanup

2014-08-18 Thread Achim Gratz
Achim Gratz writes:
 Thanks for the reminder.  In any case, these will need to become
 defcustoms as well.

Improved patch now with defcustom.  I hope I did get that defcustom
stuff right, please check.

From 35c3be896c159fcd9fb727b39273750fc0264592 Mon Sep 17 00:00:00 2001
From: Achim Gratz strom...@stromeko.de
Date: Sun, 17 Aug 2014 10:29:24 +0200
Subject: [PATCH] ob-lilypond: Code cleanup

* lisp/ob-lilypond.el: Change ly- prefix to org-babel-lilypond
  throughout.
  (ly-OSX-ly-path, ly-OSX-pdf-path, ly-OSX-midi-path, ly-nix-ly-path,
  ly-nix-pdf-path, ly-nix-midi-path, ly-w32-ly-path, ly-w32-pdf-path,
  ly-w32-midi-path, ly-determine-ly-path, ly-determine-pdf-path,
  ly-determine-midi-path): Remove.
  (org-babel-lilypond-ly-command, org-babel-lilypond-midi-command,
  org-babel-lilypond-pdf-command): Replacement for removed variables
  and functions.  Adapt all calls to the removed functions to use
  these variables instead.
  (org-babel-lilypond-commands): New defcustom for setting up
  the *-command variables.  Keep different defaults for different
  systems as the original code did to avoid tripping up unsuspecting
  users.
  (org-babel-lilypond-execute-tangled-ly,
  org-babel-lilypond-check-for-compile-error): Revert conditions to
  avoid superfluous forms.  Remove unused return values.
* testing/lisp/test-ob-lilypond.el: Change ly- prefix to
  org-babel-lilypond throughout.  Do not test for removed variables
  and replace removed function calls with the appropriate variable
  content.
---
 lisp/ob-lilypond.el  | 284 ++---
 testing/lisp/test-ob-lilypond.el | 292 ---
 2 files changed, 256 insertions(+), 320 deletions(-)

diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index fbfac88..43433a3 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -41,62 +41,82 @@ (defalias 'lilypond-mode 'LilyPond-mode)
 (defvar org-babel-default-header-args:lilypond '()
   Default header arguments for lilypond code blocks.
 NOTE: The arguments are determined at lilypond compile time.
-See (ly-set-header-args))
+See (org-babel-lilypond-set-header-args))
 
-(defvar ly-compile-post-tangle t
+(defvar org-babel-lilypond-compile-post-tangle t
   Following the org-babel-tangle (C-c C-v t) command,
-ly-compile-post-tangle determines whether ob-lilypond should
+org-babel-lilypond-compile-post-tangle determines whether ob-lilypond should
 automatically attempt to compile the resultant tangled file.
 If the value is nil, no automated compilation takes place.
 Default value is t)
 
-(defvar ly-display-pdf-post-tangle t
+(defvar org-babel-lilypond-display-pdf-post-tangle t
   Following a successful LilyPond compilation
-ly-display-pdf-post-tangle determines whether to automate the
+org-babel-lilypond-display-pdf-post-tangle determines whether to automate the
 drawing / redrawing of the resultant pdf.  If the value is nil,
 the pdf is not automatically redrawn.  Default value is t)
 
-(defvar ly-play-midi-post-tangle t
+(defvar org-babel-lilypond-play-midi-post-tangle t
   Following a successful LilyPond compilation
-ly-play-midi-post-tangle determines whether to automate the
+org-babel-lilypond-play-midi-post-tangle determines whether to automate the
 playing of the resultant midi file.  If the value is nil,
 the midi file is not automatically played.  Default value is t)
 
-(defvar ly-OSX-ly-path
-  /Applications/lilypond.app/Contents/Resources/bin/lilypond)
-(defvar ly-OSX-pdf-path open)
-(defvar ly-OSX-midi-path open)
-
-(defvar ly-nix-ly-path /usr/bin/lilypond)
-(defvar ly-nix-pdf-path evince)
-(defvar ly-nix-midi-path timidity)
-
-(defvar ly-w32-ly-path lilypond)
-(defvar ly-w32-pdf-path )
-(defvar ly-w32-midi-path )
-
-(defvar ly-gen-png nil
+(defconst org-babel-lilypond-ly-command
+  Command to execute lilypond on your system.)
+(defconst org-babel-lilypond-pdf-command
+  Command to show a PDF file on your system.)
+(defconst org-babel-lilypond-midi-command
+  Command to play a MIDI file on your system.)
+(defcustom org-babel-lilypond-commands
+  (cond
+   ((eq system-type 'darwin)
+'(/Applications/lilypond.app/Contents/Resources/bin/lilypond open open))
+   ((eq system-type 'windows-nt)
+'(lilypond  ))
+   (t
+'(lilypond xdg-open xdg-open)))
+  Commands to run lilypond and view or play the results.
+These should be executables that take a filename as an argument.
+On some system it is possible to specify the filename directly
+and the viewer or player will be determined from the file type;
+you can leave the string empty on this case.
+  :group 'org-babel
+  :type '(list
+	  (string :tag Lilypond   )
+	  (string :tag PDF Viewer )
+	  (string :tag MIDI Player))
+  :version 24.3
+  :package-version '(Org . 8.2.7)
+  :set
+  (lambda (symbol value)
+(setq
+ org-babel-lilypond-ly-command   (nth 0 value)
+ org-babel-lilypond-pdf-command  (nth 1 value)
+ org-babel-lilypond-midi-command (nth 2 value
+

Re: [O] ob-lilypond open pdf and midi asynchroniously

2012-03-10 Thread Martyn Jago
Hi Ezequiel

 Ezequiel Birman stormwa...@espiga4.com.ar writes:
 Is there a reason to not append  to shell-command's args? I get
 disconnected from ERC/Bitlbee each time I peek at the score too long.

Apologies for my delayed response - I've been rather busy.

I've pushed a patch to the list to make auditioning of pdf and midi
asynchronous processes. You can either wait to see if the patch makes it
to git, or apply the patch yourself (git am).

Hopefully this will alleviate your problems with ERC!

Thanks for the heads-up.

I'm hoping to introduce remote compiling of Lilypond to help alleviate
the wait time felt when compiling Lilypond (slow but pretty)!

I'm using a similar technique for parallel testing of embedded C,
document generation, and building (using ZeroMQ). 

Best, Martyn





Re: [O] ob-lilypond

2011-07-02 Thread Martyn Jago
Hi 

On 1 Jul 2011, at 20:27, Eric Schulte wrote:
 
 I can't reproduce this problem, for example the following works for me
 on the latest version of Org-mode.  I think perhaps you may not be on
 the latest git HEAD.
 
 Thanks again for this great contribution -- Eric
 
 ** define a block with a name for noweb expansion
   :PROPERTIES:
   :tangle:   yes
   :noweb:yes
   :END:
 
 #+source: simple(something=something)
 #+begin_src emacs-lisp
  something
 #+end_src
 
 another block including the first block
 #+begin_src emacs-lisp
  simple(something=something else)
 #+end_src
 
 -- 
 Eric Schulte
 http://cs.unm.edu/~eschulte/

OK - It appears I was getting the differing results since I wasn't
passing in default parameters to my ruby blocks being called by
noweb...

was...

#+srcname:  gen_arpeggio(key,root)

now...

#+srcname:  gen_arpeggio(key=c,root=c)

Regards

Martyn



Re: [O] ob-lilypond

2011-07-01 Thread Christian Moe

On 6/30/11 8:10 PM, Eric Schulte wrote:

Martyn Jagomartyn.j...@btinternet.com  writes:

(...)

Great, I've just moved this into the Org-mode core and added it to the
list of Babel languages.


Great!



One distinction that has occurred to me (especially following comments on
the mailing list) is that of babel language and babel language work-flow.
In other words, I can visualise refactoring ob-lilypond to be no more than
a specification of the Lilypond syntax, and working in parallel, on a
work-flow implementation for Lilypond that is opinionated in terms of
adjusting org-babel settings away from their defaults / removing work-flow
noise etc. ( org-lilypond.el ) ? Would this make sense, and if so where would
it live (aligned to org-babel / a native Emacs mode perhaps)?
I hope that makes sense.



That sounds like a good idea.  Ideally ob-lilypond should include just
those elements expected by the code block interface, namely functions
for session/external evaluation, for expanding variables in code block
bodies, and for returning results to Org-mode.  I think that it would be
a good idea to develop an external org-lilypond to support a more
comprehensive workflow.


I like this.

I certainly see that the already complex task of making arrangements 
like those in Martyn's examples should be made as easy as possible.


As for the comparatively simple use cases I brought up, once they're 
supported by ob-lilypond I'd be perfectly happy to throw header 
arguments at them.


Yours,
Christian



Re: [O] ob-lilypond

2011-07-01 Thread Martyn Jago
Hi

 
 That's good to hear.  Are you up for trying to merge them into the rest
 of the Org-mode test suite?  This should be as simple as placing any
 org-mode example files you have in
 
 org-mode/testing/examples/
 
 placing the .el file defining your tests into
 
 org-mode/testing/lisp/
 
 and renaming all of your tests so that they start with the prefix
 ob-lilypond/
 
 I fully understand if you don't have the time to do this, and I should
 be able to take a shot at it some time in the not-too-distant future.

Hopefully this patch will work for you...



port-test-ob-lilypond.patch
Description: Binary data


It looks like noweb parsing has very recently become very brittle, 
since it broke the noweb in my lilypond example. 
This does not appear to be restricted to lilypond blocks.

The error is (wrong-type-argument consp nil)

I fixed for my songs by changing...

#+srcname: gen_arpeggio(key,root)

to...

#+srcname: gen_arpeggio (key,root)

and... 

gen_arpeggio(key=c,root=c)

to...

gen_arpeggio (key=c,root=c)

I believe #+call: is affected too.

Unfortunately I won't be able to investigate further until next week.

Regards

Martyn










Re: [O] ob-lilypond

2011-07-01 Thread Eric Schulte
Martyn Jago martyn.j...@btinternet.com writes:

 Hi

 
 That's good to hear.  Are you up for trying to merge them into the rest
 of the Org-mode test suite?  This should be as simple as placing any
 org-mode example files you have in
 
 org-mode/testing/examples/
 
 placing the .el file defining your tests into
 
 org-mode/testing/lisp/
 
 and renaming all of your tests so that they start with the prefix
 ob-lilypond/
 
 I fully understand if you don't have the time to do this, and I should
 be able to take a shot at it some time in the not-too-distant future.

 Hopefully this patch will work for you...


Yes, this patch applied without error, and the test suite passes all
tests.  Thanks for contributing and for greatly increasing the size of
the Org-mode test suite.


 It looks like noweb parsing has very recently become very brittle, 
 since it broke the noweb in my lilypond example. 
 This does not appear to be restricted to lilypond blocks.

 The error is (wrong-type-argument consp nil)

 I fixed for my songs by changing...

 #+srcname: gen_arpeggio(key,root)

 to...

 #+srcname: gen_arpeggio (key,root)

 and... 

 gen_arpeggio(key=c,root=c)

 to...

 gen_arpeggio (key=c,root=c)

 I believe #+call: is affected too.

 Unfortunately I won't be able to investigate further until next week.


I can't reproduce this problem, for example the following works for me
on the latest version of Org-mode.  I think perhaps you may not be on
the latest git HEAD.

Thanks again for this great contribution -- Eric

** define a block with a name for noweb expansion
   :PROPERTIES:
   :tangle:   yes
   :noweb:yes
   :END:

#+source: simple(something=something)
#+begin_src emacs-lisp
  something
#+end_src

another block including the first block
#+begin_src emacs-lisp
  simple(something=something else)
#+end_src

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] ob-lilypond

2011-06-30 Thread Martyn Jago
Hi

 
 If Shelagh hasn't actually authored any of ob-lilypond.el (or at least  
 hasn't authored more than 10 lines of) then we could simply remove her
 name from the authors list and include it into the Org-mode core.  This
 however may not be the best long-term solution if you anticipate her
 increased participation later-on in the project.  Please let me know
 (soon) if you would like me to make this change.
 

I've modified the author status in my repository.

 Ultimately this points to the more general issue of how to include Babel
 language-specific tests into the Org-mode test suite s.t. they can be
 executed independently of the core of the test suite.
 
 Thanks -- Eric
 

My unit-tests don't currently require the Lilypond to be initialised as a babel
language nor a Lilypond executable AFAICT, so currently they possibly don't
need to be run independently. I'll investigate this further. 

 

One distinction that has occurred to me (especially following comments on 
the mailing list) is that of babel language and babel language work-flow.
In other words, I can visualise refactoring ob-lilypond to be no more than
a specification of the Lilypond syntax, and working in parallel, on a 
work-flow implementation for Lilypond that is opinionated in terms of 
adjusting org-babel settings away from their defaults / removing work-flow 
noise etc. ( org-lilypond.el ) ? Would this make sense, and if so where would 
it live (aligned to org-babel / a native Emacs mode perhaps)? 
I hope that makes sense.

Regards

Martyn








Re: [O] ob-lilypond

2011-06-30 Thread Eric Schulte
Martyn Jago martyn.j...@btinternet.com writes:

 Hi

 
 If Shelagh hasn't actually authored any of ob-lilypond.el (or at least  
 hasn't authored more than 10 lines of) then we could simply remove her
 name from the authors list and include it into the Org-mode core.  This
 however may not be the best long-term solution if you anticipate her
 increased participation later-on in the project.  Please let me know
 (soon) if you would like me to make this change.
 

 I've modified the author status in my repository.


Great, I've just moved this into the Org-mode core and added it to the
list of Babel languages.


 Ultimately this points to the more general issue of how to include Babel
 language-specific tests into the Org-mode test suite s.t. they can be
 executed independently of the core of the test suite.
 
 Thanks -- Eric
 

 My unit-tests don't currently require the Lilypond to be initialised as a 
 babel
 language nor a Lilypond executable AFAICT, so currently they possibly don't
 need to be run independently. I'll investigate this further. 


That's good to hear.  Are you up for trying to merge them into the rest
of the Org-mode test suite?  This should be as simple as placing any
org-mode example files you have in

org-mode/testing/examples/

placing the .el file defining your tests into

org-mode/testing/lisp/

and renaming all of your tests so that they start with the prefix
ob-lilypond/

I fully understand if you don't have the time to do this, and I should
be able to take a shot at it some time in the not-too-distant future.


 One distinction that has occurred to me (especially following comments on 
 the mailing list) is that of babel language and babel language work-flow.
 In other words, I can visualise refactoring ob-lilypond to be no more than
 a specification of the Lilypond syntax, and working in parallel, on a 
 work-flow implementation for Lilypond that is opinionated in terms of 
 adjusting org-babel settings away from their defaults / removing work-flow 
 noise etc. ( org-lilypond.el ) ? Would this make sense, and if so where would 
 it live (aligned to org-babel / a native Emacs mode perhaps)? 
 I hope that makes sense.


That sounds like a good idea.  Ideally ob-lilypond should include just
those elements expected by the code block interface, namely functions
for session/external evaluation, for expanding variables in code block
bodies, and for returning results to Org-mode.  I think that it would be
a good idea to develop an external org-lilypond to support a more
comprehensive workflow.

Thanks -- Eric


 Regards

 Martyn







-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] ob-lilypond

2011-06-29 Thread Martyn Jago
Hi 

 I have a commit ready to push to add lilypond support to Org-mode, first
 I just have two questions.
 
 1. I see Shelagh Manton mentioned as an author, would it be possible for
Shelagh to complete the FSF copyright assignment forms?  Otherwise I
don't believe we can add ob-lilypond to the Org-mode core, although
we could still place it in the contrib directory with ob-oz.

Initially this project was intended to be a joint project between Shelagh and 
myself, but short of the initial commit, Shelagh hasn't been involved 
(unfortunately, since she will certainly know LilyPond better than I do - I 
believe she is very busy). The initial commit was broken and wasn't used. 
I'll try to contact her, but haven't an email address, so must use Github.


 2. I see you have a test suite which is fantastic.  Additionally this
test suite uses ert, which is what the main Org-mode test suite uses.
Would it be possible to fold this test suite into Org-mode's test
suite in the testing directory?

My test suite can live anywhere - it requires altering relative paths. 
Currently 
my test suite requires the test-build directory and contained files.

If these tests require a lilypond executable we may have to partition
them off from the main Org-mode test suite so that they can be run
independently of each other.

They don't.
 
Regards

Martyn





Re: [O] ob-lilypond

2011-06-29 Thread Eric Schulte
Martyn Jago martyn.j...@btinternet.com writes:

 Hi 

 I have a commit ready to push to add lilypond support to Org-mode, first
 I just have two questions.
 
 1. I see Shelagh Manton mentioned as an author, would it be possible for
Shelagh to complete the FSF copyright assignment forms?  Otherwise I
don't believe we can add ob-lilypond to the Org-mode core, although
we could still place it in the contrib directory with ob-oz.

 Initially this project was intended to be a joint project between Shelagh and 
 myself, but short of the initial commit, Shelagh hasn't been involved 
 (unfortunately, since she will certainly know LilyPond better than I do - I 
 believe she is very busy). The initial commit was broken and wasn't used. 
 I'll try to contact her, but haven't an email address, so must use Github.


If Shelagh hasn't actually authored any of ob-lilypond.el (or at least
hasn't authored more than 10 lines of) then we could simply remove her
name from the authors list and include it into the Org-mode core.  This
however may not be the best long-term solution if you anticipate her
increased participation later-on in the project.  Please let me know
(soon) if you would like me to make this change.



 2. I see you have a test suite which is fantastic.  Additionally this
test suite uses ert, which is what the main Org-mode test suite uses.
Would it be possible to fold this test suite into Org-mode's test
suite in the testing directory?

 My test suite can live anywhere - it requires altering relative paths. 
 Currently 
 my test suite requires the test-build directory and contained files.


Alright, I think we can wait for this integration, but please don't
delete your github repo in the mean time as I would like to fold this
test suite in at some point.

Ultimately this points to the more general issue of how to include Babel
language-specific tests into the Org-mode test suite s.t. they can be
executed independently of the core of the test suite.

Thanks -- Eric


If these tests require a lilypond executable we may have to partition
them off from the main Org-mode test suite so that they can be run
independently of each other.

 They don't.
  
 Regards

 Martyn




-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] ob-lilypond

2011-06-28 Thread Martyn Jago

Hi Eric

 Eric Schulte schulte.eric at gmail.com writes:

 Hi Martyn,
 
 This looks great, I look forward to testing it out, although my music
 composition experience is limited to using Finale in a high-school music
 theory class.
 
 It sounds like your plan is to keep this on github during the first
 trial and debugging stages.  At some point I would love to include this
 into the Org-mode core.
 

Thanks - I'm no LilyPond expert myself, and so a heads-up from a more 
proficient LilyPond user would be great. Likewise the ins and outs of 
LilyPond-mode. That said, it is working well for me and my use-case, and 
it is great to be generating music and score out of org-mode - it feels a 
good fit, which is testament to the flexability of org-babel and org-mode.

 Part of me is tempted to push for immediate integration so that this is
 released with Emacs24 (we could push bug fixes throughout the fall),
 however this may be too much code for just before an Org-mode release.
 
 Thanks for sharing! -- Eric
 

I'll leave that decision to you, but certainly if the software is useful 
to others, I am happy to see it distributed. Actually, I only recently 
discovered how busy Lilypond development is, so there must be potential 
users out there. Perhaps I should bite the bullet and approach the Lilypond
user mailing list to see if there is any interest there?

Regards

Martyn


 Martyn Jago martyn.jago at btinternet.com writes:
...
 







Re: [O] ob-lilypond

2011-06-28 Thread Bastien
Hi Martyn,

Martyn Jago martyn.j...@btinternet.com writes:

 Actually, I only recently discovered how busy Lilypond development is,
 so there must be potential users out there.

Indeed -- Lilypond is an old GNU project, I guess there are many Emacs
gnusers.  I would love to include ob-lilypond.el in the next release, it
adds a nice functionality and cannot break anything.

Thanks!

-- 
 Bastien



Re: [O] ob-lilypond

2011-06-28 Thread Bastien
Bastien b...@altern.org writes:

 Indeed -- Lilypond is an old GNU project, I guess there are many Emacs
 gnusers.  I would love to include ob-lilypond.el in the next release, it
 adds a nice functionality and cannot break anything.

I forgot to mention that I leave this decision to Eric, of course.

-- 
 Bastien



Re: [O] ob-lilypond

2011-06-28 Thread Christian Moe

Hi,

I'm thrilled that Lilypond has been added to Babel, grateful for the 
extra thought given to Mac users -- and completely bowled over by your 
demos!


Rather than put together complex scores or generate arpeggios the 
literate programming way, though, all I'd like to do is to easily 
include simple snippets of music notation in Org documents 
(elaboration follows).


So please consider this a polite request to bump up Consider the 
option to embed resultant partial musical output into org file from 
SOMEDAY to TODO in your task list...


Use cases:

- Self-contained documentation, e.g. using Org to author a text like 
the Lilypond documentation: much prose with code examples and the 
results of those examples interspersed.


- Writing a musicology paper, with captioned and cross-referenced 
examples (not /my/ use case, but someone might...)


- Putting together a simple song booklet, such as for a summer camp, 
with lyrics and possibly illustrations. (This is my main interest.)


Ways to do it:

One (imperfect) solution would be a header argument to just surround 
the exported content of Lilypond blocks with the appropriate HTML tags 
/ LaTeX environment for lilypond-book to act on, and perhaps a 
post-processing step to automatically call lilypond-book on the 
exported document. I can probably set up something like this for myself.


But much better, IMO, would be a way to `evaluate' a single Lilypond 
block and get #+RESULTS with a link to a PNG representing just that 
snippet of music. The snippet would then show up in subsequent exports 
as an included graphic without any post-processing, and could also be 
viewed in-buffer with `C-c C-x C-v'. (For my money, this and not 
`tangle all' would be the intuitive use of `C-c C-c' on a block, but I 
understand how your choice makes sense for other uses.)


Yours,
Christian



On 6/27/11 3:00 PM, Martyn Jago wrote:

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 . 

Re: [O] ob-lilypond

2011-06-28 Thread David O'Toole
this is fantastic :)

org mode is becoming like the Jupiter of the emacsian solar system.

On Tue, Jun 28, 2011 at 8:11 AM, Christian Moe m...@christianmoe.com wrote:
 Hi,

 I'm thrilled that Lilypond has been added to Babel, grateful for the extra
 thought given to Mac users -- and completely bowled over by your demos!

 Rather than put together complex scores or generate arpeggios the literate
 programming way, though, all I'd like to do is to easily include simple
 snippets of music notation in Org documents (elaboration follows).

 So please consider this a polite request to bump up Consider the option to
 embed resultant partial musical output into org file from SOMEDAY to TODO
 in your task list...

 Use cases:

 - Self-contained documentation, e.g. using Org to author a text like the
 Lilypond documentation: much prose with code examples and the results of
 those examples interspersed.

 - Writing a musicology paper, with captioned and cross-referenced examples
 (not /my/ use case, but someone might...)

 - Putting together a simple song booklet, such as for a summer camp, with
 lyrics and possibly illustrations. (This is my main interest.)

 Ways to do it:

 One (imperfect) solution would be a header argument to just surround the
 exported content of Lilypond blocks with the appropriate HTML tags / LaTeX
 environment for lilypond-book to act on, and perhaps a post-processing step
 to automatically call lilypond-book on the exported document. I can probably
 set up something like this for myself.

 But much better, IMO, would be a way to `evaluate' a single Lilypond block
 and get #+RESULTS with a link to a PNG representing just that snippet of
 music. The snippet would then show up in subsequent exports as an included
 graphic without any post-processing, and could also be viewed in-buffer with
 `C-c C-x C-v'. (For my money, this and not `tangle all' would be the
 intuitive use of `C-c C-c' on a block, but I understand how your choice
 makes sense for other uses.)

 Yours,
 Christian



 On 6/27/11 3:00 PM, Martyn Jago wrote:

 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  

Re: [O] ob-lilypond

2011-06-28 Thread Cameron Horsburgh
This is very exciting. I use LilyPond a lot for various projects and I
think integration with orgmode is an obvious solution to a problem I
hope to find very soon!

LilyPond is largely written in Scheme and I'm pretty sure a few of the
devs use emacs. There are some interesting emacs/Lily projects around,
not least Nicolas Sceaux' lyqi-mode which does some pretty groovy
things, including midi keyboard input via rumor.

I'm looking forward to having a chance to play with this. Well done,
and thank you!


Cameron Horsburgh
blog: http://spiritcry.wordpress.com



On 28 June 2011 19:38, Martyn Jago martyn.j...@btinternet.com wrote:

 Hi Eric

 Eric Schulte schulte.eric at gmail.com writes:

 Hi Martyn,

 This looks great, I look forward to testing it out, although my music
 composition experience is limited to using Finale in a high-school music
 theory class.

 It sounds like your plan is to keep this on github during the first
 trial and debugging stages.  At some point I would love to include this
 into the Org-mode core.


 Thanks - I'm no LilyPond expert myself, and so a heads-up from a more
 proficient LilyPond user would be great. Likewise the ins and outs of
 LilyPond-mode. That said, it is working well for me and my use-case, and
 it is great to be generating music and score out of org-mode - it feels a
 good fit, which is testament to the flexability of org-babel and org-mode.

 Part of me is tempted to push for immediate integration so that this is
 released with Emacs24 (we could push bug fixes throughout the fall),
 however this may be too much code for just before an Org-mode release.

 Thanks for sharing! -- Eric


 I'll leave that decision to you, but certainly if the software is useful
 to others, I am happy to see it distributed. Actually, I only recently
 discovered how busy Lilypond development is, so there must be potential
 users out there. Perhaps I should bite the bullet and approach the Lilypond
 user mailing list to see if there is any interest there?

 Regards

 Martyn


 Martyn Jago martyn.jago at btinternet.com writes:
 ...










Re: [O] ob-lilypond

2011-06-28 Thread Martyn Jago
Hi Cameron

 Cameron Horsburgh cammoblammo at gmail.com writes:

 This is very exciting. I use LilyPond a lot for various projects and I
 think integration with orgmode is an obvious solution to a problem I
 hope to find very soon!
 
 LilyPond is largely written in Scheme and I'm pretty sure a few of the
 devs use emacs. There are some interesting emacs/Lily projects around,
 not least Nicolas Sceaux' lyqi-mode which does some pretty groovy
 things, including midi keyboard input via rumor.

I had come across lyqi-mode but haven't checked it out yet. Added to the TODO
list. Thanks for the feedback.

Regards

Martyn





Re: [O] ob-lilypond

2011-06-28 Thread Martyn Jago
Hi Cameron 

 Hi,
 
 I'm thrilled that Lilypond has been added to Babel, grateful for the 
 extra thought given to Mac users -- and completely bowled over by your 
 demos!
 
 So please consider this a polite request to bump up Consider the 
 option to embed resultant partial musical output into org file from 
 SOMEDAY to TODO in your task list...

Thanks for the encouraging comments!

Status changed from SOMEDAY to TODO. 

 
 But much better, IMO, would be a way to `evaluate' a single Lilypond 
 block and get #+RESULTS with a link to a PNG representing just that 
 snippet of music. The snippet would then show up in subsequent exports 
 as an included graphic without any post-processing, and could also be 
 viewed in-buffer with `C-c C-x C-v'. (For my money, this and not 
 `tangle all' would be the intuitive use of `C-c C-c' on a block, but I 
 understand how your choice makes sense for other uses.)
 
 Yours,
 Christian
 

This is very doable since it is the first thing I tried on initial
experimentation. I think I had some difficulty cropping the snippet (png)
in that the result had no padding at all, but I'm guessing that can be
overcome. 
Certainly with the use cases you suggest, the defaults would need to
change, and C-c C-c would need to act as you describe, but that wouldn't
be an issue if we can define seperate 'modes' for the different ways of
working (I think for now the 'modes' can be considered  mutually exclusive).

Regards

Martyn





Re: [O] ob-lilypond

2011-06-28 Thread Christian Moe

On 6/28/11 7:06 PM, Martyn Jago wrote:


Status changed from SOMEDAY to TODO.


Great, I'll be looking out for it.

Yours,
Christian



Re: [O] ob-lilypond

2011-06-28 Thread Michael Brand
Hi Martyn

Thank you very much for sharing your work.

On Tue, Jun 28, 2011 at 19:06, Martyn Jago martyn.j...@btinternet.com wrote:
 But much better, IMO, would be a way to `evaluate' a single Lilypond
 block and get #+RESULTS with a link to a PNG representing just that
 snippet of music. The snippet would then show up in subsequent exports
 as an included graphic without any post-processing, and could also be
 viewed in-buffer with `C-c C-x C-v'. (For my money, this and not
 `tangle all' would be the intuitive use of `C-c C-c' on a block, but I
 understand how your choice makes sense for other uses.)

 Yours,
 Christian

 This is very doable since it is the first thing I tried on initial
 experimentation. I think I had some difficulty cropping the snippet (png)
 in that the result had no padding at all, but I'm guessing that can be
 overcome.
 Certainly with the use cases you suggest, the defaults would need to
 change, and C-c C-c would need to act as you describe, but that wouldn't
 be an issue if we can define seperate 'modes' for the different ways of
 working (I think for now the 'modes' can be considered  mutually exclusive).

For me it would be great to have Lilypond snippets that can be
evaluated into a linked score image file visible inline the Org
buffer, permanently in #+results: or temporarily as an overlay
(similar to org-preview-latex-fragment).

Michael



Re: [O] ob-lilypond

2011-06-28 Thread Christian Moe




This is very doable since it is the first thing I tried on initial
experimentation. I think I had some difficulty cropping the snippet (png)
in that the result had no padding at all, but I'm guessing that can be
overcome.


I guess most of us who would be interested in this would have 
ImageMagick *convert* at hand, if it's difficult to get Lilypond or 
lilypond-book to do it directly.



Certainly with the use cases you suggest, the defaults would need to
change, and C-c C-c would need to act as you describe, but that wouldn't
be an issue if we can define seperate 'modes' for the different ways of
working (I think for now the 'modes' can be considered  mutually exclusive).


I'd tentatively suggest things should be done in a way that is roughly 
analogous with how other Babel languages work, not in the way that 
makes one or another use case super-easy to do. For our different use 
cases we might then each have to tweak some :tangle, :exports, 
:results or :file header arguments.


But using Org-Babel's provisions for system-wide, language-specific 
and buffer-wide heading arguments, the user should be able to define 
her own `modes' by changing a few settings, and avoid littering a 
complex document with those header arguments.


Maybe. Haven't thought this very far through...

Yours,
Christian



Re: [O] ob-lilypond

2011-06-28 Thread Eric Schulte
Bastien b...@altern.org writes:

 Bastien b...@altern.org writes:

 Indeed -- Lilypond is an old GNU project, I guess there are many Emacs
 gnusers.  I would love to include ob-lilypond.el in the next release, it
 adds a nice functionality and cannot break anything.

 I forgot to mention that I leave this decision to Eric, of course.

Great,

I have a commit ready to push to add lilypond support to Org-mode, first
I just have two questions.

1. I see Shelagh Manton mentioned as an author, would it be possible for
   Shelagh to complete the FSF copyright assignment forms?  Otherwise I
   don't believe we can add ob-lilypond to the Org-mode core, although
   we could still place it in the contrib directory with ob-oz.

2. I see you have a test suite which is fantastic.  Additionally this
   test suite uses ert, which is what the main Org-mode test suite uses.
   Would it be possible to fold this test suite into Org-mode's test
   suite in the testing directory?
   
   If these tests require a lilypond executable we may have to partition
   them off from the main Org-mode test suite so that they can be run
   independently of each other.

I'm happy to continue to push in updates to the Org-mode core as
ob-lilypond development continues.

Thanks to Martyn for this exciting addition! -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] ob-lilypond

2011-06-28 Thread Martyn Jago
Hi 

 I guess most of us who would be interested in this would have 
 ImageMagick *convert* at hand, if it's difficult to get Lilypond or 
 lilypond-book to do it directly.
 

I tentatively disagree. 

Arrangement mode needs to work for me with the minimal of fuss.

Annotation mode similarly for you.

That aside you can configure locally all you wish.

Thus is the beauty of org-babel's configuration.

Regards 

Martyn







Re: [O] ob-lilypond

2011-06-28 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 1. I see Shelagh Manton mentioned as an author, would it be possible for
Shelagh to complete the FSF copyright assignment forms?  Otherwise I
don't believe we can add ob-lilypond to the Org-mode core, although
we could still place it in the contrib directory with ob-oz.

There is little chance to get the assignement before the release of 7.6,
so yes, let's take that route (contrib/) for now.

-- 
 Bastien



Re: [O] ob-lilypond

2011-06-28 Thread Eric Schulte
Bastien b...@altern.org writes:

 Hi Eric,

 Eric Schulte schulte.e...@gmail.com writes:

 1. I see Shelagh Manton mentioned as an author, would it be possible for
Shelagh to complete the FSF copyright assignment forms?  Otherwise I
don't believe we can add ob-lilypond to the Org-mode core, although
we could still place it in the contrib directory with ob-oz.

 There is little chance to get the assignement before the release of 7.6,
 so yes, let's take that route (contrib/) for now.

This is now located in contrib/babel/langs.

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] ob-lilypond

2011-06-27 Thread Eric Schulte
Hi Martyn,

This looks great, I look forward to testing it out, although my music
composition experience is limited to using Finale in a high-school music
theory class.

It sounds like your plan is to keep this on github during the first
trial and debugging stages.  At some point I would love to include this
into the Org-mode core.

Part of me is tempted to push for immediate integration so that this is
released with Emacs24 (we could push bug fixes throughout the fall),
however this may be too much code for just before an Org-mode release.

Thanks for sharing! -- Eric

Martyn Jago martyn.j...@btinternet.com writes:

 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