Re: fingering

2018-02-22 Thread Gianmaria Lari
On 23 February 2018 at 00:53, Thomas Morley 
wrote:

> 2018-02-22 11:03 GMT+01:00 Thomas Morley :
> > 2018-02-22 10:58 GMT+01:00 Gianmaria Lari :
> >> Dear Harm,
> >>
> >> thank you for your really nice help. Your fix worked well and now your
> >> example is perfect!
> >>
> >> I hope others will take advantage of it.
> >>
> >> I copy here the final working code with a screenshot.
> >
> > Glad you like it :)
> >
> > This morning I observed a certain weakness in the code, a missing
> > safety net to be more precise.
> > I'll have a deeper look this evening. Now I have to run for my regular
> job ...
> >
> > Cheers,
> >   Harm
>
> Likely safer to check whether a stencil is present before trying to
> change it. At least it calms down my paranoia ...
>
> adjustFC =
>   \override Staff.FingeringColumn.before-line-breaking =
> #(lambda (grob)
>"Sets @code{snap-radius} of @code{FingeringColumn} to @code{3} and
> applies @code{centered-stencil} to every fingering-stencil"
>(let*  ((fingerings (ly:grob-object grob 'fingerings))
>(fingering-ls
>  (if (ly:grob-array? fingerings)
>  (ly:grob-array->list fingerings)
>  '(
>  (ly:grob-set-property! grob 'snap-radius 3)
>  (for-each
>(lambda (f)
>  (let ((f-stil (ly:grob-property f 'stencil)))
>(if (ly:stencil? f-stil)
>(ly:grob-set-property! f 'stencil
>  (centered-stencil f-stil)
>fingering-ls)))
>
> Cheers,
>   Harm
>

Ciao Harm,

tried your new safer code: it works perfectly like the previous :)
I update my snippet database :))

Thanks a lot, Gianmaria
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: autoBeam and slurs in tab

2018-02-22 Thread Federico Bruni



Il giorno gio 22 feb 2018 alle 23:51, =?iso-8859-1?b?yXJpYw==?= 
<"eric.bellocq"@yahoo.fr> ha scritto:

Hello,
slurs in polyphonic tab are badly impacted by autoBeam  Off/On
Looks related to issue #3542 but I'm not able to understand more.


It seems a context poblem. If you replace \autoBeamOn with this, it 
works again:


%\autoBeamOn
\set TabStaff.autoBeaming = ##t



My short code :

\version "2.19.60"

voiceA = {
  \time 2/4
  \voiceOne
  e'2  2
}

voiceB = {
  \voiceTwo
  e8( fis)
  \autoBeamOff
  g8( a)
  \autoBeamOn
  e8( fis) g( a)
}

\score {
  <<
\new Staff \with { \clef "G_8" }
<<
  \new Voice \voiceA
  \new Voice \voiceB
>>

\new TabStaff
<<
  \new TabVoice \voiceA
  \new TabVoice \voiceB
>>
  >>
}


Yours
Éric




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
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: fretboard diagram - string labels

2018-02-22 Thread Carl Sorensen


On 2/22/18, 5:34 PM, "Gilles van Eeden"  wrote:

Hi Carl,

your analysis sounds recognizable. I did notice that a substantial 
amount of code could be reused, e.g. the string parsing and label 
printing code. I will have to look at it again and try to wrap my head 
around lilypond data structures and scheme syntax. Thanks for sharing 
your ideas.

If you have your labels be a scheme list, rather than a string, you won't need 
to parse a string

\once \override FretBoards.fret-diagram-details.chord-steps = #'("b3" "" "R" 
"5" "b7" "")

HTH,

Carl

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


Re: fretboard diagram - string labels

2018-02-22 Thread Gilles van Eeden

Hi Carl,

your analysis sounds recognizable. I did notice that a substantial 
amount of code could be reused, e.g. the string parsing and label 
printing code. I will have to look at it again and try to wrap my head 
around lilypond data structures and scheme syntax. Thanks for sharing 
your ideas.


Regards,
Gilles

On 2018-02-22 16:16, Carl Sorensen wrote:


On 2/22/18, 1:54 AM, "Gilles van Eeden"  wrote:

Suggestions as to which external label to
 use and how to position and format this to match the fretboard diagram
 are welcome.

The code to place the labels already exists in the string label code used for 
'below-string finger numbers.  You should be able to find this in 
scm/fret-diagrams.scm.

You will need to figure out how to get the chord-step information into the data 
structure.  My first attempt would be to create a property (maybe called 
chord-steps, or chord-functions) in fret-diagram-details that is a list of 
string-count scheme strings, each of which corresponds to a label for the 
appropriate string (starting at string-count, ending at 1).  Then it would be a 
relatively straightforward process to print each of these scheme strings in the 
appropriate place below the fret-diagram string.

HTH,

Carl
 




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


Re: fretboard diagram - string labels

2018-02-22 Thread Gilles van Eeden

Hello Kieren,

thanks for the tip, I'll look into it.

Regards,

Gilles


On 2018-02-22 15:06, Kieren MacMillan wrote:

Hi Gilles,


I'm trying to create guitar fretboard diagrams like those in the attachment 
, which contain functional tone labels per string. I've been 
looking into extending the Fretboards and fret-diagram objects to incorporate string 
labels, but for now the code involved is a little over my lispless head. Suggestions 
as to which external label to use and how to position and format this to match the 
fretboard diagram are welcome.

As a [likely simpler] start, why not write a whole different context that is 
aligned below the Fretboard?

Hope that helps.
K.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info





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


Re: fingering

2018-02-22 Thread Thomas Morley
2018-02-22 11:03 GMT+01:00 Thomas Morley :
> 2018-02-22 10:58 GMT+01:00 Gianmaria Lari :
>> Dear Harm,
>>
>> thank you for your really nice help. Your fix worked well and now your
>> example is perfect!
>>
>> I hope others will take advantage of it.
>>
>> I copy here the final working code with a screenshot.
>
> Glad you like it :)
>
> This morning I observed a certain weakness in the code, a missing
> safety net to be more precise.
> I'll have a deeper look this evening. Now I have to run for my regular job ...
>
> Cheers,
>   Harm

Likely safer to check whether a stencil is present before trying to
change it. At least it calms down my paranoia ...

adjustFC =
  \override Staff.FingeringColumn.before-line-breaking =
#(lambda (grob)
   "Sets @code{snap-radius} of @code{FingeringColumn} to @code{3} and
applies @code{centered-stencil} to every fingering-stencil"
   (let*  ((fingerings (ly:grob-object grob 'fingerings))
   (fingering-ls
 (if (ly:grob-array? fingerings)
 (ly:grob-array->list fingerings)
 '(
 (ly:grob-set-property! grob 'snap-radius 3)
 (for-each
   (lambda (f)
 (let ((f-stil (ly:grob-property f 'stencil)))
   (if (ly:stencil? f-stil)
   (ly:grob-set-property! f 'stencil
 (centered-stencil f-stil)
   fingering-ls)))

Cheers,
  Harm

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


autoBeam and slurs in tab

2018-02-22 Thread Éric
Hello,
slurs in polyphonic tab are badly impacted by autoBeam  Off/On
Looks related to issue #3542 but I'm not able to understand more. 
My short code : 

\version "2.19.60"

voiceA = {
  \time 2/4
  \voiceOne
  e'2  2
}

voiceB = {
  \voiceTwo
  e8( fis)
  \autoBeamOff
  g8( a)
  \autoBeamOn
  e8( fis) g( a)
}

\score {
  <<
\new Staff \with { \clef "G_8" }
<<
  \new Voice \voiceA
  \new Voice \voiceB
>>

\new TabStaff
<<
  \new TabVoice \voiceA
  \new TabVoice \voiceB
>>
  >>
}


Yours
Éric




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Spacing between notes

2018-02-22 Thread David Wright
On Mon 19 Feb 2018 at 17:49:51 (-0700), nokel81 wrote:
> \score {
> \new Staff <<
> \new Voice = "melody" \relative g' {
> \set Score.timing = ##f
> g4( d) f \divisioMinima
>   g( a) a( g2) \divisioMinima
>   g4( c) a( a g) f( g) g2 \finalis
> }
> \new Lyrics = "one" \lyricmode {
> To you, O Lord, I lift my soul
> }
> >>
> }

Your lyrics need to be told which notes they are attached to.
Change\lyricmodeinto\lyricsto "melody"

I've not used gregorian.ly to do chanting like this, but it
seems there's still work to do on the spacing after making
this change.

Cheers,
David.

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


Re: fretboard diagram - string labels

2018-02-22 Thread Carl Sorensen


On 2/22/18, 1:54 AM, "Gilles van Eeden"  wrote:

   Suggestions as to which external label to 
use and how to position and format this to match the fretboard diagram 
are welcome.

The code to place the labels already exists in the string label code used for 
'below-string finger numbers.  You should be able to find this in 
scm/fret-diagrams.scm.

You will need to figure out how to get the chord-step information into the data 
structure.  My first attempt would be to create a property (maybe called 
chord-steps, or chord-functions) in fret-diagram-details that is a list of 
string-count scheme strings, each of which corresponds to a label for the 
appropriate string (starting at string-count, ending at 1).  Then it would be a 
relatively straightforward process to print each of these scheme strings in the 
appropriate place below the fret-diagram string.

HTH,

Carl


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


Re: fretboard diagram - string labels

2018-02-22 Thread Kieren MacMillan
Hi Gilles,

> I'm trying to create guitar fretboard diagrams like those in the attachment 
> , which contain functional tone labels per string. I've 
> been looking into extending the Fretboards and fret-diagram objects to 
> incorporate string labels, but for now the code involved is a little over my 
> lispless head. Suggestions as to which external label to use and how to 
> position and format this to match the fretboard diagram are welcome.

As a [likely simpler] start, why not write a whole different context that is 
aligned below the Fretboard?

Hope that helps.
K.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


fretboard diagram - string labels

2018-02-22 Thread Gilles van Eeden

Dear Lilyponders,

I'm trying to create guitar fretboard diagrams like those in the 
attachment , which contain functional tone labels per 
string. I've been looking into extending the Fretboards and fret-diagram 
objects to incorporate string labels, but for now the code involved is a 
little over my lispless head. Suggestions as to which external label to 
use and how to position and format this to match the fretboard diagram 
are welcome.


Best regards,

Gilles

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


Re: Local scheme variables used inside a Lilypond code block

2018-02-22 Thread David Kastrup
Paolo Prete  writes:

> The trivial example you provided doesn't use local Scheme variables
> inside the Lilypond code block of the "ritpp" function.

It is not prohibited reading the accompanying text.  Let me quote the
relevant part again:

> Let me quote from the documentation (Extending LilyPond Guide):
>
> 2.1 LilyPond code blocks
> 

[...]

> Scheme
> expressions embedded in the LilyPond code are evaluated in the lexical
> environment of the LilyPond code block, so all local variables and
> function parameters available at the point the LilyPond code block is
> written may be accessed.

You even quoted this yourself.

-- 
David Kastrup

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


Re: Local scheme variables used inside a Lilypond code block

2018-02-22 Thread Paolo Prete
The trivial example you provided doesn't use local Scheme variables inside the 
Lilypond code block of the "ritpp" function.I definied  "mypitch" and 
"myduration" inside the "scheme part" and I don't understand if I can use them 
inside the "#{ #}" scope
((mypitch (ly:music-property note 'pitch '()))    (myduration 
(ly:music-property note 'duration '(

 

Il Giovedì 22 Febbraio 2018 12:25, David Kastrup  ha scritto:
 

 Paolo Prete  writes:

> Hello,
> I try to re-post my previous question in a more generic way: is it
> possible to define local variables in a scheme function and use them
> in a lilypond code block?Something like (pseudo-code: it doesn't
> compile):
> func = #(define-music-function (parser location note) (ly:music)  
>  ((mypitch (ly:music-property note 'pitch '()))    (myduration
> (ly:music-property note 'duration '(#{   $mypitch $myduration
> .  #}  )
>
> If not, is there a work-around to obtain that?

Is there a particular reason you don't just try it out?

Let me quote from the documentation (Extending LilyPond Guide):

2.1 LilyPond code blocks


Creating music expressions in Scheme can be tedious, as they are heavily
nested and the resulting Scheme code is large.  For some simple tasks
this can be avoided by using LilyPond code blocks, which enable common
LilyPond syntax to be used within Scheme.

  LilyPond code blocks look like

      #{ LILYPOND CODE #}

  Here is a trivial example:

    ritpp = #(define-event-function () ()
      #{ ^"rit." \pp #}
    )
    
    { c'4 e'4\ritpp g'2 }
    [image src="lilypond/f3/lily-a1c2820d.png" alt="[image of music]" 
text="image of music"]

  LilyPond code blocks can be used anywhere where you can write Scheme
code.  The Scheme reader actually is changed for accommodating LilyPond
code blocks and can deal with embedded Scheme expressions starting with
‘$’ and ‘#’.

  The reader extracts the LilyPond code block and generates a runtime
call to the LilyPond parser to interpret the LilyPond code.  Scheme
expressions embedded in the LilyPond code are evaluated in the lexical
environment of the LilyPond code block, so all local variables and
function parameters available at the point the LilyPond code block is
written may be accessed.  Variables defined in other Scheme modules,
like the modules containing ‘\header’ and ‘\layout’ blocks, are not
accessible as Scheme variables, i.e.  prefixed with ‘#’, but they are
accessible as LilyPond variables, i.e.  prefixed with ‘\’.


-- 
David Kastrup

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


Re: Local scheme variables used inside a Lilypond code block

2018-02-22 Thread David Kastrup
Paolo Prete  writes:

> Hello,
> I try to re-post my previous question in a more generic way: is it
> possible to define local variables in a scheme function and use them
> in a lilypond code block?Something like (pseudo-code: it doesn't
> compile):
> func = #(define-music-function (parser location note) (ly:music)  
>  ((mypitch (ly:music-property note 'pitch '()))    (myduration
> (ly:music-property note 'duration '(#{   $mypitch $myduration
> .  #}  )
>
> If not, is there a work-around to obtain that?

Is there a particular reason you don't just try it out?

Let me quote from the documentation (Extending LilyPond Guide):

2.1 LilyPond code blocks


Creating music expressions in Scheme can be tedious, as they are heavily
nested and the resulting Scheme code is large.  For some simple tasks
this can be avoided by using LilyPond code blocks, which enable common
LilyPond syntax to be used within Scheme.

   LilyPond code blocks look like

   #{ LILYPOND CODE #}

   Here is a trivial example:

 ritpp = #(define-event-function () ()
   #{ ^"rit." \pp #}
 )
 
 { c'4 e'4\ritpp g'2 }
 [image src="lilypond/f3/lily-a1c2820d.png" alt="[image of music]" 
text="image of music"]

   LilyPond code blocks can be used anywhere where you can write Scheme
code.  The Scheme reader actually is changed for accommodating LilyPond
code blocks and can deal with embedded Scheme expressions starting with
‘$’ and ‘#’.

   The reader extracts the LilyPond code block and generates a runtime
call to the LilyPond parser to interpret the LilyPond code.  Scheme
expressions embedded in the LilyPond code are evaluated in the lexical
environment of the LilyPond code block, so all local variables and
function parameters available at the point the LilyPond code block is
written may be accessed.  Variables defined in other Scheme modules,
like the modules containing ‘\header’ and ‘\layout’ blocks, are not
accessible as Scheme variables, i.e.  prefixed with ‘#’, but they are
accessible as LilyPond variables, i.e.  prefixed with ‘\’.


-- 
David Kastrup

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


Local scheme variables used inside a Lilypond code block

2018-02-22 Thread Paolo Prete
Hello,
I try to re-post my previous question in a more generic way: is it possible to 
define local variables in a scheme function and use them in a lilypond code 
block?Something like (pseudo-code: it doesn't compile):
func = #(define-music-function (parser location note) (ly:music)    ((mypitch 
(ly:music-property note 'pitch '()))    (myduration (ly:music-property note 
'duration '(#{   $mypitch $myduration .  #}  )

If not, is there a work-around to obtain that?___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fingering

2018-02-22 Thread Thomas Morley
2018-02-22 10:58 GMT+01:00 Gianmaria Lari :
> Dear Harm,
>
> thank you for your really nice help. Your fix worked well and now your
> example is perfect!
>
> I hope others will take advantage of it.
>
> I copy here the final working code with a screenshot.

Glad you like it :)

This morning I observed a certain weakness in the code, a missing
safety net to be more precise.
I'll have a deeper look this evening. Now I have to run for my regular job ...

Cheers,
  Harm

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


Re: fingering

2018-02-22 Thread Gianmaria Lari
Dear Harm,

thank you for your really nice help. Your fix worked well and now your
example is perfect!

I hope others will take advantage of it.

I copy here the final working code with a screenshot.

\version "2.19.81"
%% returns a stencil (created by `ly:text-interface::print') within a circle
circledFingerStil =
  #(lambda (grob)
 (circle-stencil (ly:text-interface::print grob) 0.1 0.1))

%% tweak-short-cut
cFS =
  \tweak stencil \circledFingerStil
  \etc

adjustFC =
  \override Staff.FingeringColumn.before-line-breaking =
#(lambda (grob)
   "Sets @code{snap-radius} of @code{FingeringColumn} to @code{3} and
applies @code{centered-stencil} to every fingering-stencil"
   (let*  ((fingerings (ly:grob-object grob 'fingerings))
   (fingering-ls
 (if (ly:grob-array? fingerings)
 (ly:grob-array->list fingerings)
 '(
 (write grob)
 (ly:grob-set-property! grob 'snap-radius 3)
 (for-each
   (lambda (f)
 (ly:grob-set-property! f 'stencil
   (centered-stencil ((ly:grob-property-data f 'stencil) f
   fingering-ls)))

{
  %% NB FingeringColumn is created _only_ if `fingeringOrientations'
contains
  %% 'left or 'right _and_ more than one Fingering has to be placed there
  \set fingeringOrientations = #'(left)

  %% default
  1

  %% some circles around Fingerings
  1

  %% some circles around Fingerings plus adjusted FingeringColumn
  \once \adjustFC
  1
}

On 22 February 2018 at 01:09, Thomas Morley 
wrote:

> 2018-02-22 0:15 GMT+01:00 Gianmaria Lari :
> >
> >
> > On 21 February 2018 at 23:15, Thomas Morley 
> > wrote:
> >>
> >> 2018-02-21 9:29 GMT+01:00 Gianmaria Lari :
> >> >
> >> > On 20 February 2018 at 22:30, Thomas Morley  >
> >> > wrote:
> >> >>
> >> >> 2018-02-20 18:42 GMT+01:00 Gianmaria Lari :
> >> >> > On 20 February 2018 at 17:10, Robin Bannister 
> wrote:
> >> >> >>
> >> >> >>  DJF wrote:
> >> >> >>
> >> >> >>>  perhaps someone else knows if it’s possible to control the
> >> >> >>> vertical
> >> >> >>> spacing within the staff;
> >> >> >>
> >> >> >>
> >> >> >> You can splay it out using Y-offset:
> >> >> >>  1
> >> >> >
> >> >> >
> >> >> > Do you know Robin, if there is any way to avoid the "\tweak ..."
> and
> >> >> > make
> >> >> > Lilypond automatically spacing the fingering/stringNumber elements?
> >> >> >
> >> >> > Thank you, g.
> >> >>
> >> >>
> >> >>
> >> >> How about:
> >> >>
> >> >> \version "2.19.81"
> >> >>
> >> >> circledFingerStil =
> >> >>   #(lambda (grob)
> >> >>  (circle-stencil (ly:text-interface::print grob) 0.1 0.1))
> >> >>
> >> >> \fixed c' {
> >> >>   \set fingeringOrientations = #'(left)
> >> >>
> >> >>>> >>b-\tweak stencil \circledFingerStil-3
> >> >>d'-4>1
> >> >>
> >> >>   \override Fingering.stencil = \circledFingerStil
> >> >>   1
> >> >> }
> >> >>
> >> >> There _is_ some buit-in code which avoids collisions of Fingering,
> but
> >> >>  it does not work for StringNumbers or a mix of Fingerings and
> >> >> StringNumbers, afaik.
> >> >>
> >> >> Cheers,
> >> >>   Harm
> >> >
> >> >
> >> > Ciao Harm,
> >> > thanks a lot for your code! It works very well.
> >> >
> >> > But I also have some questions.
> >> >
> >> > The circled and uncircled fingering are not horizontally aligned. Is
> >> > there
> >> > any way to align them?
> >> >
> >> > Is there any way to make the more easy to manage? I can write
> something
> >> > like
> >> > this
> >> >
> >> >>> >b-\tweak stencil \circledFingerStil-3
> >> >d'-4>1
> >> >
> >> > just to test an idea but I don't want to use it in a real score.
> >> > Is there any way to reduce/encapsulate it to something less intrusive?
> >> >
> >> > Thank you!
> >> > G.
> >>
> >> Hi,
> >>
> >> try:
> >>
> >> \version "2.19.81"
> >>
> >> %% returns a stencil (created by `ly:text-interface::print') within a
> >> circle
> >> circledFingerStil =
> >>   #(lambda (grob)
> >>  (circle-stencil (ly:text-interface::print grob) 0.1 0.1))
> >>
> >> %% tweak-short-cut
> >> cFS =
> >>   \tweak stencil \circledFingerStil
> >>   \etc
> >>
> >> adjustFC =
> >>   \override Staff.FingeringColumn.before-line-breaking =
> >> #(lambda (grob)
> >>"Sets @code{snap-radius} of @code{FingeringColumn} to @code{3}
> and
> >> applies @code{centered-stencil} to every fingering-stencil"
> >>(let*  ((fingerings (ly:grob-object grob 'fingerings))
> >>(fingering-ls
> >>  (if (ly:grob-array? fingerings)
> >>  (ly:grob-array->list fingerings)
> >>  '(
>
> Please delete next line, it was a debugging aid
> >>  (write grob)
> >>  (ly:grob-set-property! grob 'snap-radius 3)
> >>  (for-each
> >>(lambda (f)
> >>  (ly:grob-set-property! f 'stencil
> >>(centered-stencil ((ly:grob-property-data f 'stencil)
> f
> >>

Re: Fermatas with tremolos

2018-02-22 Thread N. Andrew Walsh
Late to the party, but you asked:

On Mon, Feb 19, 2018 at 11:47 PM, Thomas Morley 
wrote:

>
> https://forums.makemusic.com/viewtopic.php?f=12&t=2065&sid=
> 70206c7b17c9cd8107c4ad1250073f0c
> But not discussing how it _should_ be done.
> I don't have Gould at hand, does she says anything about it?
>
>
Gould:189 discusses fermata placement: they are to be centered over the
tremolo beams, inside slurs in two-voice writing, outside and above the
stave otherwise. It would be nice if there were a way to attach the fermata
to the tremolo as a whole and do this placement automatically.

Likewise, in a project I'm working on with Urs Liska, we're having to do a
lot of extra code to get proper fermatas on the final barlines of score
sections, which I would also like to see as something that … doesn't need
all that extra code.

Cheers,

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


Re: End of file event

2018-02-22 Thread Maurits Lamers
Hi,

The situation is that I want to write out my statistical info collected during 
the score block processing to an external CSV.
In my case students are given a lilypond file template which they need to use. 
This template contains a single score block in which they need to put their 
work.
However, some students are rather creative, and spread out the same work over 
multiple score blocks. 

It is very unlikely that they will use book for structuring and in the rare 
case that might happen I can always edit it out manually.
So, it looks like wrapping the toplevel-book-handler and adding my own stats 
writing will be exactly what I need.

Thanks a lot!

cheers

Maurits

> Op 22 feb. 2018, om 10:00 heeft David Kastrup  het volgende 
> geschreven:
> 
> Maurits Lamers  writes:
> 
>> Hi, 
>> 
>> Thanks for your suggestion! Do I understand from your reply that you
>> don't think there is a dynamic option, ie without adjusting the
>> lilypond code being processed?
>> 
>> To clarify the context a bit: what I am doing is reviewing homework by
>> students. This means that I am running my reviewer script (lilypond
>> file with embedded guile with event listeners) as a side-load script
>> through the -dinclude-settings option on the lilypond code files they
>> provided.
>> It is of course possible to preprocess the input files by appending
>> such a scheme call (automatically). If I can have a dynamic option
>> (such as listening to an event), I would rather like to have that
>> option as it reduces the amount of things that can go wrong during
>> processing.
> 
> All of the processing of top level expressions (also book level
> expressions) is done through hooks.  You can replace those hooks with
> your own, call the underlying function yourself, and then work with
> stats.  It will still not give you an "end-of-file" hook, though.
> However, if they don't use books for structuring the input, all
> collected scores at the end of file are placed into one book and
> processed then, so the book processing hook might still be good for you.
> 
> The respective hooks are set with
> 
> ly/declarations-init.ly:#(define toplevel-book-handler 
> print-book-with-defaults)
> ly/declarations-init.ly:#(define toplevel-bookpart-handler 
> collect-bookpart-for-book)
> ly/declarations-init.ly:#(define toplevel-music-handler 
> collect-music-for-book)
> ly/declarations-init.ly:#(define toplevel-score-handler 
> collect-scores-for-book)
> ly/declarations-init.ly:#(define toplevel-text-handler 
> collect-scores-for-book)
> 
> 
> -- 
> David Kastrup


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


Re: End of file event

2018-02-22 Thread David Kastrup
Maurits Lamers  writes:

> Hi, 
>
> Thanks for your suggestion! Do I understand from your reply that you
> don't think there is a dynamic option, ie without adjusting the
> lilypond code being processed?
>
> To clarify the context a bit: what I am doing is reviewing homework by
> students. This means that I am running my reviewer script (lilypond
> file with embedded guile with event listeners) as a side-load script
> through the -dinclude-settings option on the lilypond code files they
> provided.
> It is of course possible to preprocess the input files by appending
> such a scheme call (automatically). If I can have a dynamic option
> (such as listening to an event), I would rather like to have that
> option as it reduces the amount of things that can go wrong during
> processing.

All of the processing of top level expressions (also book level
expressions) is done through hooks.  You can replace those hooks with
your own, call the underlying function yourself, and then work with
stats.  It will still not give you an "end-of-file" hook, though.
However, if they don't use books for structuring the input, all
collected scores at the end of file are placed into one book and
processed then, so the book processing hook might still be good for you.

The respective hooks are set with

ly/declarations-init.ly:#(define toplevel-book-handler print-book-with-defaults)
ly/declarations-init.ly:#(define toplevel-bookpart-handler 
collect-bookpart-for-book)
ly/declarations-init.ly:#(define toplevel-music-handler collect-music-for-book)
ly/declarations-init.ly:#(define toplevel-score-handler collect-scores-for-book)
ly/declarations-init.ly:#(define toplevel-text-handler collect-scores-for-book)


-- 
David Kastrup

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