Re: A visible stencil for a NoteColumn grob

2019-12-29 Thread Thomas Morley
Am Mo., 30. Dez. 2019 um 00:45 Uhr schrieb Paolo Prete :
>
> Hello.
>
> 1) How can  I associate a stencil to a NoteColumn grob?
> I would like to show a vertical line in correspondence of it, but it seems 
> that
>
> \override NoteColumn.stencil ... has no effect.

{
  \override NoteColumn.stencil =
  #(lambda (grob)
(grob-interpret-markup grob "foo"))
  b4
}

works for me.
Whether it's a good idea to do so, is a different question...

>
> 2) is it possible to associate an output-attributes list to the NoteColumn 
> grob, as well (so that it appears on the corresponding svg tag)?
> I don't mean a property of the NoteHead, or Stem etc.: I mean a property of 
> the NoteColumn (invisible) grob

At least the following works for me as well

{
  \override NoteColumn.output-attributes = #'(xy)
  \override NoteColumn.after-line-breaking =
  #(lambda (grob)
(write (ly:grob-property grob 'output-attributes)))
  b4
}

not tested with svg, though.

HTH,
  Harm



Re: Frescobaldi Quick key for Lily button

2019-12-29 Thread Freeman Gilmore
Urs, et al.
Thank you,
ƒg

On Sun, Dec 29, 2019 at 6:22 PM Urs Liska  wrote:

> Am Sonntag, den 29.12.2019, 10:44 -0500 schrieb Freeman Gilmore:
> > In Frescobaldi is there a quick key that can be used in place of
> > the Lily button?
>
> There are a number of preset shortcuts to trigger LilyPond
> compilations:
>
> * Ctrl+M
>   Regular compilation *with* point-and-click
> * Ctrl+P
>   "Publish" compilation without point-and-click
> * Ctrl+Shift+M
>   Open the custom compilation dialog
>
> > And one that will also clear the Music View or better one that would
> > do both?The problem is that the old view may not be updated when
> > you compile something that doe not show an error message.
>
> This is intended behaviour since usually you'd want to still see the
> score when compilation has failed.
>
> > I would like a quick way to clear the Music View.
> >
>
> That sounds like a reasonable feature request.
> Added as https://github.com/frescobaldi/frescobaldi/issues/1235
>
> Best
> Urs
>
> > Thank you,
> > ƒg
>
>


A visible stencil for a NoteColumn grob

2019-12-29 Thread Paolo Prete
Hello.

1) How can  I associate a stencil to a NoteColumn grob?
I would like to show a vertical line in correspondence of it, but it seems
that

\override NoteColumn.stencil ... has no effect.

2) is it possible to associate an output-attributes list to the NoteColumn
grob, as well (so that it appears on the corresponding svg tag)?
I don't mean a property of the NoteHead, or Stem etc.: I mean a property of
the NoteColumn (invisible) grob

http://lilypond.org/doc/v2.19/Documentation/internals/notecolumn

Thanks,
Paolo


Re: Frescobaldi Quick key for Lily button

2019-12-29 Thread Urs Liska
Am Sonntag, den 29.12.2019, 10:44 -0500 schrieb Freeman Gilmore:
> In Frescobaldi is there a quick key that can be used in place of
> the Lily button?   

There are a number of preset shortcuts to trigger LilyPond
compilations:

* Ctrl+M
  Regular compilation *with* point-and-click
* Ctrl+P
  "Publish" compilation without point-and-click
* Ctrl+Shift+M
  Open the custom compilation dialog

> And one that will also clear the Music View or better one that would
> do both?The problem is that the old view may not be updated when
> you compile something that doe not show an error message.  

This is intended behaviour since usually you'd want to still see the
score when compilation has failed.

> I would like a quick way to clear the Music View.
> 

That sounds like a reasonable feature request.
Added as https://github.com/frescobaldi/frescobaldi/issues/1235

Best
Urs

> Thank you,
> ƒg




Re: Frescobaldi Quick key for Lily button

2019-12-29 Thread Urs Liska
Am Sonntag, den 29.12.2019, 10:44 -0500 schrieb Freeman Gilmore:
> In Frescobaldi is there a quick key that can be used in place of
> the Lily button?   

There are a number of preset shortcuts to trigger LilyPond
compilations:

* Ctrl+M
  Regular compilation *with* point-and-click
* Ctrl+P
  "Publish" compilation without point-and-click
* Ctrl+Shift+M
  Open the custom compilation dialog

> And one that will also clear the Music View or better one that would
> do both?The problem is that the old view may not be updated when
> you compile something that doe not show an error message.  

This is intended behaviour since usually you'd want to still see the
score when compilation has failed.

> I would like a quick way to clear the Music View.
> 

That sounds like a reasonable feature request.
Added as https://github.com/frescobaldi/frescobaldi/issues/1235

Best
Urs

> Thank you,
> ƒg




Re: Lyrics on rest question

2019-12-29 Thread Jacques Menu
Hello Aaron,

Thanks a lot for your hints, the third one is the right way to go for me.

JM



%

\version "2.19.83"
% automatically converted by musicxml2ly from SyllableOnRest_musicxml2ly.xml


\header {
  title =  "Syllable on rest"
}


PartPOneVoiceOne =  \relative e' {
  \clef "treble" \key c \major \time 2/4 | % 1
  \stemUp e4. ^\markup{ \bold {Allegro} } r8 | % 2
  \stemUp d8 -\mf \stemUp d4 \stemUp e8 \break | % 3
  r8 \stemUp e8 [ \stemUp f8 \stemUp a8 ]
}

PartPOneVoiceOneLyricsOne =  \lyricmode {
  \set ignoreMelismata = ##t
  \skip4. \skip8 \skip8 "Syll.1"4 "Syll.2"8 "Syll.3"8 "Syll.4"8 "Syll.5"8
  "Syll.6"8
}


% The score definition
\score {
  <<

\new Staff
<<

  \context Staff <<
%\mergeDifferentlyDottedOn\mergeDifferentlyHeadedOn
\context Voice = "PartPOneVoiceOne" {  \PartPOneVoiceOne }
\new Lyrics
   % \lyricsto "PartPOneVoiceOne"
{ \set stanza = "1." \PartPOneVoiceOneLyricsOne }
  >>
>>

  >>
  \layout {}
  % To create MIDI output, uncomment the following line:
  %  \midi {\tempo 4 = 92 }
}

%





> Le 28 déc. 2019 à 23:46, Aaron Hill  a écrit :
> 
> On 2019-12-28 2:39 pm, Jacques Menu wrote:
>> How can the « "Syll.3" » lyric be placed under the eigth rest at the
>> beginning of measure 3 to obtain the same result with Lily as with the
>> others?
> 
> A couple options I can think of:
> 
> 1) Hidden pitch in the \lyricsto voice context; place the rest in a 
> simultaneous voice.
> 2) Use \lyricsto with a NullVoice that has the timing you want.
> 3) Use explicit durations in the Lyrics; do not use \lyricsto.
> 
> 
> -- Aaron Hill
> 



Re: Frescobaldi Quick key for Lily button

2019-12-29 Thread Malte Meyn




Am 29.12.19 um 16:44 schrieb Freeman Gilmore:
In Frescobaldi is there a quick key that can be used in place of 
the Lily button?


Yes, it’s Ctrl+M.

   And one that will also clear the Music View or better
one that would do both?    The problem is that the old view may not be 
updated when you compile something that doe not show an error message.  
I would like a quick way to clear the Music View.


I don’t know a shortcut for clearing music view but maybe Ctrl+E to show 
the error log (and highlighting the first error if there is any) is 
sufficient for your needs?




Frescobaldi Quick key for Lily button

2019-12-29 Thread Freeman Gilmore
In Frescobaldi is there a quick key that can be used in place of the Lily
button?   And one that will also clear the Music View or better one that
would do both?The problem is that the old view may not be updated when
you compile something that doe not show an error message.  I would like a
quick way to clear the Music View.

Thank you,
ƒg


Re: LSR contribution

2019-12-29 Thread Thomas Morley
Am So., 29. Dez. 2019 um 12:11 Uhr schrieb Thomas Morley
:

> Some other remarks:
[...]

And a general one.

If a note is last in previous interval and first in a new one, then
the color from the new one is done, leaving the first of the previous
interval with the for it set color:

\score {
  <<
\new Staff { b c' b' }
\new Staff {  }
  >>
  \layout {
\context {
  \Voice
  \consists
\color_interval_engraver #intervaldefs
  #`(("2-" 0 #t ,green)
 ("7+" 0 #t ,red)
  )
}
  }
}

No clue how to improve this situation.


Cheers,
  Harm



Re: LSR contribution

2019-12-29 Thread Thomas Morley
Hi Michael,

Am Fr., 27. Dez. 2019 um 16:12 Uhr schrieb Michael Käppler :
>
> Hi Harm,
> thanks for your comments and this inspiring discussion!

me too!

> I would like to discuss a couple of things further.
> My current version is attached.

> > Along with it, I added a basic check for the user provided list (about
> > equal length of each sublist)
>
> A good addition, but it did not work as intended, because the dissection
> of the list with (car) (second) etc. took place regardless of whether
> the interval was well-formed. See the comment in the code below.
> I would not use ly:error here, because that will
> terminate the compilation process, right?  It may be that
> some intervals are well-formed and some are not. I think we should
> still go on and process the well-formed intervals.
> Otherwise we should raise an error for the other fault conditions
> (Direction, enharmonic, color, missing interval in definitions) too,
> what I do not think is appropriate.

ok

> > Furthermore, I changed the basic `intervaldefs` to take only pairs of
> > the interval-string and the semi-tonoc steps. The diatonic steps are
> > calculated relying on the interval-string.
> I have to admit that I'm not happy with this change.
> I think the user should be able to use custom
> interval denotations like e.g.
> https://en.wikipedia.org/wiki/Interval_(music)#Alternative_interval_naming_conventions
> rather than having to rely on a hardcoded system.

Iiuc, you want to keep the possibility the user defines the intervaldefs like
#(define intervaldefs
   '(("my-prime++" . (0 . 1))
 ...)

Fine with me, this should be mentioned in the description/comments,
probably like

%% Interval definitions alist
%% Key:
%% number-string determines the interval type, 1=prime, 2=second, 3=third ...
%% plus and minus signs determine variant, no sign=perfect interval, +=major,
%% ++=augmented, -=minor, --=diminished

%% Other strings for the interval-type are possible as well, if given
to the engraver in the same way.
(Bad wording, you may get the point, though ... hopefully)

Btw, I'd change

%% intervals-given: list of the form
%%   #`((interval1 ,dir1 enh1 ,color1)
%%  (interval2 ,dir2 enh2 ,color2)
%%  ...
%%  (intervalN ,dirN enhN ,colorN))
%% with
%% intervaln: string - specifying the interval to search after
%% dirn: integer - UP (=1) DOWN (=-1) or 0 (up and down)
%% enhn: boolean - search for enharmonically equivalent intervals, too?
%% colorn: lilypond color value, see NR A.7.

to always use capital N for
intervalN etc

> > I found no need to do work in `process-acknowledged`.
> > Thus all work is done in 'note-head-interface of `acknowledgers`
> > Probably more efficient, but I have not really checked.
> I think it is definitily more efficient, since process-acknowledged is
> called multiple times after
> one grob has been acknowledged by the engraver. The question is to which
> extent
> the "educational" idea of showing the various hooks in action justifies
> this overhead.

I think we should go for the current code.
Other hooks should be thoroughly demonstrated, _if_ they are needed to
get the desired result.
In other words, demonstrating process-acknowledged should be left to
another LSR snippet.


> > Btw, there is one case, where I don't know how to deal with:
> > 2.18.2 can't cope with an empty engraver, see:
> >
> > \score {
> >\new Staff \relative c' { c4 d }
> >\layout {
> >  \context {
> >\Voice
> >\consists \color_interval_engraver #intervaldefs #`(("30-" 0 #t 
> > ,green))
> >  }
> >}
> > }
> >
> > No problem for 2.19.83, though.
> Oh no, further insufficient testing of mine. The following minimal
> "void" engraver
> works for me with both 2.18.2 and 2.19.80:
> `((initialize . ,(lambda (translator) #t)))

Nice, I'd add a comment about different behaviour of 2.18.2 vs 2.19.x
accepting an empty list as engraver.
You go back to the list-syntax, also possible would be:
(make-engraver ((initialize translator) '()))
I'm undecided here ... you decision ;)

> I'm commenting now directly in your code, mentioning only thoughts
> that I did not mention before. Btw, your code had pretty much
> lines with trailing whitespace which I removed, because I work here
> on a local git repo and the diffs become cluttered otherwise...

Sorry for that, I usually don't care about trailing whitespace.
Well, ... unless I use a git repo myself ...

> > color_interval_engraver =
> > #(define-scheme-function (parser location intervaldefs debug?
> > intervals-given)
> >(list? (boolean?) list?) ;; debug? is optional, defaults to #f
> >
> >   (define (string-diatonic-semi-tonic-list string-semi-tonic-list)
> >(map
> >  (lambda (e)
> >(let* ((interval-string
> > (string-trim-both
> >   (car e)
> >   (lambda (c) (or (eqv? c #\+) (eqv? c #\-)
> >   (interval-diatonic
> > (string->number interval-string)))
> 

Re: LilyJSSVG

2019-12-29 Thread Paolo Prete
On Sun, Dec 29, 2019 at 11:04 AM Martin Tarenskeen 
wrote:

>
>
> On Sun, 29 Dec 2019, Paolo Prete wrote:
>
> > https://github.com/paolo-prete/LilyJSSVG
>
> > Unlike the previous script, there is no need for copy and paste: the
> editor offers a textarea that is automatically updated following mouse
> actions, plus a button
> > for compiling .ly files.
> >
> > You can make any changes you want. Save / compile and go on modifying:
> the functions requested by Urs have therefore been implemented.
> > It should be simple to use (a mini how-to is on the project's Github
> homepage and in the example .ly file).
>
>
> This project is growing into serious and really usable stuff. Thanks!
>
> remarks 1:
>
> I kind of liked the old copy/paste actions of the primitive preview
> versions. I liked that your script helped me to find the perfect values to
> enter in my \shape functions for Slurs for example. But in the endresult
> my lilypond score did not need to include LilyJSSVG.ly and did not need
> all these new \jsX versions of already existing commands.
> Or is this still possible, but I haven't understood how yet?
>


The previous implementation had two big disadvantages, which are avoided in
this version:

1) You had to copy/paste each modification. In the current way, instead,
you put the token ( \jsXXX ) only once before the corresponding grob. And
then the editor will be automatically updated at each modification.
Please note that the new expressions follow the Lilypond naming convention,
with a "js" prefix (which means that no additional names have to be
learned/remembered)

2) You could not compile and then apply a new modification  (you had to
delete the expression and reset the shape to its default)



>
> remark 2: The LilyJSSVGCompileHelper.py script only works with Python2 and
> is not compatible with Python3.
>
> --
>

Sounds right. Please open an issue token in the project's page ("issues")
and I'll fix it asap

Best,
P




>
> MT
>
>


Re: ANN: Frescobaldi 3.1 has been released!

2019-12-29 Thread Thomas Scharkowski

I forgot to mention: I am on macOS Catalina 10.15.2


I installed the Frescobaldi 3.1 dmg and it works.
Only one problem: convert-ly called from frescobaldi gives this message:
arch: posix_spawnp:
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7:
Bad CPU type in executable
   From the command line convert-ly works.

In the above mentioned
/System/Library/Frameworks/Python.framework/Versions there is no python2.7

Can I get frescobaldi to call the right python?






Re: ANN: Frescobaldi 3.1 has been released!

2019-12-29 Thread Thomas Scharkowski

 Original-Nachricht 

Il giorno ven 27 dic 2019 alle ore 11:21 Wilbert Berendsen
 ha scritto:

Please give packagers some time to prepare Windows/MacOSX installers,
they will be announced when ready.


The Mac installer (DMG containing application bundle) is now available at
https://github.com/frescobaldi/frescobaldi/releases

The application bundle should work on macOS 10.12 Sierra and later:
otherwise, please report the failure (either with a GitHub issue or by
email to me).
It might work also on previous versions of macOS: if it does, please
let us know (either with a GitHub issue or by email to me).

Merry Christmas and a happy new year to you all!
Davide


Thank you for your great work!

I installed the Frescobaldi 3.1 dmg and it works.
Only one problem: convert-ly called from frescobaldi gives this message:
arch: posix_spawnp: 
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7: 
Bad CPU type in executable

 From the command line convert-ly works.

In the above mentioned 
/System/Library/Frameworks/Python.framework/Versions there is no python2.7


Can I get frescobaldi to call the right python?




Re: ANN: Frescobaldi 3.1 has been released!

2019-12-29 Thread Thomas Scharkowski

 Original-Nachricht 

Il giorno ven 27 dic 2019 alle ore 11:21 Wilbert Berendsen
 ha scritto:

Please give packagers some time to prepare Windows/MacOSX installers,
they will be announced when ready.


The Mac installer (DMG containing application bundle) is now available at
https://github.com/frescobaldi/frescobaldi/releases

The application bundle should work on macOS 10.12 Sierra and later:
otherwise, please report the failure (either with a GitHub issue or by
email to me).
It might work also on previous versions of macOS: if it does, please
let us know (either with a GitHub issue or by email to me).

Merry Christmas and a happy new year to you all!
Davide


Thank you for your great work!

I installed the Frescobaldi 3.1 dmg and it works.
Only one problem: convert-ly called from frescobaldi gives this message:
arch: posix_spawnp: 
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7: 
Bad CPU type in executable

From the command line convert-ly works.

In the above mentioned 
/System/Library/Frameworks/Python.framework/Versions there is no python2.7


Can I get frescobaldi to call the right python?




Re: LilyJSSVG

2019-12-29 Thread Martin Tarenskeen




On Sun, 29 Dec 2019, Paolo Prete wrote:


https://github.com/paolo-prete/LilyJSSVG



Unlike the previous script, there is no need for copy and paste: the editor 
offers a textarea that is automatically updated following mouse actions, plus a 
button
for compiling .ly files.

You can make any changes you want. Save / compile and go on modifying: the 
functions requested by Urs have therefore been implemented.
It should be simple to use (a mini how-to is on the project's Github homepage 
and in the example .ly file).



This project is growing into serious and really usable stuff. Thanks!

remarks 1:

I kind of liked the old copy/paste actions of the primitive preview 
versions. I liked that your script helped me to find the perfect values to 
enter in my \shape functions for Slurs for example. But in the endresult 
my lilypond score did not need to include LilyJSSVG.ly and did not need 
all these new \jsX versions of already existing commands. 
Or is this still possible, but I haven't understood how yet?


remark 2: The LilyJSSVGCompileHelper.py script only works with Python2 and 
is not compatible with Python3.


--

MT