Re: Getting back the dynamically coloured freboard dots on L2.20

2020-11-03 Thread Viktor Mastoridis
>
>
> A minimal would look like:
>   \new FretBoards { \override FretBoard.color = #red a }
> Changing dot-color  in 2.18. but not with 2.20.
>
> Investigating...
>
> Cheers,
>   Harm
>

Agreed.
I'm sorry.
It's the first time I'm posting on this kind/level of forum.


Re: Getting back the dynamically coloured freboard dots on L2.20

2020-11-04 Thread Viktor Mastoridis
Dear Harm, Carl et al.,

Most of what you discussed went over my head, and I have no idea how
patches work:-)

I understood and tried the hack from Harm:
\override FretBoards.FretBoard.before-line-breaking =
#(lambda (grob)
  (ly:grob-set-nested-property! grob '(fret-diagram-details
dot-color)
  (color-dot grob)))

It worlds like a charm. I'm more than happy to use it until the patch makes
it to an official release.

Just wanted to say THANK YOU to all of you developers.
Not only for this help, but for all the amazing work you do developing such
a beautiful program for notation such as Lilypond.

I am a primary school music teacher, so* the ability to add colours and
other tweaks made it possible to bring music notation to very young
children. It makes music much more accessible and much less frightening. *

It's just one of the ways your work 'behind the scenes' is like a blessing
for us on the 'frontline'.
---
Viktor🎼Mastoridis




On Wed, 4 Nov 2020 at 21:51, Thomas Morley  wrote:

> Am Mi., 4. Nov. 2020 um 01:20 Uhr schrieb Thomas Morley
> :
> >
> > Am Di., 3. Nov. 2020 um 23:36 Uhr schrieb Carl Sorensen
> > :
> > >
> > >
> > >
> > > On Tue, Nov 3, 2020 at 3:18 PM Thomas Morley 
> wrote:
> > >>
> > >> 
> > >>
> > >> Well, so it's my own patch...
> > >> The patch introduces many nice features, among them coloring dots.
> > >> Alas, one cannot access the grob-color (if it is the return-value of a
> > >> procedure) in a reasonable way to use it as a fallback if dot-color is
> > >> unset. I have to think about it...
> > >
> > >
> > > Could one use the property FretBoard.color if dot-color were not set?
> I think the FretBoard.color is accessible from Scheme...
> > >
> > > Carl
> > >
> > Well, yes and no. Consider:
> >
> > \new FretBoards {
> >   \once \override FretBoard.fret-diagram-details.dot-color = #'cyan
> >   a
> >   \once \override FretBoard.fret-diagram-details.dot-color =
> > #(lambda (grob) 'red)
> >   bes
> > }
> >
> > I can access the value of the first override from inside
> > `make-fret-diagram` , ok.
> >
> > The second override does not work and I currently don't know why not.
> > I can access the value of this override from inside make-fret-diagram as
> well.
> > Though, it's the procedure not it's return value.
> >
> > Cheers,
> >   Harm
>
> Patch is up:
> https://gitlab.com/lilypond/lilypond/-/merge_requests/497
>
> Cheers,
>   Harm
>


Create a \prall with a slur above

2020-11-08 Thread Viktor Mastoridis
Hello,

I would like to create an upper mordent (\prall) for guitar tabs, which
would have a curved slur over a single note.
The reasoning is that I would like to distinguish the regular Mordent
(where each note is plucked), with the Grace Mordent (where the first note
is plucked, the upper note is a quick hammer-on and the lower is a pull-off)
(See attachment for a more detailed rendition; or the image)

So far, I came to this construct:
\version "2.20.0"
\new TabStaff  { \tabFullNotation
g\prall ^\markup { \path #0.2 #'((curveto 0 -0.5 0 2 1.5 0)  )} }

I wonder whether there's a more elegant solution?


---
Viktor🎼Mastoridis
fb.com/viktor.master.uk
\version "2.20.0"
\new TabStaff  { \tabFullNotation \time 2/4
g\prall ^\markup { \path #0.2 #'((curveto 0 -0.5 0 2 1.5 0)  )}
_\markup \tiny {grace mordent}
g16( a g8)
g4\prall
_\markup \tiny {regular mordent}
g16 a g8  }


Note stem centered if font.name changed in EasyHeads

2021-04-02 Thread Viktor Mastoridis
\version "2.20.0"
\relative c'' {
  \easyHeadsOn
  \override NoteHead.font-name = #"Ubuntu"
  a b c d}

Hello,

If I try to change the font.name in EasyHeads, the stem gets to the middle
of the note-head (see attached image).
And Lilypond says: "none of note heads `noteheads.s' or `noteheads.d' found"

Any clues?


Re: Note stem centered if font.name changed in EasyHeads

2021-04-02 Thread Viktor Mastoridis
Thank you very much, Jean.
The hack does the job for now.

-- 
📱Viktor.Mastoridis.co.uk

-Original Message-
Re: Note stem centered if font.name changed in EasyHeads
From: Jean Abou Samra 
To: Viktor Mastoridis ,lilypond-user <
lilypond-user@gnu.org>
Cc: 
Friday, 2 April 2021 at 11:18

Le 02/04/2021 à 12:03, Viktor Mastoridis a écrit :

\version "2.20.0"
\relative c'' {
  \easyHeadsOn
  \override NoteHead.font-name = #"Ubuntu"
  a b c d}

Hello,

If I try to change the font.name in EasyHeads, the stem gets to the middle
of the note-head (see attached image).
And Lilypond says: "none of note heads `noteheads.s' or `noteheads.d' found"

Any clues?


Hello,

This qualifies as a bug -- I am forwarding your report to the bug list.

Here is a workaround:

\version "2.22.0"

\relative c'' {
  \easyHeadsOn
  \override NoteHead.font-name = "Ubuntu"
  \override NoteHead.stem-attachment = #'(1.05 . 0)
  a b c d
}

Technically, the problem is that ly:note-head::calc-stem-attachment
uses the glyph that would be printed without \easyHeadsOn, and
the font-size override confuses that code since note heads require
a music font.

Best,
Jean


Re: Leadsheet for voice and ukulele

2021-04-18 Thread Viktor Mastoridis
I forgot two important things, sorry:-)

>
> You should create your own chord definitions in a separate file and store
> that file in the folder described above.
>
I am sharing my one with you (ukulele-chords-de.ly), where I changed the Bs
> to Hs and the BESs to Bs (to comply with the German language).
>
I forgot to add that you should connect the file at the top of your
lilypond doc with
\include "ukulele-chords-de.ly"

>
>
> This is another hack, the 'ignatzek Exceptions'
> Again, you will need to define your own names, at least for certain chords.
> I created a file 'extras.ly' which you should put in the above-mentioned
> folder.
>
I forgot to mention that you should also link this document (\include "
extras.ly")
And add a line, preferably in \global:
  \set chordNameExceptions = #chExceptions

VM


Re: How do I make a whole Lyric sentence into another color? :)

2021-05-17 Thread Viktor Mastoridis
On Sun, 16 May 2021 at 16:23,  wrote:

> Anyone knows how to make color to a whole lyric sentence, I know there
> is an option for different kind of grey. Can I override a whole verse
> with one specific color? :)
>
> I have this:
>
> \addlyrics {\set stanza = "1." Be -- hold os, Fa -- der, ved dit Ord,
> trods Pa -- vens Løgn og Tyr -- kens Mord, der styr -- te vil fra tro --
> nen ned, din Søn, vor Gud til E -- vigt Liv!}
> \addlyrics {\set stanza = "2." Be -- vis din magt, åh Je -- su Krist,
> som al -- le Her- rers Her -- re er, be -- var din Bør -- ne -- fød --
> te flok, så de dig pri -- se må i fred! }
> \addlyrics {\set stanza = "3." Vor trøster -- ter -- mand, Gud Hel --
> lig -- ånd, for -- en Guds Folk i skrif -- tens bånd, vær med os i vor
> sid -- ste nød, lad ord -- et vidn -- ne til vor død!}
> \addlyrics {\set stanza = "4." Så lad din sand -- hed og dit Lys, gå ud
> til al -- le mand på jord, lad Djæv -- len tu- de tør af kiks, han mi --
> ste alt til Li -- vets mand!}
>
> I want 2 of them in another color to make it easier to read, I will do
> some kind of grey for a start, just slightly enough so it will help the
> reader :) There was a good amount of setting for the Grey. I have tried
> some kind of \markup { \with-color #red contain } but it only seemed to
> work for one word.
>
> Dearly regards
> Darkijah - working on the sheet :)
>

This is the command you need.
\override LyricText.color = #red

Here's the list of color names:
http://lilypond.org/doc/v2.20/Documentation/notation/list-of-colors


Moving a tie horizontally

2022-02-07 Thread Viktor Mastoridis
Hello,

I am creating chord strumming indications with a tie.
I'm using the \improvisationOn handle, and the tie appears a bit too high
and to the right.
Using  \override Tie.Y-offset  I can move the tie vertically, but \override
Tie.X-offset yields no results.

I have searched across forums and manuals, tried various things, but
couldn't find a way to move the tie horizontally.

Can you please help?

Attached is an image of the result that I'm getting at the moment.
And here's a minimal code example
\version "2.20.0"
\new DrumStaff \with {
   \override StaffSymbol.line-count = #1
}
 {
   \stemUp \improvisationOn
\override Tie.Y-offset = #-0.4
  a8 a' ~ a' a' a'4 a'4
 \improvisationOff
 }
---
Viktor.Mastoridis.co.uk 


Re: Moving a tie horizontally

2022-02-10 Thread Viktor Mastoridis
Thank you Aaron for the 'extra-offset' formula. I will use it.
Thank you Jean for the \shape - I also tried to use it and failed; with
your example, it makes so much more sense and I begin to understand it.


Moving /downbow & /upbow to the tablature

2022-06-29 Thread Viktor Mastoridis
Hello,

When combining standard notation and tablature, the down/upstroke symbols
show above the notation.
Is there a way to have them displayed above the tablature?
Where the tablature is arranged beneath the notation?

\version "2.20.0"
melody = {c'2\downbow d'\upbow}
<<
   \new Staff \melody
 \new TabStaff \melody
  >>


Re: Moving /downbow & /upbow to the tablature

2022-06-30 Thread Viktor Mastoridis
>
> the reason for why you do not get these above the tablature is because the
> context definition for TabStaff (in ly/engraver-init.ly) explicitely sets
> a few
> stencils to #f. So to get Scripts in your TabStaff you’d want to do
>
> melody = {c'2\downbow d'\upbow}
> <<
>\new Staff \melody
>  \new TabStaff \with {
>\revert Script.stencil
>  } \melody
>  >>
>
> Cheers,
> Valentin
>

Ah, I was looking for that formula!
I tried '\undo \hide Script' and similar, but this is a bit above my
paygrade:-)

Thank you so much, Valentin.
---
Viktor


Re: Moving /downbow & /upbow to the tablature

2022-06-30 Thread Viktor Mastoridis
>
>
> >
> > Ah, I was looking for that formula!
> > I tried '\undo \hide Script' and similar, but this is a bit above my
> > paygrade:-)
> >
> > Thank you so much, Valentin.
> > ---
> > Viktor
> >
>
> You were almost there!
>
> \undo \omit Script
>
> Since removing the scripts is done with the equivalent of \omit, you
> need to undo an \omit, not a \hide. See
>
> https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects#removing-the-stencil
> for the difference. You can notice the stencil overrides at
> https://lilypond.org/doc/v2.23/Documentation/internals/tabstaff
>
> Best,
> Jean
>
>
> I see!
I used \hide Script  to remove the objects from the notation and it worked,
hence \undo \hide Script.
But with \hide Script, the chord names started to be displayed too high, so
I had to lower them down.
Once you mentioned \omit, I realized that \hide makes the object
transparent, but its place stays, like a ghost:-)
While \omit removes all traces of objects.

Ah, the depth and beauty of Lilypond:-)

Viktor


Adding a root note next to the key signature (like a single note Ambitus)

2022-07-05 Thread Viktor Mastoridis
Hello,

For educational purposes, I would like to see whether it's possible to add a 
small note head after the key signature?
Like a single Ambitus note, really.


Why would I do it?
For example, I would like to add a (small) D note to a G-Major key signature, 
suggesting that, despite the F# key indicating G-major or E-minor scale, this 
piece is in D-Myxolydian mode.
Viktor Mastoridis 📱


Re: Adding a root note next to the key signature (like a single note Ambitus)

2022-07-07 Thread Viktor Mastoridis
On Wed, 6 Jul 2022 at 08:07, Lukas-Fabian Moser  wrote:

>
> Am 05.07.22 um 23:39 schrieb Lukas-Fabian Moser:
>
> Hi Viktor,
> Am 05.07.22 um 20:17 schrieb Viktor Mastoridis:
>
> For educational purposes, I would like to see whether it's possible to add
> a small note head after the key signature?
> Like a single Ambitus note, really.
>
>
> Why would I do it?
> For example, I would like to add a (small) D note to a G-Major key
> signature, suggesting that, despite the F# key indicating G-major or
> E-minor scale, this piece is in D-Myxolydian mode.
>
> Maybe something like this?
>
> ... probably cleaner not to re-define key, but record the current tonic in
> the KeySignature grob using an engraver.
> \version "2.23.10"
>
> tonic_notehead_engraver = #
> (lambda (ctx)
>   (make-engraver
>(acknowledgers
> ((key-signature-interface engraver grob source-engraver)
>  (if (eq? (grob::name grob) 'KeySignature)
>  (ly:grob-set-nested-property!
>   grob '(details tonic) (ly:context-property ctx 'tonic)))
>
> notehead_key_signature = #
> (lambda (grob)
>   (let*
>((key-sig (ly:key-signature-interface::print grob))
>  (notehead
>   (grob-interpret-markup grob
>  (markup #:tiny #:musicglyph "noteheads.s2")))
>  (notehead-parens (parenthesize-stencil notehead 0.1 0.3 0 0.1))
>  (tonic (assq-ref (ly:grob-property grob 'details) 'tonic))
>  (tonic-position (+ (ly:pitch-steps tonic)
> (ly:grob-property grob 'c0-position)))
>  (adjusted-tonic-position
>   (- (modulo (+ tonic-position 3) 7) 3)))
>
>(ly:stencil-combine-at-edge
> key-sig X RIGHT
> (ly:stencil-translate-axis notehead-parens
>(/ adjusted-tonic-position 2) Y)
> 0.5)))
>
>
> \layout {
>   \context {
> \Staff
> \consists #tonic_notehead_engraver
> \override KeySignature.stencil = #notehead_key_signature
>   }
> }
>
> {
>   \key d \mixolydian
>   a'1
>   \key a \mixolydian
>   1
>   \key g \mixolydian
>   1
>   \key g \dorian
>   1
>   \key c \minor
>   1
>   \clef bass
>   d1
>   \break
>   1
> }
>


Thank you very much, Lukas-Fabian. This is precisely what I am after!

Please forgive my ignorance, I have two follow-up questions:
1. How do I change the pitch of the 'root' note? I tried playing with the
three numbers from "(+ tonic-position 3) 7) 3)))". But I can't understand
their logic.

2. How can I remove the parenthesis? I tried but continuously broke the
code:-)


Re: Adding a root note next to the key signature (like a single note Ambitus)

2022-07-09 Thread Viktor Mastoridis
> 1. How do I change the pitch of the 'root' note? I tried playing with the
> three numbers from "(+ tonic-position 3) 7) 3)))". But I can't understand
> their logic.
>
> I'm not quite sure what you mean: The pitch of the 'root' note is taken
> directly from the \key command.
>
> For example, the following example generates all reasonable roots for key
> signatures with two sharps:
>
> {
>   \key d \major
>   a'1
>   \key e \dorian
>   a'1
>   \key fis \phrygian
>   a'1
>   \key g \lydian
>   a'1
>   \key a \mixolydian
>   a'1
>   \key b \aeolian
>   a'1
>   \key cis \locrian
>   a'1
> }
>
> Does this already solve your question?
>
No, it didn't at first.
I was talking about custom scales like Hijaz (1 2b 3 4 5 6b 7b) and its
variations.
I use the \set Staff.keyAlterations command.
But then I remembered that I have to use the normal \key command before the
keyAlterations command, to give it a context for the alterations.
I tried that and it works as a charm (see below).


But I can also explain the logic behind the three numbers 3 7 3 in the
> expression you quoted:
>
>- "tonic" is the tonic as a LilyPond pitch.
>- "tonic-position" is defined as (+ (ly:pitch-steps tonic)
>(ly:grob-property grob 'c0-position), i.e.
>... the vertical position of "middle c" for the current clef (measured
>in half-staff distances, i.e. note steps, from the centermost staff line)
>plus
>... the number of steps our tonic lies above middle c.
>Now we have the problem that this gives us the position of _some_
>tonic note, but we do not know yet in which octave it will lie; so it may
>very well be sitting far above or far below the staff. Therefore:
>- "adjusted-tonic-position" is defined as (- (modulo (+ tonic-position
>3) 7) 3))), i.e. ((tonic-position + 3) mod 7) - 3. The idea is: Take the
>tonic-position modulo 7 since pitch names repeat after 7 steps. If we would
>simply take "tonic-position mod 7", this would amount to guaranteeing the
>tonic-position to lie between 0 and 6: But this means our note will lie on
>or above the centermost staff line (the lower staff lines will not be 
> used).
>What we want instead is a "shifted" modulo operation that returns
>values not between 0 and 6 but between -3 and 3; in other words: Values of
>"tonic-position" between -3 and 3 should not get changed. So we first add 3
>(yielding a value between 0 and 6), then doing the modulo and finally
>transforming back by subtracting 3 again.
>
> To sum up: The 7 should not be changed (that's the amount of steps in our
> note name system), and the two 3's should be equal (and it's no coincidence
> that 3 = (7-1)/2).
>
Thank you for that. It's fantastic how Music Theory gets another life as a
Lilypond code:-)

2. How can I remove the parenthesis? I tried but continuously broke the
> code:-)
>
> The notehead stencil is in the "notehead" variable, and the paranthesized
> stencil is stored in "notehead-parens". The simplest way to get rid of the
> parentheses would be to replace "notehead-parens" in the final construction
> of the stencil by "notehead". But then we can also get rid of
> "notehead-parens" completely, hence we get:
>
> notehead_key_signature = #
> (lambda (grob)
>   (let*
>((key-sig (ly:key-signature-interface::print grob))
>  (notehead
>   (grob-interpret-markup grob
>  (markup #:tiny #:musicglyph "noteheads.s2")))
>  (tonic (assq-ref (ly:grob-property grob 'details) 'tonic))
>  (tonic-position (+ (ly:pitch-steps tonic)
> (ly:grob-property grob 'c0-position)))
>  (adjusted-tonic-position
>   (- (modulo (+ tonic-position 3) 7) 3)))
>(ly:stencil-combine-at-edge
> key-sig X RIGHT
> (ly:stencil-translate-axis notehead
>(/ adjusted-tonic-position 2) Y)
> 0.5)))
>
> HTH
> Lukas
>

Thank you, thank you, thank you.

I finally arrived where I intended to go.
This is what I use on top of your code and it renders perfectly - image
attached.
\key d \major
  \set Staff.keyAlterations = #`(
(2 . ,FLAT)
(3 . ,SHARP)
(6 . ,FLAT)
)
\mark "D Hijaz"
d' es' fis' g' a' bes' c'' d''

Viktor


Custom NoteNames doesn't work in 2.22

2022-11-11 Thread Viktor Mastoridis
Hello list,

The construct below used to work for my educational needs up to 2.20.
Now in 2.22 it doesn't work anymore and it's beyond my understanding to fix
it.
I passed update.ly in Frescobaldi, but no joy.
Please help?
--

\version "2.22.0"
music =\relative c' { c4 d e f}
chimenames =
#`(
("c" . "C")
  ("d" . "D")
   ("e" . "E")
   ("f" . "F")
   )

  ChimeNoteNames =
#(lambda (grob)
   (let* ((default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name chimenames)))
 (ly:grob-set-property! grob 'text new-name)
   (ly:text-interface::print grob)))


   \new StaffGroup
<<
\new Staff \music
 \new NoteNames \with {
  \override NoteName #'stencil = #ChimeNoteNames
}
  \music
  >>
---
Viktor Mastoridis


Re: Custom NoteNames doesn't work in 2.22

2022-11-11 Thread Viktor Mastoridis
>
> Viktor, I suspect what is happening is that you first upgraded
> an old file to 2.20 without convert-ly, which didn't change
> this syntax, then upgraded from 2.20 to 2.22, which didn't
> change it either because the conversion rule is done when crossing
> the version in which the change was done, namely version 2.17.6.
>
Exactly!
I didn't know about convert-ly as a way of converting multiple files
through the terminal.
I used it only through Frescobaldy ( and I referred to it as update.ly in
my original post:-)


> That said, while true that this syntax is deprecated, it still
> works and replacing NoteName #'stencil with NoteName.stencil
> does not make a difference in the output.
>
As I read  David's email, I quickly learned how to use convert-ly on a
terminal and converted all my files, but the result was the same - no
letters!

>
> The problem appears to be that the NoteName text in 2.22 is
> not a simple string but a combination of \concat, \line and
> \simple that ends up printing the same thing. One can fix
> the snippet by first extracting the string from that markup
> before the alist lookup, using markup->string:
>
Now, "markup->string" is really beyond my comprehension. I am a music class
teacher and learn as much as 'need-to-know' in order to preserve sanity:-)

>
> \version "2.22.0"
> music =\relative c' { c4 d e f}
> chimenames =
> #`(
>  ("c" . "C")
>("d" . "D")
> ("e" . "E")
> ("f" . "F")
> )
>
>ChimeNoteNames =
> #(lambda (grob)
> (let* ((default-name (markup->string (ly:grob-property grob 'text)))
>(new-name (assoc-get default-name chimenames)))
>   (ly:grob-set-property! grob 'text new-name)
> (ly:text-interface::print grob)))
>
> \new StaffGroup
> <<
> \new Staff \music
>   \new NoteNames \with {
>\override NoteName.stencil = #ChimeNoteNames
>  }
>\music
>>>
>

Thank you!  This works.

>
>

> Note that if the goal is to uppercase the note names, there
> is also a simpler solution that works in recent versions,
> thanks to the new string transformers facility:
>
> \version "2.23.80"
>
> #(define (ChimeNoteNames grob)
> (grob-interpret-markup
>  grob
>  #{
>\markup \with-string-transformer
>  #(lambda (layout props str)
> (string-upcase str))
>#(ly:grob-property grob 'text)
>  #}))
>
> music =\relative c' { 4 dis e f}
>
> \new StaffGroup <<
>\new Staff \music
>\new NoteNames \with {
>  \override NoteName.stencil = #ChimeNoteNames
>}
>\music
>  >>
>
>
> Oh, this doesn't work on 2.22 and I am too scared to upgrade now before
report writing kicks in. But I will keep it and try it out as soon as I
upgrade.

Thank you David for waking me up to convert-ly (terminal) and Jean for the
"markup->string" solution.

Viktor


Horizontally aligning mixed articulations in /improvisationOn mode

2022-11-17 Thread Viktor Mastoridis
Hello,

Adding a ^\staccato articulation to \improvisationOn notation renders it
correctly, the dot is aligned with the top of the stem.
When adding \upbow however, the articulation is aligned with the note head,
being engraved at the left of the stem.
The same happens in \upbow^\staccato.

I can solve the problem by manually inserting Script.extra-offset per bar,
as in the last bar of the example below.
But I wonder whether there's a more elegant solution?

\version "2.22.2"
  {\time 2/4
   \improvisationOn \repeat unfold 2 { a'4^\staccato}
  \repeat unfold 2 { a'4^\upbow}
\repeat unfold 2 { a'4\upbow^\staccato}
  \override Script.extra-offset = #'(0.8 . 0)
\repeat unfold 2 { a'4\upbow^\staccato}
  }

---
Viktor Mastoridis
Music producer and educator


Re: Horizontally aligning mixed articulations in /improvisationOn mode

2022-11-17 Thread Viktor Mastoridis
>
> This is controlled by the toward-stem-shift and
> toward-stem-shift-in-column properties. Try
>
> \version "2.22.2"
>
> {
>   \time 2/4
>   \improvisationOn \repeat unfold 2 { a'4^\staccato}
>   \repeat unfold 2 { a'4^\upbow}
>   \repeat unfold 2 { a'4\upbow^\staccato}
>   \override Script.toward-stem-shift = 1.0
>   \override Script.toward-stem-shift-in-column = 1.0
>   \repeat unfold 2 { a'4\upbow^\staccato}
> }
>
> This is sooo elegant and beautiful:-)
Thank you very much.


Need help displaying note names in 2.22

2023-08-05 Thread Viktor Mastoridis
Hello,

I have been using the syntax below for several years; the last code update
I did was in December 2022, and it worked well since.
Today I noticed that I can't get the sharp/flat note names properly.
C# & Eb are not displayed.
Can you please help?
---


\version "2.22.1"
chimenames =
#`(
("c" . "C")
("cis" . "C♯")
   ("d" . "D")
  ("es" . "E♭")
   )

ChimeNoteNames =
#(lambda (grob)
(let* ((default-name (markup->string (ly:grob-property grob 'text)))
   (new-name (assoc-get default-name chimenames)))
  (ly:grob-set-property! grob 'text new-name)
(ly:text-interface::print grob)))

music = \relative c { c, cis d es }

\score
{
 <<
\new TabStaff
\with {
  stringTunings = #bass-tuning
}
  { \music  }

\new NoteNames \with {\override NoteName #'stencil = #ChimeNoteNames }
{ \music }
  >>
  \layout { }  \midi { }
}


---
Viktor Mastoridis


Re: Need help displaying note names in 2.22

2023-08-07 Thread Viktor Mastoridis
On Sunday, 6 August 2023, Jean Abou Samra  wrote:

> Oops, except that this is not going to work in 2.22, since
> \with-string-transformer is new in 2.24.
>
> However, 2.22 is not supported anymore, I would recommend upgrading to
> 2.24 anyway.
>

How do I upgrade to Lilypond 2.24 on Mint 21 (Ubuntu LTS 22.4) without
braking the system?

Viktor


-- 
Viktor Mastoridis📱


Re: Need help displaying note names in 2.22

2023-08-08 Thread Viktor Mastoridis
Dear all,

Thank you very much for the time taken to comment on my problem.

I tried all the suggestions one by one - the best solution was to upgrade
to Lilypond 2.24 (much easier than I thought) and to use Jean's code below:

\version "2.24.1"

\layout {
  \context {
\NoteNames
noteNameFunction =
  #(lambda args
 #{ \markup \with-string-transformer #(lambda (layout props str)
(string-upcase str))
#(apply note-name-markup args) #})
  }
}

music = \relative c { c, cis d es }

\score {
 <<
\new TabStaff \with {
  stringTunings = #bass-tuning
}
{ \music  }
\new NoteNames { \music }
  >>
  \layout { }
  \midi { }
}

---
Viktor Mastoridis





On Mon, 7 Aug 2023 at 19:04, Jean Abou Samra  wrote:

> Le lundi 07 août 2023 à 19:00 +0100, Viktor Mastoridis a écrit :
>
> How do I upgrade to Lilypond 2.24 on Mint 21 (Ubuntu LTS 22.4) without
> braking the system?
>
>
>
>
> Just follow the tutorial, it will not interfere with the system in any way.
>
>
> https://lilypond.org/doc/v2.24/Documentation/learning/graphical-setup-under-gnu_002flinux.html
>
>
> (You presumably already have Frescobaldi, so you don't need that part,
> only the part where it explains how to add a new LilyPond version to
> Frescobaldi.)
>


Changing font-name in \easyHeadsOn renders strange stem positions (and initiates warnings)

2023-08-14 Thread Viktor Mastoridis
Hello,

I recently upgraded to 2.24.

I need to change the note names (font) of  \easyHeads to make them bigger &
clearer (for primary school kids).

As the title says, if I change the font, the stems are positioned in the
middle.
In 2.22 I used to solve this with "override NoteHead.stem-attachment", but
now in 2.24 this makes it even more strange.

For the example below I use the Ubuntu font as everyone has it, but my
personal choice is "Dephunked BRK"

I also get this warning: *none of note heads `noteheads.s' or `noteheads.d'
found*

Please help.

\version "2.24.0"

  \new Staff
{
\relative c
{
 \easyHeadsOn
\override NoteHead.font-name = "Ubuntu"
 %\override NoteHead.stem-attachment = #'(1.05 . 0)
  c'8 d e g a b c d
  }
  }
---
Viktor Mastoridis


Re: Changing font-name in \easyHeadsOn renders strange stem positions (and initiates warnings)

2023-08-14 Thread Viktor Mastoridis
>
> Try
>
> \version "2.24.1"
>
> \new Staff  {
>   \relative c {
> \easyHeadsOn
> \override NoteHead.font-name = "Ubuntu"
> \override NoteHead.stem-attachment =
>   #(lambda (grob)
>  (if (eqv? UP (ly:grob-property (ly:grob-object grob 'stem)
> 'direction))
>  '(1.05 . 0)
>  '(-1.05 . 0)))
> c'8 d e g a b c d
>   }
> }
>
>
> It's perfect!
Thank you very much.
Viktor


RepeatSlash size is changed when StaffSymbol.staff-space is overriden in 2.24

2023-08-14 Thread Viktor Mastoridis
Hello again,

I need more space between the 5 lines (for primary school age).
In 2.22 I used
\override StaffSymbol.staff-space = #1.5 (with additional commands for stem
length etc).

Now in 2.24, the same command enlarges the Repeat slashes and I simply
can't find a way to shrink them a bit.
See attached screenshots for the difference.

Help will be greatly appreciated.

\version "2.24.0"

\layout {
 \context {
\Staff   \override StaffSymbol.staff-space = #1.5
}
}

\score {
 \relative c' {
\repeat percent 2 {c8 d16 e }
\repeat percent 2 {c8 d }
\repeat percent 2 {c2 d4 e }
 }
  }

---
Viktor Mastoridis


Re: RepeatSlash size is changed when StaffSymbol.staff-space is overriden in 2.24

2023-08-14 Thread Viktor Mastoridis
On Mon, 14 Aug 2023 at 17:40, Jean Abou Samra  wrote:

> Le lundi 14 août 2023 à 17:22 +0100, Viktor Mastoridis a écrit :
>
> That change was in fact a bug fix. Percent repeats didn't correctly
> scale with the staff size, but now they do.
>
> You can always resize the symbols manually with
>
> \version "2.24.2"
>
> shrink =
> \propertyTweak stencil
>   #(grob-transformer 'stencil (lambda (grob orig) (ly:stencil-scale orig
> 0.7
> 0.7)))
>   \etc
>
>
> \layout {
>   \context {
> \Staff
> \override StaffSymbol.staff-space = #1.5
> \shrink DoubleRepeatSlash
> \shrink RepeatSlash
>   }
> }
>
> \score {
>   \relative c' {
> \repeat percent 2 {c8 d16 e }
> \repeat percent 2 {c8 d }
> \repeat percent 2 {c2 d4 e }
>   }
> }
>
>
>
> May I ask why you want them that way, though?
>
> Generally speaking, why don't you just use #(set-global-staff-size xxx) ?
> It will also properly scale the clefs, time signatures, etc. For me,
> a score with a "C" time signature that doesn't occupy the full extent
> between the second and the fourth staff lines looks quite weird.
>

Excellent, this works well.
Thank you very much.

As to why - because I use the \easyHeads and it gives plenty of space for
note names to be displayed in large letters, as in the example attached.
This is in addition to the #(set-global-staff-size xxx) which I also use.
Again, this is for easy notation for 5-7 years old.


Re: RepeatSlash size is changed when StaffSymbol.staff-space is overriden in 2.24

2023-08-14 Thread Viktor Mastoridis
The same problem - large Repeat Slashes - appears on a default Tab setting.
"StaffSymbol.staff-space" is not invoked here.

The slashes look normal on 2.22 (I attach 2.22 & 2.24 screenshots).

Any suggestions to reduce the size of the slashes?
The previous code (shrink =...) doesn't work for tabs...

\version "2.24.1"

   \new TabStaff
\with {
  stringTunings = #ukulele-tuning
}
   \relative c {
 \tabFullNotation
\repeat percent 2 { c'4 d e g}
\repeat percent 2 { c,16 d16 e8}
\repeat percent 2 { c8 d8}
   }


Re: RepeatSlash size is changed when StaffSymbol.staff-space is overriden in 2.24

2023-08-15 Thread Viktor Mastoridis
On Tue, 15 Aug 2023 at 10:59, Jean Abou Samra  wrote:

> Le mardi 15 août 2023 à 01:37 +0100, Viktor Mastoridis a écrit :
> > The previous code (shrink =...) doesn't work for tabs...
>
>
> It works here:
>
> \version "2.24.2"
>
> shrink =
> \propertyTweak stencil
>   #(grob-transformer 'stencil (lambda (grob orig) (ly:stencil-scale orig
> 0.7
> 0.7)))
>   \etc
>
> \layout {
>   \context {
> \TabStaff
> \shrink PercentRepeat
> \shrink RepeatSlash
> \shrink DoubleRepeatSlash
>   }
> }
>
> \new TabStaff \with {
>   stringTunings = #ukulele-tuning
> }
> \relative c {
>   \tabFullNotation
>   \repeat percent 2 { c'4 d e g}
>   \repeat percent 2 { c,16 d16 e8}
>   \repeat percent 2 { c8 d8}
> }
>

Ah, it's TabStaff (not Staff), of course!
\layout {
  \context {
*\TabStaff...*

Thank you so much for your help, Jean!

VM


Re: RepeatSlash size is changed when StaffSymbol.staff-space is overriden in 2.24

2023-08-15 Thread Viktor Mastoridis
>
> \layout {
>   \shrink Staff.PercentRepeat
>   \shrink Staff.RepeatSlash
>   \shrink Staff.DoubleRepeatSlash
> }


Thank you for this, David. It's a handy little shortcut.

VM


Can Frescobaldi autosave?

2023-08-18 Thread Viktor Mastoridis
Hello,

I know this is a Lilypond forum, but if your know the answer, please let me
know.

The search engine doesn't give any meaningful answers.

Viktor


-- 
Viktor Mastoridis📱


Grace notes with easyHeadsOIn error

2018-02-11 Thread Viktor Mastoridis
Hello Lilypond users,
I hope that this is the right place to ask the following question:

Using Lilypond 2.18.2
I am using easyHeadsOn (with numbers: \Ez_numbers_engraver) on a score.

I tried to use \afterGrace or \grace, as in
\afterGrace  b8  ( c16 )
but the result is that the number  and the head of the grace note are
bigger than the rest of the heads/numbers (not smaller as expected).

I tried to use the property \small,
\afterGrace  b8   ( \small c16 ) d8
but then the rest of the composition loses its even-grouping.

If easyHeads is turned off, afterGrace notes behave as expected.

I attach images of the three situations.
---
Viktor🎼Mastoridis
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Create a \prall with a slur above

2020-11-08 Thread Viktor Mastoridis Jas Виктор
This is fantastic!
Simple and clear.

Thank you so much, Pierre.
I spent a lot of time browsing the manuals that you referred to for 'slur',
but not for 'tie':-)
And it didn't dawn on me that I could put the 'prall' in markup.

-- 
Viktor Mastoridis 📱
fb.com/viktor.master.uk

-Original Message-
Re: Create a \prall with a slur above
From: Pierre Perol-Schneider 
To: Viktor Mastoridis 
Cc: lilypond-user 
Sunday, 8 November 2020 at 19:06

Or simply:

\version "2.20.0"
\new TabStaff  {
  \tabFullNotation
  g^\markup\left-align\tie \musicglyph #"scripts.prall"
}

Cheers,
Pierre

Le dim. 8 nov. 2020 à 18:34, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> a écrit :

> Hi Viktor,
> See:
> http://lilypond.org/doc/v2.20/Documentation/notation/text-markup-commands
> E.g.:
> \version "2.20.0"
> \new TabStaff  {
>   \tabFullNotation
>   g
>   ^\markup\left-align {
>   \override #'(direction . 1)
>   \tie \musicglyph #"scripts.prall"
>   }
> }
>
> HTH, Cheers,
> Pierre
>
> Le dim. 8 nov. 2020 à 17:47, Viktor Mastoridis <
> viktor.mastori...@gmail.com> a écrit :
>
>> Hello,
>>
>> I would like to create an upper mordent (\prall) for guitar tabs, which
>> would have a curved slur over a single note.
>> The reasoning is that I would like to distinguish the regular Mordent
>> (where each note is plucked), with the Grace Mordent (where the first note
>> is plucked, the upper note is a quick hammer-on and the lower is a pull-off)
>> (See attachment for a more detailed rendition; or the image)
>>
>> So far, I came to this construct:
>> \version "2.20.0"
>> \new TabStaff  { \tabFullNotation
>> g\prall ^\markup { \path #0.2 #'((curveto 0 -0.5 0 2 1.5 0)  )} }
>>
>> I wonder whether there's a more elegant solution?
>>
>>
>> ---
>> Viktor🎼Mastoridis
>> fb.com/viktor.master.uk
>>
>>
>>