Re: emacs and using the .info lilypond documentation

2014-12-02 Thread Kevin Patrick Barry
Dear Hwaen Ch'uqi,

Thank you for your reply. All I had to do was fill the dir file with the
same contents as yours and everything works now.

Perhaps someone should patch this file? Or show me how to do it.

Kevin
On 2 Dec 2014 22:42, "Hwaen Ch'uqi"  wrote:

> Greetings Kevin,
>
> After much experimentation in the past, this is how I solved the
> problem. First, as root user, I used dired to enter the
> /usr/lilypond/usr/share/info directory, where all the LilyPond info
> files were placed. Then I created symbolic links for all the info
> files to the directory /usr/share/info, where info files are placed by
> default. This is accomplished at once by marking all files with `m'
> and then applying `S'. If your installation is as mine was, the dir
> file in the LilyPond info folder actually contains no entries, which
> may explain why nothing appeared in the `C-h i' menu. So I created the
> following set of entries and placed them in the dir files of both info
> directories:
>
> * LilyPond Changes: (lilypond-changes). New features in 2.18 since 2.16.
> * LilyPond Contributor's Guide: (lilypond-contributor).
> * LilyPond Essay: (lilypond-essay). Essay on automated music engraving.
> * LilyPond Extending: (lilypond-extending).
> * LilyPond Internals Reference: (lilypond-internals).
> * LilyPond Learning Manual: (lilypond-learning).
> * LilyPond Music Glossary: (music-glossary).
> * LilyPond Notation Reference: (lilypond-notation).
> * LilyPond Snippets: (lilypond-snippets).
> * LilyPond Usage: (lilypond-usage).
> * LilyPond Web: (lilypond-web).
>
> Of course, you can tailor the explanatory annotations to suit your
> needs. These steps will ensure that the entries will appear in the
> main info menu, that you will be able to follow hyperlinks, and that
> you will be able to view all the images. I hope this helps.
>
> Hwaen Ch'uqi
>
>
> On 12/2/14, Kevin Patrick Barry  wrote:
> > Dear lilypond users,
> >
> > My apologies in advance if the answer to this is already out there and I
> > just didn't find it.
> >
> > I would like to be able to access the lilypond docs in emacs using the
> > .info files.  So I downloaded the docs tarball and extracted it, and then
> > made an entry in the init file to add the folder containing the `dir'
> file
> > to the Info-default-directory-list. If I check the Info-directory-list
> > variable from emacs the folder containing the `dir' file and all the
> > lilypond .info files is in the list, but none of the files appears in the
> > main info list (C-h i) and using the lilypond-mode command to access
> > documentation just brings up the following error: `Info file lilypond
> does
> > not exist'.
> >
> > Currently I am using a workaround (C-u C-h i, and specifying a .info file
> > as the prefix) but since the documents are split up into different .info
> > files it's a bit messy.
> >
> > I am using emacs 24.3 on linux mint 17 with lilypond 2.18.2.
> >
> > Thanks in advance,
> > Kevin
> >
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


emacs and using the .info lilypond documentation

2014-12-02 Thread Kevin Patrick Barry
Dear lilypond users,

My apologies in advance if the answer to this is already out there and I
just didn't find it.

I would like to be able to access the lilypond docs in emacs using the
.info files.  So I downloaded the docs tarball and extracted it, and then
made an entry in the init file to add the folder containing the `dir' file
to the Info-default-directory-list. If I check the Info-directory-list
variable from emacs the folder containing the `dir' file and all the
lilypond .info files is in the list, but none of the files appears in the
main info list (C-h i) and using the lilypond-mode command to access
documentation just brings up the following error: `Info file lilypond does
not exist'.

Currently I am using a workaround (C-u C-h i, and specifying a .info file
as the prefix) but since the documents are split up into different .info
files it's a bit messy.

I am using emacs 24.3 on linux mint 17 with lilypond 2.18.2.

Thanks in advance,
Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond-user Digest, Vol 139, Issue 18

2014-06-06 Thread Kevin Patrick Barry
Dear Jan,

Thank you very much. I have no idea how it works, but it does!

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Changing default font size

2014-06-06 Thread Kevin Patrick Barry
Dear Federico,

Here is a minimal example. I don't know what fonts you have installed on
your system, so I put what I believe to be the default LilyPond Roman font
into the function (not that it's important). Tinkering with the values in
the "(/ staff-height pt 20)" argument doesn't seem to help. I would like
the default size in the example to be the same as the one I manually
resized with \abs-fontsize.

\version "2.18.0"


\paper {

#(define fonts (make-pango-font-tree "Century Schoolbook L" "" "" (/
staff-height pt 20)))

}


\relative {

   \textLengthOn

   c'_"default size"

   c_\markup { \abs-fontsize #10 "size 10" }

}



On 6 June 2014 14:48, Federico Bruni  wrote:

> Can you provide a minimal example?
>
>
> 2014-06-06 15:39 GMT+02:00 Kevin Patrick Barry :
>
> Dear Federico,
>>
>> Thank you for responding. I had read the section you linked (and copied
>> the code at the bottom into a style file). There are two problems: I can't
>> use an absolute font size in an override, which I need, and if I change the
>> font size in the paper block with the pango function all of the emmentaler
>> glyphs are resized also. I would like a single command, that can accept an
>> absolute font size, to only apply to Textscript. Is this possible? I don't
>> want to have to fill all the files with \abs-fontsize.
>>
>> Kevin
>>
>>
>> On Fri, Jun 6, 2014 at 1:39 PM, Federico Bruni 
>> wrote:
>>
>>>  2014-06-06 14:31 GMT+02:00 Kevin Patrick Barry :
>>>
>>>>  Dear LilyPond users,
>>>>
>>>> I would like the font in a series of files to be size 10, but I don't
>>>> want to have to put \abs-fontsize in every markup. I would prefer to put it
>>>> in my style file, but when I mess with the font sizes there, the size of
>>>> the music glyphs also changes. Is there a way to change the absolute font
>>>> size of just the textscript?
>>>>
>>>
>>> Here's explained how to change the font size of a specific object:
>>>
>>> http://lilypond.org/doc/v2.18/Documentation/notation/fonts#single-entry-fonts
>>>
>>> If you know which object to apply it to, it should work.
>>>
>>>
>>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Changing default font size

2014-06-06 Thread Kevin Patrick Barry
Dear Federico,

Thank you for responding. I had read the section you linked (and copied the 
code at the bottom into a style file). There are two problems: I can't use an 
absolute font size in an override, which I need, and if I change the font size 
in the paper block with the pango function all of the emmentaler glyphs are 
resized also. I would like a single command, that can accept an absolute font 
size, to only apply to Textscript. Is this possible? I don't want to have to 
fill all the files with \abs-fontsize.

Kevin

On Fri, Jun 6, 2014 at 1:39 PM, Federico Bruni  wrote:

> 2014-06-06 14:31 GMT+02:00 Kevin Patrick Barry :
>> Dear LilyPond users,
>>
>> I would like the font in a series of files to be size 10, but I don't want
>> to have to put \abs-fontsize in every markup. I would prefer to put it in
>> my style file, but when I mess with the font sizes there, the size of the
>> music glyphs also changes. Is there a way to change the absolute font size
>> of just the textscript?
>>
> Here's explained how to change the font size of a specific object:
> http://lilypond.org/doc/v2.18/Documentation/notation/fonts#single-entry-fonts
> If you know which object to apply it to, it should work.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Changing default font size

2014-06-06 Thread Kevin Patrick Barry
Dear LilyPond users,

I would like the font in a series of files to be size 10, but I don't want
to have to put \abs-fontsize in every markup. I would prefer to put it in
my style file, but when I mess with the font sizes there, the size of the
music glyphs also changes. Is there a way to change the absolute font size
of just the textscript?

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: precisely controlling with width of an example

2014-04-17 Thread Kevin Patrick Barry
Have you considered using lilypond-book?

Yes I have occasionally used it, but this work is for OUP and they will only 
accept eps or tiff files of musical examples. I'm not sure how lilypond-book 
would help. The author (not me) is probably submitting the work in .docx or 
some similar format.

As it happens I stopped using lilypond-book long ago for different reasons, 
which have nothing to do with the current issue.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


precisely controlling with width of an example

2014-04-17 Thread Kevin Patrick Barry
Dear LilyPond users,

I am doing musical examples for a book, and the publisher requires a
precise width of 4inches.  Is there any way to accomplish this in LilyPond?
 I can set the line-width or the paper-width to 4 inches, but in both cases
LilyPond will produce slightly wider examples to include the system start
brace, bar numbers, or instrument names.  In printed music these things
normally stray into the left margin, but I don't have that option for the
book.  For now I have to manually add a margin of the right size depending
on what kind of system delimiter there is, and how many digits there are in
the bar number, which seems clunky.  Does lilypond-book have some clever
way of avoiding this problem? I know it automatically detects the width of
the textblock.

Here is a short example of what I am trying.  Instead of a 4-inch image I
am getting 4.08 (adding a left-margin of .08 inches solves the problem).

\version "2.18.0"

#(ly:set-option 'backend 'eps)
#(ly:set-option 'aux-files #f)

\paper {
  tagline = ##f
  paper-width = 4\in
  left-margin = 0
  right-margin = 0
}

\score {
  \new PianoStaff <<
\new Staff { c'1 }
\new Staff { c'1 }
  >>
  \layout {
indent = 0
ragged-right = ##f
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: using manually installed fonts on OSX

2014-03-04 Thread Kevin Patrick Barry
Thanks for the response. I haven't been home to use my OSX machine,
but I will try when I do.  In the meantime I figured out what the
problem seems to be on Ubuntu.  At some point in the past
user-installed fonts were put in a folder called ~/.fonts, but in more
recent versions of Ubuntu they are put in ~/.local/share/fonts.
Fontconfig doesn't list this locations in fonts.conf (and I don't know
how to make it look there), so I just manually created the old
~/.fonts folder and copied the user-installed fonts into it and they
are now available in LilyPond.

On 3 March 2014 09:22, Henning Hraban Ramm  wrote:
>
> Am 2014-03-03 um 15:15 schrieb Kevin Patrick Barry :
>
>>> Do you find an entry for Cardo in the list from
>>> lilypond -dshow-available-fonts x
>>> ?
>>> Maybe it's called Cardo-Regular or the like.
>>
>> Cardo doesn't appear anywhere in the list, but I can use it just fine
>> in other programs.
>>
>> I tried it today on my Ubuntu machine and experienced the same
>> problem. I tried running fc-cache -f and then deleting the lilypond
>> font cache, but even still it doesn't appear as an option. Also I
>> can't find it anywhere on my machine, not in the usual folders
>> (/usr/share/fonts, /usr/local/share/fonts, ~/.fonts - the last one
>> doesn't even exist on my system), which makes me wonder where the
>> system put it at all. Normal file searches yield nothing.
>
> Ok, check your ~/.fonts.conf (might be also ~/.config/fontconfig/fonts.conf), 
> mine on OSX looks like this:
>
> 
> 
> 
> 
> ~/.fonts.cache-1
>
> /System/Library/Fonts
> /Library/Fonts
> ~/Library/Fonts
> ~/FontExplorer\ X/Font\ Library
> /Library/Application\ Support/Adobe/Fonts
> ~/Library/texmf/tex
> 
>
>
>
>
> Greetlings, Hraban
> ---
> fiëé visuëlle
> Henning Hraban Ramm
> http://www.fiee.net
> http://angerweit.tikon.ch/lieder/
> https://www.cacert.org (I'm an assurer)
>
>
>
>
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: using manually installed fonts on OSX

2014-03-03 Thread Kevin Patrick Barry
> Do you find an entry for Cardo in the list from
> lilypond -dshow-available-fonts x
> ?
> Maybe it's called Cardo-Regular or the like.

Cardo doesn't appear anywhere in the list, but I can use it just fine
in other programs.

I tried it today on my Ubuntu machine and experienced the same
problem. I tried running fc-cache -f and then deleting the lilypond
font cache, but even still it doesn't appear as an option. Also I
can't find it anywhere on my machine, not in the usual folders
(/usr/share/fonts, /usr/local/share/fonts, ~/.fonts - the last one
doesn't even exist on my system), which makes me wonder where the
system put it at all. Normal file searches yield nothing.

Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


using manually installed fonts on OSX

2014-03-02 Thread Kevin Patrick Barry
Dear LilyPond users,

I have installed a font on my system (Cardo) and would like my musical
examples to use the same font as the document they will appear in.
LilyPond, however, doesn't seem to recognise that the font exists on
my system.  I can use it fine in LibreOffice, and XeTeX, and it
appears in my font book, where it is a user-installed font. Perhaps
that means it is kept somewhere that LilyPond isn't looking?

I tried running the fc-cache file in the LilyPond install, which just
returned an error, so then I removed the .lilypond-fonts.cache-2/
folder, which forced lilypond to rebuild the font cache (which took
some time). But after this the problem remains (and LilyPond defaults
to putting a sans serif font in place of Cardo).

In my googling I came across a reference to something called
fontconfig, which finds fonts on OSX apparently, but the
website/documentation for it is clearly written for people who know
something about computers (not me), and I couldn't understand any of
it.

Is there any way to get this font working in LilyPond?  It is a
TrueType font. I am using OSX 10.9.2 and LilyPond 2.18.  A minimal
example would be something like:

\relative {
  c_\markup { \override #'(font-name . "Cardo") text }
}

Thanks in advance,
Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:markup? and number?

2014-02-04 Thread Kevin Patrick Barry
> Can you please post what you have achieved so far? It's hard to guess
> without seeing your code.
>
> Marc

Sorry for the slow reply.  A small example of what I am trying follows:

#(define-markup-command (sus layout props args) (markup-list?)
   (interpret-markup layout props
   #{
 \markup \concat {
   \fontsize #-2 \number #(car args)
   \raise #0.7 \draw-line #(cons (cddr args) 0)
   \fontsize #-2 \number #(cadr args)
 }
   #}
   ))

This will produce an error since the \draw-line function needs a
number? and not a markup? If I change the data type to a list of
numbers instead of a list of markups I end up with the opposite
problem (i.e. the \draw-line is ok but not the other parts of the
function). I can work around this by specifying three arguments
separately, like this:

#(define-markup-command (sus layout props arga argb argc) (markup?
markup? number?)
   (interpret-markup layout props
   #{
 \markup \concat {
   \fontsize #-2 \number #arga
   \raise #0.7 \draw-line #(cons argc 0)
   \fontsize #-2 \number #argb
 }
   #}
   ))


But this makes the input in the file look a bit strange, and I want to
extend this function so that I will be able to draw columns of figures
as well.

Maybe I'm going about this all the wrong way?

Thank you in advance,
Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


markup? and number?

2014-02-03 Thread Kevin Patrick Barry
Dear LilyPond users,

I am trying to make a markup function that will take a list as an
argument. Some of the members of the list will be treated as markup
and some will be treated as numbers. Is there a way to convert one
type to the other?  Or am I going about this all the wrong way (I have
no idea what I'm doing).

Thank you in advance
Kevin Barry

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:emacs point-and-click on OSX

2013-12-21 Thread Kevin Patrick Barry
> (Oops, replied only to David...)
>
> Guile hasn?t been installed on my Mac (except as part of Lilypond). That
> is, the command guile didn?t work. I tried sudo port install guile, and it
> put a binary of version 1.8.8 in /opt/local/bin. Perhaps try that out.

Thanks for the suggestion. I installed the macports version of guile
and pointed lilypond-invoke-editor to it, but I still get the same
error message.

I found that someone else had a similar error message on OSX while
doing something else
(http://stackoverflow.com/questions/3805991/lilypond-mac-os-x-build-issue)
and I tried one of the proposed solutions (the library is present in
my /opt/local/lib) but it didn't have any effect.  At this point I
think I will just have to let it go.

Thanks,
Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: emacs point-and-click on OSX

2013-12-20 Thread Kevin Patrick Barry
> Once Mac Ports is installed, the following:
>
> sudo port install xpdf
>
> does install xpdf and all necessary stuff.

Thanks for this. I am getting closer, but still no cigar.  Xpdf is
working, and it is, I think, calling the lilypond-invoke-editor script
correctly when I click on a note in a pdf generated by lilypond, but I
get the following error:
"/home/gub/gub/target/tools/root/usr/bin/guile: bad interpreter: No
such file or directory"

I assume it needs this guile to run and can't find it, so I changed
the file to point to one I found in the LilyPond.app
(/Applications/LilyPond.app/Contents/Resources/bin/guile), and now I
get another error when I try to click on a link:
ERROR: In procedure dynamic-link:
ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found"

Since there is no libguile-srfi-srfi-1-v-3 I'm not sure what to do
next.  The only guile I found on the computer was the one installed in
LilyPond. Finder doesn't really seem to be able to see what's going on
in macports - maybe I should have pointed the lilypond-invoke-editor
script in that direction? There are folders called guile and guile16,
but no file called guile in either of them.

Damnit Jim I'm a musician not a magician!

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:emacs point-and-click on OSX

2013-12-19 Thread Kevin Patrick Barry
> Alternatively, you might want to try to get xdvi running on your
> system.  It's quite likely less fancy, but its configuration is simple,
> and the required file in .xdvirc in your home directory should work
> under MacOSX as well.

I feel like an idiot for asking this, but how would that help?  I
tried to open a lilypond pdf using xdvi and it responded with an
error, since it isn't a .dvi.  Can LilyPond produce .dvi files instead
of pdfs?  The only documentation that seems to mention it is the
section on lilypond-book.  I have no particular allegiance to Preview
(especially since it doesn't automatically update when I recompile),
so I don't mind using another pdf reader, but evince and xpdf (the
ones in the 2.17 documentation) are for Linux.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: emacs point-and-click on OSX

2013-12-19 Thread Kevin Patrick Barry
Dear Federico and Jacques,

Thank you both for your suggestions.  I had already set .ly files to
open in emacs by default, but it doesn't make point-and-click work.

I hadn't seen the improved documentation for the function in 2.17 (I
had read the current documentation), but I understand very little of
it.  It seems to be written for more technically knowledgeable people
than myself.  I have no idea how to configure Preview to use the
lilypond-invoke-editor script.  I looked through its preferences and
nothing about hyperlinks jumped out at me.  I was just wondering if
anybody else had made it work.  The 2.17 documentation is an
improvement, but still only provides information for people using Unix
or Linux.

Thanks anyway,
Kevin

On 19 December 2013 10:40, Federico Bruni  wrote:
> He's asking a different question, which is covered here:
> http://lilypond.org/doc/v2.17/Documentation/usage/configuring-the-system-for-point-and-click
>
> but it's mainly for linux users
> I have never had a mac so I can't help
>
>
>
> 2013/12/19 Jacques Menu 
>>
>> Hello Kevin,
>>
>> Select the icon of a .ly file, then Cmd-I (Lire les informations in the
>> french interface).
>>
>> In the window that pops up, you have a popup menu « Open with «  or
>> equivalent in your language, to select which application to use to open this
>> file by default.
>>
>> Checking the box below it allow you to set this for all .ly file, not just
>> one.
>>
>> Hope this help!
>>
>> JM
>>
>> Le 18 déc. 2013 à 22:03:52, Kevin Patrick Barry  a écrit :
>>
>> Dear LilyPond users,
>>
>> Can anyone provide me with instructions (or a link) to help me get
>> point-and-click working on OSX? I use aquamacs (i.e. emacs) to edit
>> lilypond files, and compilation/view works fine, but point and click
>> still opens the built-in LilyPond editor.  I tried searching for
>> instructions and found some old messages about it, but they are very
>> technical and I didn't understand what was involved - a lot of editing
>> browser options it seems. (I use Firefox.) Right now I'm using the
>> default pdf viewer (Preview) but I would use a different one if that
>> would make things easier.  I'm on LilyPond 2.16.2 and OSX 10.9.1.
>>
>> Thanks in advance,
>> Kevin
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>> --
>>
>> Jacques Menu
>> Ch. de la Pierre 12
>> 1023 Crissier
>>
>> mailto:imj-...@bluewin.ch
>>
>>
>>
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


emacs point-and-click on OSX

2013-12-18 Thread Kevin Patrick Barry
Dear LilyPond users,

Can anyone provide me with instructions (or a link) to help me get
point-and-click working on OSX? I use aquamacs (i.e. emacs) to edit
lilypond files, and compilation/view works fine, but point and click
still opens the built-in LilyPond editor.  I tried searching for
instructions and found some old messages about it, but they are very
technical and I didn't understand what was involved - a lot of editing
browser options it seems. (I use Firefox.) Right now I'm using the
default pdf viewer (Preview) but I would use a different one if that
would make things easier.  I'm on LilyPond 2.16.2 and OSX 10.9.1.

Thanks in advance,
Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:improving LilyPond useability

2013-12-11 Thread Kevin Patrick Barry
I just thought I'd add my thoughts to the pile (I'm responding to more
than one thread of ideas; apologies for that).

Re text editors/lilypond environments and people's first experience
with LilyPond: when I first tried LilyPond (on the advice of a friend
who had never used it) I tried it using LilyPad and the learning
manual. Although I eventually succeeded in creating a small score of
about two lines I found the process so painful (I had never worked
with plain text or any kind of code before) that I abandoned LilyPond,
and only came back to it some time later, when I became more
interested in open source software.

Either LilyPad needs to be improved, or people need to be *strongly*
encouraged to download Frescobaldi.  For LilyPad to be a good enough
(in my opinion) first editor for LilyPond files it should have syntax
highlighting. (LilyPond comes bundled with files that do this for
Emacs, so I assume it's possible? I'm not a computer programmer.)  It
should have a compilation option in a menu so that the drag and drop
process is not necessary, and it should work on each of the main
operating system types.  Assuming this is a lot of work I would say
just make people download Frescobaldi - without this program I would
definitetly not be a LilyPond user.

Re packages and modular development: I obviously don't fully
appreciate the coding implications of what has been discussed, but as
a LaTeX user the idea of making LilyPond a more stable base on which
extensions can be added seems like a brilliant idea.

I have to say that it is mildly irritating that so much of the list
have been using 2.17.xx and its changed syntax and so on, while I am
stuck on 2.16 waiting for the next stable version (I have one
mission-critical project that I can't take any risks with).

Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:columns in markup-command

2013-11-18 Thread Kevin Patrick Barry
Dear Jan and Eluze,

Thank you both for the prompt replies - they both worked!

Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


columns in markup-command

2013-11-18 Thread Kevin Patrick Barry
Dear lilypond users,

I am trying to make a lilypond command for Roman numerals with a length
property that I can override.  I have no idea what I'm doing when it comes
to scheme, and I can't seem to get a column to work properly.  The function
I am trying to write is below.  The problem is that the second #:line is
placed outside the column after it, instead of within it.  My various
attempts to force it into the column all meet with errors.  I tried using
the make-column-markup function as well to no avail.  I can do it correctly
using ordinary markup commands, but then I can't seem to introduce the
property I want to be able to modify without causing errors. Any help would
be appreciated.

Kevin

 #(define-markup-command (extender layout props) ()

#:properties ((xLength 4))

(interpret-markup layout props

(markup #:concat

("V" #:super #:column (#:line (#:number #:fontsize -2 "6"

#:raise 0.5 #:draw-line (cons xLength 0)

#:number #:fontsize -2 "5"))

(#:line (#:number #:fontsize -2 "4"

#:raise 0.5 #:draw-line (cons xLength 0)

#:number #:fontsize -2 "3"))


\relative c' {

c1_\markup { \extender }

}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Re:getting musical examples to an exact textwidth with a style file

2013-08-04 Thread Kevin Patrick Barry
>
> **
> If you put the examples inside a \book block, you can specify system
> spacing with normal lilypond commands, and the images are kept together on
> the page.
>

I tried that and ended up with a full page example instead of a cropped
system.  Does using \book mean I have to manually set the page size to the
size of the example?

For example, the following fairly minimal example compiled to a pdf of 3
pages, even though it is only a single note.  I can add a \paper block but
it's not immediately obvious how to crop the whole example.

\documentclass{article}
\begin{document}
\begin{lilypond}
\book {
  \score {
\new Staff {
  \relative f { c'1 }
}
  }
}
\end{lilypond}
\end{document}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:getting musical examples to an exact textwidth with a style file

2013-08-04 Thread Kevin Patrick Barry
>
> Have you looked at lilypond-book?  That's likely the tool of choice
> here, and it is not clear from your description that you are using it.
>
> --
> David Kastrup
>

Sorry for the delay in responding.

Yes when I first started the project (a PhD thesis) I was using
lilypond-book, but I abandoned it for a couple of reasons, the main one
being that lilypond-book placed systems too close together (it just uses a
\linebreak), and as far as I could tell I had to go messing with macros to
change that (something I know nothing about).  Seeing as lilypond-book was
just creating pdfs and including them as graphics I decided it would be
simpler if I just did that myself.  It had the beneficial side effects of
meaning that I didn't have to give every file in the project a .lytex
extension, and reducing the time it takes to have a look at what I'm doing
(lilypond-book seems to ignore the \include command).  If there's an easy
way to get the nice (default) system-system-spacing variables that lilypond
uses into lilypond-book I would consider going back to it.

I have noticed that lilypond-book doesn't suffer from the same line-width
problem that I have; looking at the code of some of its examples maybe it
has something to do with the included lilypond-book-preamble.ly?

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


getting musical examples to an exact textwidth with a style file

2013-08-03 Thread Kevin Patrick Barry
Dear Lilypond users,

I am creating musical examples for a text block with a fixed width
(100.8mm) and am trying to create a style file that I can use for all of
the examples (there will probably be a couple of hundred).  I thought I
could do this by modifying some combination of page-width, line-width,
left-margin and right-margin, but I have run into two problems:
braces/brackets, and bar numbers.

If I set the line width to be the same as the text block then the piano
braces increase the line width and the resulting file is too wide; to fix
this I have to manually set an appropriate left margin, but this margin is
different depending on whether the example begins with a brace or a
bracket, and if there are bar numbers it depends on how large the numbers
are (two digits vs three digits vs parenthesized bar numbers for examples
that start in the middle of a bar).

If, instead, I set the page-width to the width of the text block then it
doesn't use the full width unless I manually specify the margins, which
places me in the same situation as above.  I suspect I have to manually set
the left margin in every example depending on what combination of elements
appear to the left of the beginning of the staff.

An even better solution might be to leave the image slightly too wide and
make it raggedleft/flushright, so that the bracket/bar numbers reach into
the left margin of the page, but this doesn't seem to be possible in LaTeX:
using \raggedleft within the figure environment has no effect.

If anyone has any thought I'd appreciate them,
Kevin.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hairpin too short across bar line

2013-06-09 Thread Kevin Patrick Barry
The 2.16 syntax for what you want is:
\override Hairpin #'to-barline = ##f
I don't know what the 2.17 is, but it should prevent hairpins from stopping
at bar lines.

K.

On 9 June 2013 20:28,  wrote:

> Send lilypond-user mailing list submissions to
> lilypond-user@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
> lilypond-user-requ...@gnu.org
>
> You can reach the person managing the list at
> lilypond-user-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
>
>
> Today's Topics:
>
>1. Hairpin too short across bar line (Jacques Menu)
>
>
> --
>
> Message: 1
> Date: Sun, 9 Jun 2013 21:28:20 +0200
> From: Jacques Menu 
> To: "lilypond-user@gnu.org discuss" 
> Subject: Hairpin too short across bar line
> Message-ID: <299638e6-7f45-4e9e-8129-ebb615ee6...@tvtmail.ch>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello folks,
>
> I can't manage to have this hairpin continue till the first beat of
> measure 2, nor find any help on the internet:
>
> \version "2.17.19"
>
> {
> \set Staff.instrumentName = "Basson"
>
> \clef bass
> \key ees \major
> \time 4/4
>
> r2. r8 g8 \< |
> fis4 \! r2. |
>
> }
>
> The same problem occurs with 2.16.2.
> Thanks for your help!
>
> -- next part --
> A non-text attachment was scrubbed...
> Name: HairpinTooShort.pdf
> Type: application/pdf
> Size: 21851 bytes
> Desc: not available
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130609/9e5e3c58/attachment.pdf
> >
> -- next part --
>
> --
>
> Jacques Menu
> Ch. de la Pierre 12
> 1023 Crissier
>
> mailto:jacques.m...@tvtmail.ch
>
>
>
>
>
> --
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
> End of lilypond-user Digest, Vol 127, Issue 36
> **
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:many users don't know about \shape

2013-05-11 Thread Kevin Patrick Barry
>
> Or the post processing would have been done using inkscape or some
> similar tool...  At any rate, \shape is no substitute to fixing
> LilyPond's typesetting of slurs.  It's a stop-gap measure tied into a
> particular version of LilyPond and loosely tied into a particular
> version of a score.  Which may sometimes cause less work than fixups
> firmly tied into a particular printing of the score (which Inkscape
> touchup work is).  But it is still something you can't depend on.
>

I think music notation is such that people are always going to need the
ability to change the shape of slurs.  Before discovering \shape I used to
manually tweak control points to get what I wanted, which is a long and
torturous process.  If someone were to take \shape away in a future version
of LilyPond (this implication is in your post, even if unintended) I would
almost certainly not upgrade, even if significant improvements were made to
LilyPond's slurs.  I don't mean this as a slight on LilyPond's slurs, which
are beautiful for the most part, just that people are always going to need
to be able to change them.

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


latex with PNG images using lilypond-book?

2013-04-29 Thread Kevin Patrick Barry
Dear Francisco,

I'm not sure I understand what you want; is it that you want to know how to
include PNG images in a latex document?  The --png option in lilypond will
produce png images and they can be included in latex using the graphicx
package and \includegraphics{}.  Is that what you want?

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Peculiar issue with something I copied from advanced tweaks

2013-04-27 Thread Kevin Patrick Barry
Dear David,

Thank you for the quick response.  Overriding control-points instead of
after-line-breaking made it work, although I have no idea why.  I just
copied the scheme code from a page in the manual.  The only part of it I
understand is the word grob

I must admit I didn't know that \shape could be used on broken slurs (I
love that function and use it all the time - lilypond not-infrequently
draws slurs in ways I don't like).  That should save me some time in the
future.  Thank you for the 2.16 syntax (I have never used 2.17 so I don't
know it anyway).

Oh, and the music is Mendelssohn!

Thanks again,
Kevin


On 27 April 2013 13:37, David Nalesnik  wrote:

> Hi Kevin,
>
>
> On Sat, Apr 27, 2013 at 6:54 AM, Kevin Patrick Barry wrote:
>
>> Dear LilyPond users,
>>
>> I need help with a strange problem I have encountered.  I wanted to edit
>> the control points of a phrasing slur that has a line break.  I found a
>> page about this in the lilypond manual, from which I adapted the following
>> code:
>>
>> #(define (my-callback grob)
>>
>> (let* (
>>
>> ;; have we been split?
>>
>> (orig (ly:grob-original grob))
>>
>>  ;; if yes, get the split pieces (our siblings)
>>
>> (siblings (if (ly:grob? orig)
>>
>> (ly:spanner-broken-into orig)
>>
>> '(
>>
>>  (if (and (>= (length siblings) 2)
>>
>> (eq? (car (last-pair siblings)) grob))
>>
>> (ly:grob-set-property! grob 'control-points '((8.5 . 5) (11 . 7.5) (68 .
>> 7) (70.33 . 2.75))
>>
>>
>> When I added an \override PhrasingSlur #'after-line-breaking =
>> #my-callback everything looked OK in Frescobaldi (2.08, running on Ubuntu
>> 13.04), but when I engrave the file from the command line it engraves it
>> without the override (the phrasing slur appears as it did before). I made
>> sure to save changes. Even if I copy the command line from Frescobaldi it
>> will not engrave correctly. Both Frescobaldi and the command line state
>> that they are using 2.16.2 (which is the only version installed anyway).
>>
>>
>> I haven't been able to reproduce the issue in a tiny example, but I have
>> noticed that the override I used (I don't understand the scheme code) is
>> very temperamental. For example I can only get it to work when the Bar
>> number engraver is removed. In another test I was able to break it simply
>> by adding the Horizontal bracket engraver to the voice context: I use lots
>> of style files in my work (and the horizontal bracket engraver is included
>> in them) and when preparing a stand-alone version of the file to attach I
>> removed the \include and added the engraver explicity which immediately
>> caused the override to stop working.
>>
>>
>> If anyone has the patience to look into this I have attached a file which
>> reproduces the problem (I'm sorry I couldn't pare it down; there must be
>> some weird interactions that I don't understand going on). I had to leave
>> the horizontal bracket engraver out.
>>
>>
>>
> I can't address the inconsistencies you describe, though...
>
> You can get the function to work by overriding 'control-points instead of
> 'after-line-breaking.
>
> So, you can keep your function as is and write:
>
> \override PhrasingSlur #'control-points = #my-callback
>
> However, if altering 'control-points with the above line, it would be
> cleaner to have the callback return control points:
>
> #(define (my-callback grob)
>(let* (
>   ;; have we been split?
>   (orig (ly:grob-original grob))
>
>   ;; if yes, get the split pieces (our siblings)
>   (siblings (if (ly:grob? orig)
> (ly:spanner-broken-into orig)
> '(
>  (if (and (>= (length siblings) 2)
>   (eq? (car (last-pair siblings)) grob))
>  '((8.5 . 5) (11 . 7.5) (68 . 7) (70.33 . 2.75)
>
> BTW, are you aware that \shape can be used to alter broken curves as well?
>  You might consider using it since it will reflect changes in spacing.
>
> The syntax is different for 2.16 versus 2.17.  For 2.16, you'd write:
>
> \shape PhrasingSlur '( () ((0 . 0) (0 . 2) (0 . 2) (0 . 0)) )
>
> where () is equivalent to ((0 . 0) (0 . 0) (0 . 0) (0 . 0))
> indicating no change.
>
> You'll probably need to move the \shape override closer to the phrasing
> slur, though.  (Can't remember the situation with 2.16, but in 2.17 it's a
> \once \override)
>
> HTH,
> David
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Peculiar issue with something I copied from advanced tweaks

2013-04-27 Thread Kevin Patrick Barry
Dear LilyPond users,

I need help with a strange problem I have encountered.  I wanted to edit
the control points of a phrasing slur that has a line break.  I found a
page about this in the lilypond manual, from which I adapted the following
code:

 #(define (my-callback grob)

(let* (

;; have we been split?

(orig (ly:grob-original grob))

 ;; if yes, get the split pieces (our siblings)

(siblings (if (ly:grob? orig)

(ly:spanner-broken-into orig)

'(

 (if (and (>= (length siblings) 2)

(eq? (car (last-pair siblings)) grob))

(ly:grob-set-property! grob 'control-points '((8.5 . 5) (11 . 7.5) (68 . 7)
(70.33 . 2.75))


When I added an \override PhrasingSlur #'after-line-breaking = #my-callback
everything looked OK in Frescobaldi (2.08, running on Ubuntu 13.04), but
when I engrave the file from the command line it engraves it without the
override (the phrasing slur appears as it did before). I made sure to save
changes. Even if I copy the command line from Frescobaldi it will not
engrave correctly. Both Frescobaldi and the command line state that they
are using 2.16.2 (which is the only version installed anyway).


I haven't been able to reproduce the issue in a tiny example, but I have
noticed that the override I used (I don't understand the scheme code) is
very temperamental. For example I can only get it to work when the Bar
number engraver is removed. In another test I was able to break it simply
by adding the Horizontal bracket engraver to the voice context: I use lots
of style files in my work (and the horizontal bracket engraver is included
in them) and when preparing a stand-alone version of the file to attach I
removed the \include and added the engraver explicity which immediately
caused the override to stop working.


If anyone has the patience to look into this I have attached a file which
reproduces the problem (I'm sorry I couldn't pare it down; there must be
some weird interactions that I don't understand going on). I had to leave
the horizontal bracket engraver out.


I appreciate any help,

Kevin


test.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Re: grace note stem lengths

2013-03-14 Thread Kevin Patrick Barry
Dear All,

Thank you for the suggestions. Overriding the Beam positions did the trick!

Kevin


On 14 March 2013 20:43, "Torsten Hämmerle"  wrote:

> Hi Kevin,
>
> Apart from changing the Stem length-fraction (either by scheme commands or
> an accustomed \override), as soon as beams come into play, the beams, i. e.
> their positions and slopes will determine the stem lengths. That's why it's
> no use trying to override the Stem #'length.
> So, if anything else fails, as a last resort, there's always the
> possibilty to set the Beam #'position manually - this does apply to both
> grace notes and "ordinary" ones.
>
> Or, as Bill Shakespeare would have said: "It was the Beame, and not the
> Stemme."  ;)
>
> Slán,
> Torsten
>
>  *Gesendet:* Donnerstag, 14. März 2013 um 17:25 Uhr
> *Von:* "Pierre Perol-Schneider" 
> *An:* "Kevin Barry" 
> *Cc:* lilypond-user@gnu.org
> *Betreff:* Re: grace note stem lengths
>  Hi Kevin,
>
> Try this :
>
> \new Staff {
> $(add-grace-property 'Voice 'Stem 'length-fraction '2)
> \new Voice {
> \relative a' {
> s  a32 \afterGrace a { b32[ g] } a8
>  }
> }
> }
>
>
> 2013/3/14 Kevin Barry 
>
>> Dear LilyPond users,
>>
>> Occasionally I find the stem lengths of grace notes to be too long, as in
>> the following example, where the grace 32s have longer stems than the
>> normal ones (because of the slope I think):
>>
>> \version "2.16.2"
>>
>> \relative a' {
>>   s  a32 \afterGrace a { b32[ g] } a8
>> }
>>
>> I have tried to alter them with various overrides, including
>> \override Stem #'(details beamed-lengths) = #'(2)
>> but they mostly have no effect.  Only
>> \override Stem #'length-fraction = #0.5
>> sometimes works for reasons I don't really understand (the behaviour of
>> this property seems unpredictable - different values have odd effects) I
>> gather it's not for this purpose, but I was just trying everything I could
>> find in the internals manual. Could anyone shed some light?
>>
>> Kevin
>>
>>
>> __**_
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/**listinfo/lilypond-user
>>
>
>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:Turn placed between notes

2013-03-10 Thread Kevin Patrick Barry
>
> > The problem with that approach is that it does not adapt to LilyPond
> > choosing to use wider or narrower spacing depending on the page layout.
>
> The problem with the other approach is that it involves more (and more
> complex) code.
>
> Would an "\afterGrace-like" command for delayed turn be a good
> enhancement request idea?  What do you think?
>

Yes the tweak is really just a quick and dirty solution, best used when the
layout of a system isn't going to change (even then it's pretty quick to
just click on the turn in Frescobaldi and modify the value).  An \afterTurn
command would be nice, or perhaps some way of manually calling the width of
the current NoteColumn in staff spaces and multiplying that by a value (0.5
presumably).

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:Turn placed between notes

2013-03-10 Thread Kevin Patrick Barry
My preferred method for placing a turn between notes is to tweak the
X-offset, viz.

c -\tweak #'X-offset #2 \turn

and modify the value accordingly.  Seems a bit simpler than the snippet
solution (which seems to produce a smaller turn than the default
articulation?).

Kevin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\tweak not working on MultiMeasureRestText objects (bug?)

2013-02-11 Thread Kevin Patrick Barry
Dear LilyPond users,

I must admit I don't always understand the \tweak command, but I use it
often to reposition objects here and there.  As I understand it, it doesn't
seem to work on markup objects attached to whole-bar rests.  I have
attached a tiny example below.  The workaround is easy of course: just use
\once \override MultiMeasureRestText #'extra-offset, but I thought I would
mention it just in case it's a bug, or perhaps I misunderstood the \tweak
command.

\version "2.16.1"

\relative c {

R1-\tweak #'extra-offset #'(-9 . -9) _"I"
}

Regards,
Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:hidden notes causing semiquaver stems to lengthen

2013-02-11 Thread Kevin Patrick Barry
Thank you this seems to be work.

Kevin

\hideNotes  actually makes the notes, and beams and stems, transparent.
> This means they still get space reserved, they just don't print.
> Sometimes people need exactly this, but here the extra (transparent)
> beams force your visible stems to lengthen to make room.
>
> You can remove the beams and stems, etc., in this second voice entirely:
>
> bracketsa = \relative c'' {
>  \override NoteColumn #'ignore-collision = ##t
>  \override NoteHead #'transparent = ##t
>  \override Stem #'stencil = ##f
>  \override Dots #'stencil = ##f
>  \override Beam #'stencil = ##f
>  \override Flag #'stencil = ##f
>  \override Rest #'stencil = ##f
>
>  s8 c16\startGroup d b\stopGroup  }
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


hidden notes causing semiquaver stems to lengthen

2013-02-06 Thread Kevin Patrick Barry
Dear LilyPond users,

I frequently have to layer many horizontal brackets over a small number of
notes (motivic analysis), and to do this I use extra voices with hidden
notes.  Mostly this works fine, but sometimes the hidden notes cause some
odd behaviour with stem lengths in the main part.  I've pasted a tinyish
example at the end of this message which should reproduce it.

In the past I've used a variety of workarounds, such as choosing hidden
notes that are far away from the main ones (in the example below, if you
raise the hidden notes by two octaves the problem disappears, but extra
space is added above the staff), or sometimes by removing the stem stencil
of the hidden notes, but these solutions don't always work, so I'd like to
understand what's going on a bit more.  If anyone can shed some light it
would solve many problems for me.

Regards,
Kevin Barry

 \version "2.16.1"


melody = \relative c'' {

d16\startGroup e c\stopGroup d b

}


bracketsa = \relative c'' {

\override NoteColumn #'ignore-collision = ##t

\hideNotes

s8 c16\startGroup d b\stopGroup

}


\score {

\new Staff <<

\new Voice { \melody }

\new Voice { \bracketsa }

>>

}


\layout {

\context {

\Voice

\consists "Horizontal_bracket_engraver"

}

}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


weird behaviour with horizontal brackets and \include

2013-01-31 Thread Kevin Patrick Barry
Dear LilyPond users,

I believe I have encountered a complex bug involving the interaction
between horizontal brackets and outside-staff-priority. It is both obscure
and easy to work around, so it's not urgent, but I thought I would send it
here anyway.  It requires two files to reproduce. Rather than explain what
I was trying to do I'll simply paste in some tinyish examples that should
reproduce the bug (although they won't make any sense). (I am using
LilyPond 2.16.1 through Frescobaldi 2.08 on Ubuntu 12.10.)

"stylefile.ly":

 \version "2.16.1"


\layout {

\context {

\Voice

\consists "Horizontal_bracket_engraver"

}

}


"score.ly":

\version "2.16.1"


\include "stylefile.ily"

\include "stylefile.ily"


\relative c' {

c1-\tweak #'outside-staff-priority #1500 \startGroup c\stopGroup

}

The bug seems to be caused by the inclusion of the stylefile twice in the
score (this happens indirectly in my own files), however it only affects
horizontal brackets that I have tweaked the outside-staff-priority of
(nothing else, not even other horizontal brackets are affected). The bug
can be extended by adding extra \includes - each one will add another
bracket.


Regards,

Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:roman numeral chord notation

2013-01-23 Thread Kevin Patrick Barry
Dear Eric,

I don't get what you're trying to do in your example.  It looks like you're
trying to invoke the \rN outside of a markup context.  It's best used in a
lyrics context or as markup attached to a note (there don't seem to be any
in your example).

And Roman numeral notation in LaTeX is easy with math mode:
V$^4_3$
should do the trick.

I hope this helps,
Kevin Barry


Message: 7
> Date: Tue, 22 Jan 2013 19:01:23 -0800
> From: Eric Swenson 
> To: David Nalesnik 
> Cc: lilypond-user@gnu.org
> Subject: Re: roman numeral chord notation
> Message-ID:
>  n0mhutre1weo+_3kqtsmpmhzpyvcm5ybmyoovbdkgm1...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Thanks David.
>
> This appears to work fine when adding markup to a staff (as in annotating
> below the staff).  However, I'm trying to reference chords using this
> notation in text, in a music theory discussion regarding chord resolution.
>  Since this isn't within lilypond markup, I don't think I can use this.
>
> I tried the obvious in my .lytex file:
>
> \lilypondfile[quote,noindent]{rN.ly}
>
> \begin[fragment,quote,staffsize=26,verbatim]{lilypond}
>   \rN { V 4/3 }
> \end{lilypond}
>
> As well as preceeding the \rN with \markup, and both result in errors such
> as:
>
> lilypond-book --output=out --pdf bar.lytex
> lilypond-book (GNU LilyPond) 2.16.2
> Reading bar.lytex...
> Running `pdflatex' on file
> `/var/folders/4m/_ndvz2k14wj63vptwlb4fs74gn/T/tmpg_VEGR.tex' to detect
> default page settings.
>
> Dissecting...
> Writing snippets...
> Processing...
> Running lilypond...
> GNU LilyPond 2.16.2
> Processing `snippet-map--2975239498719330227.ly'
> Parsing...
> Processing `bar.lytex'
> Parsing...
> bar.lytex:29:2: error: unknown escaped string: `\rN'
>
>   \rN { V 4/3 }
> bar.lytex:29:2: error: syntax error, unexpected STRING
>
>   \rN { V 4/3 }
> bar.lytex:21:0: error: errors found, ignoring music expression
>
> {
> fatal error: failed files: "ee/lily-62b9e5aa.ly"
>
> Any suggestions?  Or should I just try to figure out the
> superscript-subscript tex macros to make this work?  Thanks.
>
> -- Eric
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypondbood package useful?

2013-01-16 Thread Kevin Patrick Barry
Hi Urs,

Since you asked for opinions I will offer mine.  I do quite a bit of work
with LaTeX and LilyPond, but I don't use lilypond-book for a couple of
reasons.

It generates a lot of extra files and folders that create clutter if you
don't direct its output to a separate folder, but when I do that, links to
other files (graphics for example) in the .tex file no longer work since
it's in a different folder now (I keep all linked files in the same folder
as the .tex file because it's on Dropbox and the full path to it is
different on different computers).

Also there is (or was?) an annoying bug whereby LilyPond doesn't take
elements to the left of the staff (instrument names and such) into account
in calculating the line-width of a system that occasionally cause systems
to spill over in the right-hand margin. In those situations I had to use
goofy workarounds to make them fit.

For those reasons I prefer to simply export images (Frescobaldi makes this
very simple) and link to them as with other graphics.  (Using a fixed
line-width in LilyPond avoids the need to scale them or anything like that.)

The main advantage I lose is lilypond-book's ability to split a single
score over page breaks when it makes for a better layout (this is possible
manually, but tedious), and if you were making a book purely of scores (but
including a written introduction, or opening remarks or other material of
that nature) I think lilypond-book is the way to go.

Ideally, invoking LilyPond in LaTeX would be rather like using, for
example, the Tikz package: the code is processed when LaTeX is run (no need
to use lilypond-book first), but given LilyPond's size and complexity
(compared to a package like Tikz) I'm not sure if that is possible.  I know
very little about programming; is it possible to get LaTeX to invoke
LilyPond on a computer where it is installed? Or would it be necessary to
create a package that included the whole LilyPond program?

Regards,
Kevin Barry



Hi list,
>
> I'm just starting my first try with lilypond-book.
> I see that I have to enter the code in my latex document, process this
> document with lilypond-book and then compile the resulting file to get
> my final pdf document.
>
> But do I see correctly that I can't compile my original file with latex
> anymore (because of the undefined environment/command)?
> I find this inacceptable, because I want to be able to compile my
> original document at any time during its development.
>
> If I didn't miss something, I will try to use the following workaround:
>
>   * Write a .sty file containing latex definitions corresponding to the
> command recognized by lilypond-book.
>   * When latex compiles the file it will then print the source code and
> a comment instead
>
> Attached you'll find a first sketch for the 'lilypond' environment (.sty
> file, test .tex file and pdf).
>
> Am I on the right track with this approach?
> Or is there something wrong with it?
> Or did I miss something, and there is already a solution?
>
> If you think that's a good idea I will complete it and suggest it as an
> enhancement to be distributed together with lilypond-book.
>
> And if it works, I would think about giving them an optional parameter
> where one can store the path to the file (resulting of a run of
> lilypond-book), so latex can display either the code or this image if
> present.
> And if that works too I'd suggest to update lilypond-book as to insert
> this additional parameter by itself, so latex would automatically use
> the generated image.
>
> And if I understand all this correctly (but chances are quite high I
> don't), I would say that this approach could make the intermediate (i.e.
> processed) .tex file obsolete (at least for latex).
> Please be patient if I'm completely off the track, but it may also be
> I'm not ...
> Wouldn't the following work:
>
>   * lilypond-book processes the original latex file as usual,
> but writes an additional parameter (the path to the generated image)
> _into the original file_ (instead of creating a new file).
>   * A latex package contains environments/commands corresponding to
> those understood by lilypond-book
>   * If that additional parameter is present, it includes the image file,
>   * otherwise it prints the source code verbatim.
>
> 
>
> As lilypond-book is written in Python I might even contribute to that
> myself.
>
> Thanks for any opinions
> Urs
>
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130116/e3b295e3/attachment.html
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: lilypondbook.sty
> Type: text/x-tex
> Size: 261 bytes
> Desc: not available
> URL: <
> http://lists.gnu.org/archive/html/lilypond-user/attachments/20130116/e3b295e3/attachment.sty
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: l

Re: png export width

2013-01-02 Thread Kevin Patrick Barry
Yes the reason I use the eps backend is that I want a cropped image -
ordinary png export produces a png of the full page even if most of it is
blank.

The -dbackend=eps is included to match Kevin's statement:
>  >  When I convert to .png (eps backend) ...
>
> This definitely proves that, as always, the devil is in the details.
> It's apparently an eps-backend issue which is solved by one of the
> patches in between 2.16.0 and 2.16.1
>
> regards,
> Hans
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


re:png export width

2013-01-02 Thread Kevin Patrick Barry
Dear Eluze,

Thank you for taking time to look into this.  I put an example at the end
of this message.  I made it as small as I could.  When I convert to .png
(eps backend) at 1200dpi it produces an image that is 4817 pixels wide
instead of the desired 4800.  I was able to produce the problem both on
Ubuntu 12.10 with LilyPond version 2.16.1 and on Windows 8, but only with
2.16.0.  Upgrading LilyPond on Windows to 2.16.1 fixed the problem (this
must be why you could not reproduce it).

Since there are no margins in the example I have to be careful to remove
elements that LilyPond normally places outside of the normal line-width
(brackets or bar numbers for example - LilyPond will place these off the
4-inch page, but they will still appear in the .png, making it wider) but
there are no such elements in the following example that I can see.

\version "2.16"


\paper {

paper-width = 4\in

left-margin = 0

right-margin = 0

}


\relative c' {

c c c c c c c c c c c c c c c c

}


Thanks in advance,

Kevin




I can't reproduce it with 2.16.1 (on windows)
>
> can you send a tiny example - including your style code and the LilyPond
> code - producing this?
>
> thanks
> Eluze
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


re: png export width

2013-01-01 Thread Kevin Patrick Barry
Thank you for responding.

My files compile with no errors.  Perhaps we are using different versions
of LilyPond? I am on 2.16.1.  I made no alterations to line-width in any of
the files linking to the style file.

I found that if I set a margin of 0.5\mm on the left that it corrects the
width of the .png to 4800 pixels.  I have no idea why it behaves like this.

Kevin

when I use your settings I get a warning
>
> /warning: margins do not fit with line-width, setting default values/
>
> is your run ok?
>
> Eluze
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


png export width

2013-01-01 Thread Kevin Patrick Barry
Dear LilyPond users/experts,

I am trying to produce images that are exactly 4 inches in width (at a
resolution of 1200 dpi).  To accomplish this I set paper width to 4\in and
left and right margins both to 0 (except for systems with brackets, when I
have to add 2mm to the left so it will appear).

When I run LilyPond on this file the produced .pdf seems to be correct, but
when I use LilyPond to generate a .png (eps backend) it adds exactly 17
pixels to the width, so I get a pixel width of 4817 instead of 4800.
Judging from the image it appears these pixels are added at the right
margin where there is a tiny white space not present in the .pdf.  The same
problem occurs with multiple files (I will add the style file code at the
end of this message).

I can probably hack the width settings until I get exactly 4800 pixels, but
I'm just wondering if there is a better way to do this.  I have tried
messing around with the line-width property, but this is only loosely
connected to the width of a system.  I am using version 2.16.1 on Ubuntu
12.10 through Frescobaldi 2.0.8.

Thanks in advance,
Kevin Barry

P.S. here is the style code I am using:

\paper {

paper-width = 4\in

paper-height = 7\in

left-margin = 0\mm

right-margin = 0

top-margin = 0

bottom-margin = 0

indent = 0

oddFooterMarkup = ##f

oddHeaderMarkup = ##f

}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Custom Time Signature

2012-12-20 Thread Kevin Patrick Barry
Dear Thomas,

Thank you for this it works perfectly.  I just wish I understood it!
 Thanks also Eluze even though I couldn't test your suggestion: I am still
on the latest stable (roll on 2.18!).

Kevin

On 20 December 2012 01:58, Thomas Morley wrote:

> doubledTimeSignature =
> \override Score.TimeSignature #'stencil =
>   #(lambda (grob)
> (let* ((stil (ly:font-get-glyph (ly:grob-default-font grob)
> "timesig.C22"))
>(staff-space (ly:staff-symbol-staff-space grob))
>(pddng (* 0.5 staff-space))
>(new-stil
>  (ly:stencil-combine-at-edge
>stil
>X
>RIGHT
>stil
>pddng)))
>   new-stil))
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Custom Time Signature

2012-12-19 Thread Kevin Patrick Barry
Dear LilyPond experts,

I would like to display the time signature 4/2 as two struck Cs next to one
another (no 'plus' sign), as in the score here:
http://petrucci.mus.auth.gr/imglnks/usimg/4/4d/IMSLP39751-PMLP02062-Schubert-Impromptu-Op90No3.pdf

The best I can do with \compoundtime is to get it to show 2/2 + 2/2, (both
numeric, with a plus sign).  I looked at a few snippets on the the LSR, but
none of them are suitable.  Could anyone please help?

Thanks in advance,
Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: preview (-d flag) padding

2012-12-06 Thread Kevin Patrick Barry
There is also an annoying bug that cuts off the bottom of a system start
bracket when there is nothing below the bottom staff.  My workaround is to
add white text under one of the notes (\tweak #'color #white _"a"), which
forces LilyPond to enlarge the image a little bit and include the bits it
cut off.

Kevin


Message: 1
> Date: Thu, 6 Dec 2012 09:06:00 -0800 (PST)
> From: Eluze 
> To: lilypond-user@gnu.org
> Subject: Re: preview (-d flag) padding
> Message-ID: <1354813560178-137274.p...@n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> Curt Siffert wrote
> > Is it at all possible to manually add a few pixels of padding to
> -dpreview
> > ?
> >
> > I am regularly running into problems with a few pixels of an image being
> > cut off.  I've reported a bug
> > (https://code.google.com/p/lilypond/issues/detail?id=2968) but since it
> > appears this issue has existed in some form or another for many years
> now,
> > I don't have high hopes that it will be resolved soon.  So I'm just
> > looking for a way to work around it manually in the meantime.  Hopefully
> > something that will work in a wide variety of snippets - some of my mine
> > have only \markup code (no staves).
>
> you can try sth like
>
> \override Clef #'[minimum-]Y-extent = #'(-5 . 3.5) for staves.
>
> for markups I did not find any problems - can you give an example!?
>
> Eluze
>
>
>
>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


arrow function

2012-11-21 Thread Kevin Patrick Barry
Dear LilyPond users,

I would like to create a function that will draw a glissando with an arrow
between two notes.  I have the beginnings of a function but I don't know
how to add properties like the arrowhead or change its size.  Also it only
works when I call the function before the first pitch (instead of after,
like a normal glissando). Any help would be appreciated.

Here is my function so far:

glissarrow = #(define-music-function (parser location glissando-event)

  (ly:music?)

  (set! (ly:music-property glissando-event
'articulations)

 (cons (make-music 'GlissandoEvent)

  (ly:music-property glissando-event
'articulations)))

glissando-event)


I need to make it such that it contains the following properties/overrides:

\override Glissando #'(bound-details right arrow) = ##t

\override Glissando #'arrow-length = #0.6

\override Glissando #'arrow-width = #0.25


Thanks in advance,


Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: roman numerals

2012-11-21 Thread Kevin Patrick Barry
Thank you for the updated code; I can put an accidental in front of
the numeral now just fine, but I can't seem to put one next to any of
the numerals, or on its own (for altering the third above the bass).
I tried various combinations of the following and the output either
gave errors or printed the letters 's,' 'f,' or 'n' instead of the
relevant accidentals:

\markup \rN { sIV  f7 s5 }
or
\markup \rN { sIV  7f 5s }
or
\markup \rN { sIV  f 7 5 s }
or even \rN { V n } seems to not work.

Perhaps I have misunderstood the syntax?  I am also a theory teacher
and the time saved would be very helpful!

I agree about the problems with lyrics and with figured bass.
LilyPond has quite nice figured bass (with options for stroked figures
and everything like that) so it would be nice if one were able to
place figured bass columns next to roman numerals somehow, but it
doesn't sound straightforward...

As an aside; I have a problem with figured bass whenever I need to
indicate suspensions (like a 4-3 suspension, or a 9-8), which are
generally indicated with extender lines from a figure under one note
to a figure under another.  It is possible to 'trick' LilyPond into
drawing extender lines by adding extra figures in between to create
the lines, but then the spacing is usually ruined, and the extender
lines stop far short of where I would like.  But this is a requirement
of music theory/analysis and not performance, so I have just assumed I
will never see it.  I mention it just on the off chance that you also
have a clever solution for it :)

Kevin

On 21 November 2012 12:36, David Nalesnik  wrote:
> Hi Kevin,
>
> On Wed, Nov 21, 2012 at 5:00 AM, Kevin Patrick Barry  wrote:
>>> Message: 2
>>> Date: Wed, 21 Nov 2012 11:04:48 +0100
>>> From: David Kastrup 
>>> To: lilypond-user@gnu.org
>>> Subject: Re: roman numerals
>>> Message-ID: <87sj83jmpr@fencepost.gnu.org>
>>> Content-Type: text/plain
>>>
>>> Michael Rivers  writes:
>>>
>>>> Sweet! Thank you so much for that code, and thank you to whoever wrote it.
>>>> Open source is amazing.
>>>
>>> "Dunno who I stole this from" does not meet the licensing criteria for
>>> either Open Source or Free Software.
>>>
>>> --
>>> David Kastrup
>>
>> I hope you're joking!
>>
>> I also used that code for a while (I think David Nalesnik wrote it, or
>> at least updated it at some point?),
>
> Yup, I wrote it way back when.  I've since improved it a bit, and I
> need to upload these changes to the LSR (which Mike S. is quoting
> above) when I get it all finalized.  Ultimately, I'd like to see this
> kind of support in the codebase.  As a theory teacher, I have used
> this function many many times.  One of my long-term goals has been to
> work on this project--to take this from a snippet, and make a viable
> part of the program.  The big issue to resolve (other than the best
> way to parse the user input) is how this all would interact with
> LilyPond's figured-bass capabilities.
>
>> but it has a few limitations that
>> break it for me, namely that I can't put an accidental in front of the
>> Roman numeral (although it suggests I should be able to do this),
>
> You can do this no problem.  Just write:
>
> \markup \rN { fII 6 }
>
> or
>
> \markup \rN { fA 6 }
>
> Possibly you're using an older version?  (I know several versions are
> out there,)
>
> The version for which this certainly works is available here:
>
> http://www.mail-archive.com/lilypond-user@gnu.org/msg69861/rN.ly
>
>
>> and
>> that it is limited to two figures per numeral (I frequently need
>> three, sometimes more).
>
> Three or more figures aren't a problem.  I've got that
> working--somewhere.  As soon as I get this all together, I'll update
> that snippet on the LSR.
>
>>
>> It is possible to do Roman numerals using only markup commands.  I
>> don't get them to look as good as the rN code, but the results are
>> more flexible.  Here's a deliberately convoluted example (in case
>> anyone else has similar needs to my own):
>>
>
> Yes, the \rN command is simply an aid to creating a complex markup,
> which is immensely tedious if you churn this sort of analysis out and
> want the symbols to look like they do in the theory texts.
>
>
>> I find the alignment under notes is best when the numerals are in a
>> lyrics context, but ordinary markup above or below works well enough
>> also.
>>
>
> This brings up another struggling point.  There are slight differences
> in the appearances of the markups depending on whether you use them
> inside or outside a Lyrics context.  Possibly I'm splitting hairs
> here, but I'd like to resolve this.
>
> HTH,
> David
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: roman numerals

2012-11-21 Thread Kevin Patrick Barry
> Message: 2
> Date: Wed, 21 Nov 2012 11:04:48 +0100
> From: David Kastrup 
> To: lilypond-user@gnu.org
> Subject: Re: roman numerals
> Message-ID: <87sj83jmpr@fencepost.gnu.org>
> Content-Type: text/plain
>
> Michael Rivers  writes:
>
>> Sweet! Thank you so much for that code, and thank you to whoever wrote it.
>> Open source is amazing.
>
> "Dunno who I stole this from" does not meet the licensing criteria for
> either Open Source or Free Software.
>
> --
> David Kastrup

I hope you're joking!

I also used that code for a while (I think David Nalesnik wrote it, or
at least updated it at some point?), but it has a few limitations that
break it for me, namely that I can't put an accidental in front of the
Roman numeral (although it suggests I should be able to do this), and
that it is limited to two figures per numeral (I frequently need
three, sometimes more).

It is possible to do Roman numerals using only markup commands.  I
don't get them to look as good as the rN code, but the results are
more flexible.  Here's a deliberately convoluted example (in case
anyone else has similar needs to my own):

\version "2.16"

\relative c' {
  c_\markup {
\concat {
  \null \raise #0.8 \override #'(font-size . -3) \sharp IV \super {
\override #'(baseline-skip . 1.0) \column {
  \line { \null \raise #0.3 \override #'(font-size . -7) \flat 7 }
  \line { \null \raise #0.5 \override #'(font-size . -7) \sharp 5 }
  \line { \null \raise #0.5 " " \override #'(font-size . -6) \natural }
}
  }
}
  }
}

Apologies if the indentation is wrong - I really don't know what I'm
doing.  This example, which is about as elaborate as most Roman
numerals can get, is a longhand version - I put the various
accidentals into a separate file as macros to save time and space.  If
I knew Scheme, or even just LilyPond a bit better I might be able to
automate the process further.

I find the alignment under notes is best when the numerals are in a
lyrics context, but ordinary markup above or below works well enough
also.

Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:Problem with remove bar number/ why I'm not upgrading to the new stable version

2012-10-27 Thread Kevin Patrick Barry
Dear LilyPond users,

I have found the recent debate about the difficulty of using LilyPond
interesting and would like to offer my experience, as someone who has
been using it for about six months.  I apologise if this is a bit
long.

For the most part I use LilyPond to do musical examples, for theory
classes I teach at University, and for my forthcoming thesis.  In
general I have been able to figure out solutions to most problems I
encounter, inspite of the fact that LilyPond is not very kind when you
try to reduce lots of music to two staves and then cover it with
annotations so someone else can understand it.  Finale and Sibelius
are much easier for editorial stuff than LilyPond, but they don't look
nearly as good, so I'm determined to persevere.

In this past week I was asked to do the typesetting for a forthcoming
book which will be about 40% musical examples (I have done typesetting
for books before, in Finale, with which I am fairly proficient).
Naturally this was an opportunity to sell LilyPond (especially since
Finale or Sibelius scores look worse and worse as they get smaller).
I sent the editor a link to the LilyPond 'essay' and she was sold
enough to consider it even though it may take more time.  As a test I
did one full page of examples in LilyPond (of which there will be
maybe 90 in total in the book), and it was inhumanly difficult.
Having to produce another (dead) author's idiosyncrasies without
licence to compromise is hard in any software, but I have to say it
was much tougher in LilyPond than Finale, where one can simply drag
things around.  The result is that the editor is, at the time of
writing, reconsidering Finale (which is a shame - in a book with so
much music LilyPond would make a real positive difference, but the
battle is not lost yet).

Sibelius is the software taught in the University here, but the recent
shenanigans involving Avid, and the rise in the culture of BYOD and
open source, have put the staff off continuing with it.  I have some
influence, and was asked about LilyPond, but I could not recommend it
(my view was to wait for MuseScore 2.0), mainly since it is not
well-suited to either of the two most common activities for this
software by students: doing musical examples for essays or other
homework, and composing (hitting a play button, changing a note you
don't like and hitting play again; hearing sampled instruments without
having to export to other software etc.).  I don't know what to say
about these things - the former can be helped, but perhaps not the
latter.

Either way, LilyPond's capacity to change is surely not something to
be negative about.  And the best way to effect it is probably through
this mailing list.  Perhaps I am a niche user who's interests will not
make their way into the programme.  The saving grace for me will be
the mailing list.  In the last two days I asked two questions; one had
two answers within a matter of two hours, and the other was answered
in an astonishing 17 minutes (my thanks to David and Harm) - try
getting that kind of helpfulness from a company who's product you have
bought!  You don't have to be one of the power users to benefit.

Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Text spanners line break bound details

2012-10-27 Thread Kevin Patrick Barry
Dear LilyPond experts,

I would like to draw a text spanner between two notes across a system
break, with the letter 'x' at either end of the spanner.  When I try
to do this, the cloning process creates an extra letter at the end of
the first system and the beginning of the next.  I need to remove
these, but I don't know how.  I tried copying the after-line-break
expression from the difficult tweaks section of the manuals (and
substituting the desired bound-details property and value) but it
didn't have any effect when I tried to call it.

Here is a pared-down version of what I am trying to do:

\version "2.16"

\relative c'' {
  \override TextSpanner #'(bound-details left text) = x
  \override TextSpanner #'(bound-details right text) = x
  c1 \startTextSpan \break
  c \stopTextSpan
}


...and here is the modified scheme expression. I know nothing about
scheme, so maybe my attempt to alter this is ridiculous, but I
appreciate if anyone could look/help:

  #(define (my-callback grob)
   (let* (
  ;; have we been split?
  (orig (ly:grob-original grob))

  ;; if yes, get the split pieces (our siblings)
  (siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'(

 (if (and (>= (length siblings) 2)
  (eq? (car (last-pair siblings)) grob))
 (ly:grob-set-property! grob '(bound-details right text) 'x 

...\override TextSpanner #'after-line-breaking = #my-callback has no effect.

Thanks in advance,
Kevin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond-user Digest, Vol 119, Issue 90

2012-10-26 Thread Kevin Patrick Barry
Dear David and Harm,

Thank you both for the (super)quick responses - they both work perfectly!

Kevin


>> I'm not aware of a markup command which draws dashed lines, and it
>> appears that \draw-line is tied to a solid line. Its possible,
>> however, to adapt the definition of \draw-line (found in
>> scm/define-markup-commands.scm) and `make-line-stencil' (in
>> scm/stencil.scm) to create a similar command.  Here you can control
>> the thickness, length of the dashes (by overriding on and off).  I'm
>> not sure what "phase" is for.  Anyway, hope this helps!
>>
>>  \version "2.17.5"
>>
>> #(define (make-dashed-line-stencil width startx starty endx endy on off 
>> phase)
>>   (let ((xext (cons (min startx endx) (max startx endx)))
>> (yext (cons (min starty endy) (max starty endy
>> (ly:make-stencil
>>   (list 'dashed-line
>> ; thick on off dx dy phase
>> width on off (- endx startx) (- endy starty) phase)
>>   ; Since the line has rounded edges, we have to / can safely add half 
>> the
>>   ; width to all coordinates!
>>   (interval-widen xext (/ width 2))
>>   (interval-widen yext (/ width 2)
>>
>> #(define-markup-command (draw-dashed-line layout props dest)
>>   (number-pair?)
>>   #:properties ((thickness 1)
>> (on 1)
>> (off 1)
>> (phase 0))
>>   (let ((th (* (ly:output-def-lookup layout 'line-thickness)
>>thickness))
>> (x (car dest))
>> (y (cdr dest)))
>> (make-dashed-line-stencil th 0 0 x y on off phase)))
>>
>> \markup \draw-dashed-line #'(11 . 0)
>> \markup \override #'(off . 4) \override #'(on . 2) \override #'(thickness . 
>> 3)
>>   \draw-dashed-line #'(20 . 0)
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> Hi David,
>
> you were faster. :)
> Nevertheless, here's my slightly different coding (including your examples):
>
> \version "2.16.0"
>
> #(define-markup-command (draw-dashed-line layout props dest)
>   (number-pair?)
>   #:category graphic
>   #:properties ((thickness 1)
> (on 1)
> (off 1)
> (phase 0))
>   (let* ((th (* (ly:output-def-lookup layout 'line-thickness)
>thickness))
> (half-thick (/ th 2))
> (x (car dest))
> (y (cdr dest)))
> (ly:make-stencil
>   (list 'dashed-line th on off x y phase)
> (interval-widen (ordered-cons 0 x) half-thick)
> (interval-widen (ordered-cons 0 y) half-thick
>
> \markup \fill-line  {
> \column {
> \box \draw-dashed-line #'(-15 . 2)
> \box \draw-line #'(15 . 2)
> }
> }
>
> \markup \draw-dashed-line #'(11 . 0)
> \markup
>   \override #'(off . 4)
>   \override #'(on . 2)
>   \override #'(thickness . 3)
>   \draw-dashed-line #'(20 . 0)
>
>
>
> @Kevin
> See Davids post for explanations.
>
>
> Regards,
>   Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


dashed \draw-line

2012-10-25 Thread Kevin Patrick Barry
Dear LilyPond users,

I would like the markup function \draw-line to produce a dashed line, but I
can't find it in the internals reference to see what overrides to use.  I
tried TextScript #'style, Glissando #'style and \tweak #'style.  I'm just
fumbling in the dark really; none of the grobs involving lines seem to be
it, and the spanner documentation doesn't tell me which either.  Perhaps
there's some way to change the line-spanner-interface?

Thanks in advance,
Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond-user Digest, Vol 119, Issue 54

2012-10-16 Thread Kevin Patrick Barry
> Dear LilyPond Users,
>
> How should I go about producing a paper which includes musical examples? In
> the past I've exported to a high quality PNG and scaled the image down to
> the appropriate size but that inevitably ended up with musical examples
> that had different sized staff (even though I tried my best to get them as
> close as possible!) I'm talking about just a measure or two that lives
> within the text (as a "Figure 1.4", etc). Can LaTeX papers be typeset in
> LilyPond? (I noticed there was an extension for TeXShop).
>
> Thank you,
> Keehun
>

You can set the line width in LilyPond to be the same as your textwidth in
LaTeX (it depends on the options you use in LaTeX - experimentation will
get you the result you want; I use 135 normally, and 155 for documents with
the 'fullpage' package) and the resulting .png output should require no
scaling (I always output at 600 dpi - I don't know if that makes a
difference).  For incorporating musical examples into essays I have found
this preferable to using lilypond-book, which seems more suited to
producing score books.

Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond-user Digest, Vol 119, Issue 52

2012-10-16 Thread Kevin Patrick Barry
> Have you had a look at either balloon help or footnotes:
>
>
> http://lilypond.org/doc/v2.16/Documentation/notation/outside-the-staff#balloon-help
> http://lilypond.org/doc/v2.16/Documentation/notation/creating-footnotes
>
> Nick
>

Yes I use the balloons all the time (they're great).  If I could attach an
arrow to the line they produce then that would go a long way to making
things easier. The only other problem is that, since they expect markup at
the end of the line, they 'push' other staves away, preventing me from
drawing an arrow from a note on one staff to a note on another, for example.

I never considered using footnotes; I'll look into it now and see, thank
you.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


arrows

2012-10-15 Thread Kevin Patrick Barry
Dear LilyPond experts,

I apologise for the length of this message, and humbly ask for your
patience. Most of my use of LilyPond is to produce examples for theory
classes, my forthcoming dissertation, or conference papers. One absolutely
invaluable tool for explicating music is the drawing of all kinds of
arrows. In general I have managed so far using glissandi with arrowheads,
which is fine in many instances, since most arrows begin at a note, but the
need to be attached to a following note makes manipulating where the arrow
goes rather difficult. For example, if I need an arrow to point vertically
downwards from a note I have to hard code the `right X' coordinates to 2
decimal places before it looks vertical, and overstepping the mark produces
an error pointing out that I have moved the right side of the spanner
beyond the left, which places some arrows off limits. I also can't draw
arrows from a note that doesn't have one immediately following it.  I
compromise where I can.  I'm sure I'm doing it inefficiently, and I decided
to try and learn the necessary scheme to create arrows that I can more
easily manipulate, but progress with the extending manual (and the MIT
book) is too slow, so I am coming here for help. I produce maybe 10-20
examples per week, almost all of which include analytical annotations of
one kind or another, so any help you can afford me will definitely save
hours.

Here is an example of the kind of overrides I do to get vertical arrows.
 Note this is just a snippet from a large file - it won't work if you
compile it on its own since the coordinates are specific.  It takes a lot
of time to get the numbers for the X coordinate right, and if I end up
changing anything that alters layout or spacing I have to redo them.


\relative c' {

\override Glissando #'bound-details #'right #'Y = #-7

\override Glissando #'bound-details #'right #'X = #28.5

\override Glissando #'(bound-details right arrow) = ##t

\override Glissando #'arrow-length = #0.6

\override Glissando #'arrow-width = #0.25

 e1 g

g\glissando

\override Glissando #'bound-details #'right #'X = #34.57

g\glissando

\override Glissando #'bound-details #'right #'X = #40.65

g\glissando

g g

}


Some of these things could be included in the .ily files that I use for
examples, but the drawback is that they also affect ordinary glissandi.
Ideally I would like to define a function that can create arrows, but that
doesn't effect settings for other objects (glissandi are excellent for just
drawing lines between two notes). I made some progress with this (see
below) but I am fumbling around in the dark. I managed to recreate a
glissando in a scheme function, but I have no idea how to set properties or
change them. My attempts to stick properties into the following function
all meet with errors (also, why does it not seem to matter whether I
specify a glissando-event or a note-event?):


glissarrow = #(define-music-function (parser location glissando-event)

 (ly:music?)

  (set! (ly:music-property glissando-event
'articulations)

 (cons (make-music 'GlissandoEvent)

  (ly:music-property glissando-event
'articulations)))

  glissando-event)


I apologise again for being so verbose, especially about something that is
mostly just a quality-of-life issue, but I am severely time constrained. I
wonder if it might be better to just use an image editor to draw what I
want on the png files.  I really would like to be able to do these things
myself (and eventually to contribute) but the learning curve for scheme is
intimidating (at least for me!).  Thanks in advance for any help, and I
really hope I haven't overlooked an obvious answer in the documentation,
like last time :/


Kevin Barry
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\slashedGrace problem

2012-10-04 Thread Kevin Patrick Barry
Dear LilyPond users,

I am typesetting a musical example (for piano) that begins with a slashed
grace note (unslurred) in the right hand. Judging from the result I'd say
LilyPond is trying to put it in the previous bar (but I'm not an expert);
either way the result is that the lower staff begins with the wrong clef
and then changes it in the first bar of the example (perhaps it created a
staff context for a previous bar that is not in the example in order to
place the grace note in the other staff?). A tiny example is at the end of
my message. At the time of writing the only workaround I can see would be
to include the last beat of the previous bar (but there is no reason to do
this, and my supervisor would more than likely point it out to me when he
sees it). It's from an urtext score, so I have no licence to change
anything. I appreciate if anyone could tell me if I'm doing something wrong.

Regards,
Kevin Barry

\version "2.16"

<<

\new Staff {

\relative c' { \slashedGrace c8 c1 }

}

\new Staff {

\clef bass

\relative c { c }

}

>>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


interaction of duration-log=0, flags, and slurs (bug?)

2012-09-11 Thread Kevin Patrick Barry
Dear List,

Below is a tiny example that Lilypond refuses to compile (the error
message is 'std::bad_alloc').  I usually override the duration-log of
a note as a way of changing the notehead (it's for a Schenker graph),
but it seems that when I set the duration-log of a note with a flag
(eighth note or shorter) to that of a whole note (#0) and attach a
slur it causes a problem.  Changing the note to something longer than
an eighth note, or changing the override duration-log to a value
higher than #0, or removing the slur will allow the file to compile.

I guess there is some kind of odd interaction between flags and
slurred whole notes.  I know these are not things you typically find
together, but I am trying to put a whole note into the note column of
an eighth note, and it has a slur.  I will try to find a workaround; a
better way of changing noteheads would be handy!

If this is intended behaviour or there is an obvious or documented
solution I apologise for wasting people's time; otherwise I appreciate
any help anyone here could offer.

Regards,
Kevin Barry

\version "2.16"
\relative c' {
  \override NoteHead #'duration-log = #0
  c8( d)
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user