Re: how to detect position of note on stave?

2015-01-08 Thread David Nalesnik
Hi Graham,

On Wed, Jan 7, 2015 at 7:54 PM, Graham King  wrote:

>  Many thanks David,
> almost there...
>
> On Wed, 2015-01-07 at 18:09 -0600, David Nalesnik wrote:
>
> Hi Graham,
>
>
>  On Wed, Jan 7, 2015 at 4:39 PM, Graham King 
> wrote:
>
>  I'm trying to replace a note with one of two special glyphs, depending
> on the note's position on the stave:  if on the third line or above, stem
> down, otherwise stem up.  Is it possible to extend the following code to
> detect automatically (and independently of clef or transposition) which
> glyph should be chosen?
>
>
>
>  Sure--try this:
>
>
> Merged into my original example, to illustrate a problem:
>
> \version "2.19.5"
>
> #(define ((note-head-musicglyph name) grob)
> (grob-interpret-markup grob (make-musicglyph-markup name)))
>
> \score {
> \shiftDurations #-1 #0 {
> \relative c' {
> \time 4/2
> c c c c
> \once \override NoteHead #'stencil =
> #(lambda (grob)
>(let ((pos (ly:grob-property grob 'staff-position)))
>  (if (>= pos 0)
>  (note-head-musicglyph "noteheads.dM2mensural")
>  (note-head-musicglyph "noteheads.uM2mensural"
> c1 }}}
>
> This works beautifully, except when the note is on a ledger line above or
> below the stave, in which case the ledger line is lost and horizontal
> spacing goes haywire.
>

Sure does!  The problem is how the note-head-musicglyph function is called
within the stencil override, and I should have caught that.  You need to
pass the grob in the function call.

Retaining your definition as it is:


 #(define ((note-head-musicglyph name) grob)
   (grob-interpret-markup grob (make-musicglyph-markup name)))

\score {
  \shiftDurations #-1 #0 {
\relative c' {
  \time 4/2
  c c c c
  \once \override NoteHead #'stencil =
  #(lambda (grob)
 (let ((pos (ly:grob-property grob 'staff-position)))
   (if (>= pos 0)
   ((note-head-musicglyph "noteheads.dM2mensural") grob)
   ((note-head-musicglyph "noteheads.uM2mensural") grob
  c1 c' c'' }}}

%%%

You can simplify your definition of note-head-musicglyph:


#(define (note-head-musicglyph name grob)
   (grob-interpret-markup grob (make-musicglyph-markup name)))

\score {
  \shiftDurations #-1 #0 {
\relative c' {
  \time 4/2
  c c c c
  \once \override NoteHead #'stencil =
  #(lambda (grob)
 (let ((pos (ly:grob-property grob 'staff-position)))
   (if (>= pos 0)
   (note-head-musicglyph "noteheads.dM2mensural" grob)
   (note-head-musicglyph "noteheads.uM2mensural" grob
  c1 c' c'' }}}


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


Re: how to detect position of note on stave?

2015-01-08 Thread David Nalesnik
On Thu, Jan 8, 2015 at 7:31 AM, David Nalesnik 
wrote:

>
> \score {
>   \shiftDurations #-1 #0 {
> \relative c' {
>   \time 4/2
>   c c c c
>   \once \override NoteHead #'stencil =
>
>
Of course, you need to remove the \once for this example to mean anything!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: box around notes

2015-01-08 Thread David Nalesnik
Hi Marc,

On Wed, Jan 7, 2015 at 7:43 PM, MarcM  wrote:

> i tried examples in this old post but none of them compile in 2.19.15.
>

[Visible at Nabble link at bottom of message]

Yes, there have been a lot of changes to LilyPond internals since that was
written.

>
> I created a sample example.
>
> Is it possible to set the box to wrap around the notes without having to
> set
> the dimensions?
>

The thread referenced points out that you can write a function for
NoteColumn.stencil.  However, this will only encompass noteheads and
stems.  To account for the fingering numbers I think you would need to go
the way of the custom grob.  (Which, so you know, is not "orthodox"
Lily-practice.)

(The NoteColumn.stencil route would handle the vertical aspect of your
particular example, at least.)


>
> How can we move the notes so the box does not overlap with the repeat sign
> in the second example?
>
> <
> http://lilypond.1069038.n5.nabble.com/file/n170210/Screen_Shot_2015-01-07_at_8.png
> >
>

Here you can change the horizontal extent of the barline:

 \once \override Score.BarLine.X-extent = #'(-1 . 3)

Hope this helps,
David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: how to detect position of note on stave?

2015-01-08 Thread Graham King
On Thu, 2015-01-08 at 07:42 -0600, David Nalesnik wrote:
> 
> 
> 
> 
> On Thu, Jan 8, 2015 at 7:31 AM, David Nalesnik
>  wrote:
> 
> 
> 
> \score {
>   \shiftDurations #-1 #0 {
> \relative c' {
>   \time 4/2 
>   c c c c
>   \once \override NoteHead #'stencil = 
> 
> 
> 
> 
> Of course, you need to remove the \once for this example to mean
> anything! 
> 
> 

David, many thanks for this.  Part of me wonders how you achieved this
deep wizardry, and part of me is nervous of the answer :)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Vertical alignment of text added to notes.

2015-01-08 Thread Steve Lacy
Hi, I'm engraving some simple music for beginning violin students who are
learning to read music.

I would prefer if the text added to notes were vertically aligned on each
line, but by default they are quite jagged:

[image: Inline image 1]
(http://lilybin.com/to3r9r/3)

I had thought about using \lyricsmode for this purpose, but it seems like
the wrong solution to this problem.  I would prefer to be able to specify a
fixed-veritcal offset from the top of the staff (or top of skyline?) for
all special \markup.  Kind of like:

A = \markup {  <>  "A" }

and then my notes would be

relative c' { a^\A b^\B }

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


Re: Vertical alignment of text added to notes.

2015-01-08 Thread David Nalesnik
Hi Steve,

On Thu, Jan 8, 2015 at 1:11 PM, Steve Lacy  wrote:

> Hi, I'm engraving some simple music for beginning violin students who are
> learning to read music.
>
> I would prefer if the text added to notes were vertically aligned on each
> line, but by default they are quite jagged:
>
> [image: Inline image 1]
> (http://lilybin.com/to3r9r/3)
>
> I had thought about using \lyricsmode for this purpose, but it seems like
> the wrong solution to this problem.  I would prefer to be able to specify a
> fixed-veritcal offset from the top of the staff (or top of skyline?) for
> all special \markup.  Kind of like:
>
>
Try adding this line:

\override TextScript #'padding = #2

(The markups will align themselves vertically if you select a value of
padding that is large enough.)

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


Information about Parts

2015-01-08 Thread Matthew James Briggs
Hello, I just joined this list because I was searching unsuccessfully for
information about Lilypond's features for extracting and producing
individual parts from a score.  Does Lilypond have features akin to
Finale's linked-parts?

I suspect my searching was unsuccessful since the work "part" is used so
frequently in the english language.  Any urls to point me in the right
direction would be great.

Background: composer using Finale since the early 1990's.  In the past
several years I have learned some code, C#, C++, SQL, tiny bits of bash.  I
don't know Python yet but it's on my to-do list.

The idea of controlling music notation with the precision of an interpreted
text language is highly appealing and I plan to learn Lilypond soon (unless
it has, like, zero support for creating parts).

Thank you!
Matt

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


Re: Information about Parts

2015-01-08 Thread Urs Liska
To make it short: LilyPond has a totally different approach to 
"extracting" parts. And I'm sure it will serve you well.


Basically you store your music in variables (e.g. one variable for each 
"part", say "violin 1" or "soprano").
Then you put them together in a \score { } expression, stacking and 
nesting staves and putting (one or more) voices in staves.
And then you can put them in another \score  { } expression in another 
file to produce the single part.


Of course there is some practicing involved, but in the end I'm sure 
this is much more reliable and versatile than with GUI programs where 
you write a score and "extract" the parts.


HTH
Urs

Am 08.01.2015 um 22:10 schrieb Matthew James Briggs:
Hello, I just joined this list because I was searching unsuccessfully 
for information about Lilypond's features for extracting and producing 
individual parts from a score.  Does Lilypond have features akin to 
Finale's linked-parts?


I suspect my searching was unsuccessful since the work "part" is used 
so frequently in the english language.  Any urls to point me in the 
right direction would be great.


Background: composer using Finale since the early 1990's. In the past 
several years I have learned some code, C#, C++, SQL, tiny bits of 
bash.  I don't know Python yet but it's on my to-do list.


The idea of controlling music notation with the precision of an 
interpreted text language is highly appealing and I plan to learn 
Lilypond soon (unless it has, like, zero support for creating parts).


Thank you!
Matt

.mjb



___
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: Information about Parts

2015-01-08 Thread bobr...@centrum.is
Very briefly;

I think of it as building scores rather than extracting parts.  I keep my music 
definitions for all the parts in one file and then make scores, which may only 
consist of a single part.  I use an '\include' to call make the definitions 
available.  maybe this will help:

http://www.lilypond.org/doc/v2.18/Documentation/notation/including-lilypond-files

-David

- Original Message -
From: "Matthew James Briggs" 
To: lilypond-user@gnu.org
Sent: Thursday, January 8, 2015 4:10:15 PM
Subject: Information about Parts

Hello, I just joined this list because I was searching unsuccessfully for 
information about Lilypond's features for extracting and producing individual 
parts from a score. Does Lilypond have features akin to Finale's linked-parts? 

I suspect my searching was unsuccessful since the work "part" is used so 
frequently in the english language. Any urls to point me in the right direction 
would be great. 

Background: composer using Finale since the early 1990's. In the past several 
years I have learned some code, C#, C++, SQL, tiny bits of bash. I don't know 
Python yet but it's on my to-do list. 

The idea of controlling music notation with the precision of an interpreted 
text language is highly appealing and I plan to learn Lilypond soon (unless it 
has, like, zero support for creating parts). 

Thank you! 
Matt 

.mjb 


___
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: Information about Parts

2015-01-08 Thread Noeck
Hi Matt,

if you mean "part" like the music of one instrument or singer, for sure this is
possible: You can store each such part in a variable (say flute and piano) and
then you can print one of them:

\flute

or

\piano

or you can print the combined score of the two:

<<
  \flute
  \piano
>>

This is a very simple example, of course you have many more options as described
in the learning manual:
http://www.lilypond.org/doc/v2.18/Documentation/learning/scores-and-parts
or the notation reference:
http://lilypond.org/doc/v2.18/Documentation/notation/writing-parts

Btw, both come up if you search for part in the documentation:
http://lilypond.org/doc/v2.18/Documentation/learning/index

Was that what you were looking for?
Joram

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


Re: Information about Parts

2015-01-08 Thread Shane Brandes
HI Matt,

Welcome to Lilyponding. Your missive reads as though you can wrap your
head around things well enough. Sometimes it is dangerous to think
about things in terms of Finale methods. Of course parts can be
extracted. In this case, parts are a thing of formal structure. My
advice to proceed, and others might have other ways of thinking about
it and accomplishing the same goals, is this: you may write out each
individual part in its own file and use an include command in another
file that contains the total score structure for the piece in
question. Or you can simply enter in the entire part in the whole
score and then cut and paste it into its own part after you are down
constructing the full score. Either way is possible. I prefer the
first as it makes the complications of a multiple part score seem less
obnoxious. Anyway, it is also important not to confuse parts with
voices. The documentation is your friend. Please note what version you
are running as many of us use a variety of versions depending on how
comfortable we are with upgrading beyond the Operating systems default
version of the moment. In any event there are many templates to learn
from and the application Frescobaldi is very valuable for helping to
learn large scale structures.

best of luck,
Shane Brandes

On Thu, Jan 8, 2015 at 4:10 PM, Matthew James Briggs
 wrote:
> Hello, I just joined this list because I was searching unsuccessfully for
> information about Lilypond's features for extracting and producing
> individual parts from a score.  Does Lilypond have features akin to Finale's
> linked-parts?
>
> I suspect my searching was unsuccessful since the work "part" is used so
> frequently in the english language.  Any urls to point me in the right
> direction would be great.
>
> Background: composer using Finale since the early 1990's.  In the past
> several years I have learned some code, C#, C++, SQL, tiny bits of bash.  I
> don't know Python yet but it's on my to-do list.
>
> The idea of controlling music notation with the precision of an interpreted
> text language is highly appealing and I plan to learn Lilypond soon (unless
> it has, like, zero support for creating parts).
>
> Thank you!
> Matt
>
> .mjb
>
>
> ___
> 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: Information about Parts

2015-01-08 Thread Colin Campbell

On 2015-01-08 04:10 PM, Matthew James Briggs wrote:
Hello, I just joined this list because I was searching unsuccessfully 
for information about Lilypond's features for extracting and producing 
individual parts from a score.  Does Lilypond have features akin to 
Finale's linked-parts?


I suspect my searching was unsuccessful since the work "part" is used 
so frequently in the english language.  Any urls to point me in the 
right direction would be great.


Background: composer using Finale since the early 1990's. In the past 
several years I have learned some code, C#, C++, SQL, tiny bits of 
bash.  I don't know Python yet but it's on my to-do list.


The idea of controlling music notation with the precision of an 
interpreted text language is highly appealing and I plan to learn 
Lilypond soon (unless it has, like, zero support for creating parts).


Thank you!
Matt



Welcome to the community, Matt!  The best bit of advice I can give is to 
look at the introductory stuff on the website. Start with the 
Introduction itself, then follow up with the Learning Manual. Others 
have pointed out that LilyPond builds scores from parts rather than 
building scores and extracting parts, but the website stuff may help to 
clarify it.


I'm sure you'll be delighted at the kind and degree of control LilyPond 
will give you. Have fun!


Cheers,
Colin

--
I've learned that you shouldn't go through life with a catcher's mitt on both 
hands.
You need to be able to throw something back.
-Maya Angelou, poet (1928- )


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


Re: Vertical alignment of text added to notes.

2015-01-08 Thread Steve Lacy
Ah, perfect thank you very much!

On Thu, Jan 8, 2015 at 11:28 AM, David Nalesnik 
wrote:

> Hi Steve,
>
> On Thu, Jan 8, 2015 at 1:11 PM, Steve Lacy  wrote:
>
>> Hi, I'm engraving some simple music for beginning violin students who are
>> learning to read music.
>>
>> I would prefer if the text added to notes were vertically aligned on each
>> line, but by default they are quite jagged:
>>
>> [image: Inline image 1]
>> (http://lilybin.com/to3r9r/3)
>>
>> I had thought about using \lyricsmode for this purpose, but it seems like
>> the wrong solution to this problem.  I would prefer to be able to specify a
>> fixed-veritcal offset from the top of the staff (or top of skyline?) for
>> all special \markup.  Kind of like:
>>
>>
> Try adding this line:
>
> \override TextScript #'padding = #2
>
> (The markups will align themselves vertically if you select a value of
> padding that is large enough.)
>
> --David
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


overlapping articulations with slurs

2015-01-08 Thread Alex Jones
Apologies if others have solved this in the past, but I wasn’t able to find a 
solution on the list quickly.

I’m trying to write both a stopped and accented note, that is slurred to an 
open note.  I’m having trouble with the stopped and accented articulation 
occurring overtop of each other.  Additionally, some of the articulations are 
below and some are above the slur, which is weird, but legible.

Here is the code segment and resulting output.

\version "2.18.2"

\score {
\new Staff = "foo" {
\time 6/8
cis''4.->-+ (c''8) \open r8 r8
cis''4.->-+ (c''8) \open r8 r8
}
}

Note: in the context of my larger score, both instances have the overlapping + 
and > symbols.

Thanks for any help!

-akj



Untitled.pdf
Description: Adobe PDF document


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


Re: overlapping articulations with slurs

2015-01-08 Thread tisimst
Alex Jones-2 wrote
> Apologies if others have solved this in the past, but I wasn’t able to
> find a solution on the list quickly.
> 
> I’m trying to write both a stopped and accented note, that is slurred to
> an open note.  I’m having trouble with the stopped and accented
> articulation occurring overtop of each other.  Additionally, some of the
> articulations are below and some are above the slur, which is weird, but
> legible.
> 
> Here is the code segment and resulting output.
> 
> \version "2.18.2"
> 
> \score {
> \new Staff = "foo" {
> \time 6/8
> cis''4.->-+ (c''8) \open r8 r8
> cis''4.->-+ (c''8) \open r8 r8
> }
> }
> 
> Note: in the context of my larger score, both instances have the
> overlapping + and > symbols.
> 
> Thanks for any help!
> 
> -akj

Alex,

This is definitely a bug. Here's a band-aid to keep you going, though:

cis''4.->*-\tweak avoid-slur #'outside* -+ ( c''8 ) \open r8 r8

HTH,
Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/overlapping-articulations-with-slurs-tp170231p170232.html
Sent from the User mailing list archive at Nabble.com.

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


Constant sized rehersal marks?

2015-01-08 Thread Steve Lacy
Using "\set Score.markFormatter = #format-mark-circle-numbers" how would
one go about making sure that all the rehersal marks are the same size
(i.e. the radius of the circle is constant and the font inside scales to
fit, and digits are centered within the circle?).  Here's an example score
that I would like to fix:
[image: Inline image 1]
(http://lilybin.com/qurd93/2)

Additionally:
- I find that the "1" inside the first rehersal mark needs to be tweaked to
the right a little to be visually centered,
- The "10" looks unnatural and needs some kerning so the digits are as
close as the digits in "20" and "30" are
- The mark for the "2" and "20" would look better with more default padding
as the lower left of the digit almost touches the surrounding circle.

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


Re: Information about Parts

2015-01-08 Thread Matthew James Briggs
Thank you everyone for the info.  Lilypond sounds totally awesome.

Just a little more background because there may be folks here with insight
on these things (PM if not appropriate for the forum):  One of my major
goals is to generate musical material with an object-oriented
representation of musical concepts allowing textures or whole compositions
to be generated algorithmically.  I wanted to create my own object-oriented
music world instead of learning an existing library or software (partly
because I want it to be "mine" and partly because I want to get more into
software development).  I realized I would need a way to convert that world
into interoperable formats, the main options that seemed apparent to me
were MIDI and MusicXML.

I chose to go with MusicXML and decided to implement my own strong binding
of MusicXML.  That was about a year ago and I've implemented about 70% of
the MusicXML specification, but it is extremely slow going and difficult.
XSD is hard enough to learn when we're talking about simple database
schemas, and the complexity of the MusicXML specification absolutely blows
my mind.  (Note I don't think auto-generated strong-binding really works
here because the specification is so difficult that the output of the
auto-schema-strong-binding would be as difficult to use as the XSD is to
read.  I could be wrong about this...)

I'm starting to wonder if I should just skip it and learn Lilypond instead,
thus my object-oriented world could output Lilypond code instead of
MusicXML.

Alas I have to make a score or two the old fashioned way before I allow
myself to indulge further on this larger goal.

.mjb


On Thu, Jan 8, 2015 at 1:28 PM, Colin Campbell 
wrote:

> On 2015-01-08 04:10 PM, Matthew James Briggs wrote:
>
>> Hello, I just joined this list because I was searching unsuccessfully for
>> information about Lilypond's features for extracting and producing
>> individual parts from a score.  Does Lilypond have features akin to
>> Finale's linked-parts?
>>
>> I suspect my searching was unsuccessful since the work "part" is used so
>> frequently in the english language.  Any urls to point me in the right
>> direction would be great.
>>
>> Background: composer using Finale since the early 1990's. In the past
>> several years I have learned some code, C#, C++, SQL, tiny bits of bash.  I
>> don't know Python yet but it's on my to-do list.
>>
>> The idea of controlling music notation with the precision of an
>> interpreted text language is highly appealing and I plan to learn Lilypond
>> soon (unless it has, like, zero support for creating parts).
>>
>> Thank you!
>> Matt
>>
>>
> Welcome to the community, Matt!  The best bit of advice I can give is to
> look at the introductory stuff on the website. Start with the Introduction
> itself, then follow up with the Learning Manual. Others have pointed out
> that LilyPond builds scores from parts rather than building scores and
> extracting parts, but the website stuff may help to clarify it.
>
> I'm sure you'll be delighted at the kind and degree of control LilyPond
> will give you. Have fun!
>
> Cheers,
> Colin
>
> --
> I've learned that you shouldn't go through life with a catcher's mitt on
> both hands.
> You need to be able to throw something back.
> -Maya Angelou, poet (1928- )
>
>
>
> ___
> 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: box around notes

2015-01-08 Thread David Nalesnik
Hi,

On Thu, Jan 8, 2015 at 7:58 AM, David Nalesnik 
wrote:

> Hi Marc,
>
> On Wed, Jan 7, 2015 at 7:43 PM, MarcM  wrote:
>
>> i tried examples in this old post but none of them compile in 2.19.15.
>>
>
> [Visible at Nabble link at bottom of message]
>
> Yes, there have been a lot of changes to LilyPond internals since that was
> written.
>

I've rewritten that old file so that it will work with 2.19.15.   (There's
a note near the top explaining how to get it to work with current stable.)

I found that I needed to come up with separate grobs for the boxes in your
example--which encompass a single chord, a single note--and boxes which
encompass multiple chords, notes.  (This is because the first needs to be
an Item, the second a Spanner--to my understanding.)

There's a lot of code in this file.  I'd suggest that you move the
definitions to another file--say boxes.ily--and \include "boxes.ily" so you
don't have to see the mess.

I think the example should make usage pretty clear.  Note that you can do
overrides of the new grobs, just as you can with other grobs. I coopted
'padding to control the space about the box contexts.

Now, this really isn't infallible.  (For one thing, if you move the
engraver to the Staff context, dynamics get messed up.  Wish I knew why...)

Also, the boxes aren't accounted for in horizontal spacing.  You can still
fool with the bar line extent, though.

Hope you get some use out if this.

David

P.S. If anybody knows about the horizontal spacing and the issue with
dynamics, please chime in.  I'm really at a loss.  These are things that
prevent me from proposing actual LilyPond functionality :(
\version "2.19.15"

\header {
  tagline = ##f
}

#(define-event-class 'music-boxer-event 'span-event)

#(define-event-class 'box-event 'music-event)

#(define (add-grob-definition grob-name grob-entry)
   (let* ((meta-entry   (assoc-get 'meta grob-entry))
  (class(assoc-get 'class meta-entry))
  (ifaces-entry (assoc-get 'interfaces meta-entry)))
 ;; change ly:grob-properties? to list? to work from 2.19.12 back to at least 2.18.2
 (set-object-property! grob-name 'translation-type? ly:grob-properties?)
 (set-object-property! grob-name 'is-grob? #t)
 (set! ifaces-entry (append (case class
  ((Item) '(item-interface))
  ((Spanner) '(spanner-interface))
  ((Paper_column) '((item-interface
 paper-column-interface)))
  ((System) '((system-interface
   spanner-interface)))
  (else '(unknown-interface)))
  ifaces-entry))
 (set! ifaces-entry (uniq-list (sort ifaces-entry symbol1
\musicBoxerStart d8-4 g,-0 d' g, d'-4 g,-0 d' \musicBoxerEnd g,
  }

  %2
  \repeat volta 2 {
\box 1\f\fermata
\musicBoxerStart g8-3 d-0 g d g8-4 d-0 g \musicBoxerEnd d\accent
  }
}

\score {
  \new Staff \melody
}

\layout {
  \context {
\Global
\grobdescriptions #all-grob-descriptions
  }
  \context {
\Score
\consists \musicBoxerEngraver % for spans
\consists \boxEngraver
  }
}



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