Re: move discant symbol

2023-05-09 Thread Gianmaria Lari
>
> [...]
> How can I move the discant symbol and the accordion pull symbol to avoid
> them to stack on top of each other?
>
> [...]
>
> I just learned from Jean how to use \overlay and \translate-scaled
> together to control exactly where text and glyphs are placed, and make them
> scale with changes in fontsize. If you change the fontsize in the example
> below, everything keeps its spacing.
>
[...]
>

Thanks David (and Jean), it works!


move discant symbol

2023-05-09 Thread Gianmaria Lari
Sorry, trivial question:

How can I move the discant symbol and the accordion pull symbol to avoid
them to stack on top of each other?

\version "2.25.2"
#(use-modules (lily accreg)) %to use \discant
pull = \markup {\musicglyph "accordion.pull" }
\score {
  \fixed c'' {
\discant "20" \tempo Vivace
cis16-3^\pull d-2 e-3 fis-4 r4 r4 r4
  }
}


Thank you!
g.


Re: Separate dynamics from notes

2023-05-03 Thread Gianmaria Lari
Thanks Leo, very interesting!

I report here, for other users, your same example adding the
command displayLilyMusic at the end.
When compiled, lilypond outputs (in the standard output) the resulting
music expression. For example for the following code:

\version "2.25.4"
%%
convertToSkips =
#(define-music-function (music) (ly:music?)
   (music-map
 (lambda (m)
   (if (or (music-is-of-type? m 'rest-event)
   (music-is-of-type? m 'note-event))
   (make-music 'SkipEvent m)
   m))
 music))
%%

music = { r2\p  c'4( d')\ff s4 r4 }
music = { r2\p  c'4( d')\ff s4 r4 }
\score {\music}

\displayLilyMusic \convertToSkips \music


this is lilypond output:

Starting lilypond.exe 2.25.4 [Untitled]...

Processing
`C:/Users/gianm/AppData/Local/Temp/frescobaldi-4jzfn8zf/tmpigq7hcux/
document.ly'

Parsing...

Interpreting music...

Preprocessing graphical objects...

Interpreting music...

Preprocessing graphical objects...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

Converting to `document.pdf'...


{ s2\p < s s >2 s4( s4)\ff s4 s4 }

Success: compilation successfully completed

Completed successfully in 0.6".

Thanks Leo (& Jean)!
g.

On Tue, 2 May 2023 at 13:42, Leo Correia de Verdier <
leo.correia.de.verd...@gmail.com> wrote:

> If not too late, here is an example, based on Jeans code in
> https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00209.html
>
> %%
> convertToSkips =
> #(define-music-function (music) (ly:music?)
>(music-map
>  (lambda (m)
>(if (or (music-is-of-type? m 'rest-event)
>(music-is-of-type? m 'note-event))
>(make-music 'SkipEvent m)
>m))
>  music))
>
> \convertToSkips { r2\p  c'4( d)\ff s4 r4 }
>
> %%
>
> Take care with things that ar still interpreted, like Scripts.
>
> > 26 apr. 2023 kl. 22:55 skrev Leo Correia de Verdier <
> leo.correia.de.verd...@gmail.com>:
> >
> > You can do like this if it’s useful to you, removing the engravers that
> read what you don’t want at a specific place.
> > %%
> > \version "2.25.1"
> >
> > rh = \fixed c' {c4\pp d\p e\f f\ff}
> >
> > \score {
> >  <<
> >\new Voice \with {
> >\remove Dynamic_engraver }
> >  \rh
> >  \new Dynamics %Dynamics context doesn’t have the Note_Heads_Engraver
> anyway
> >  \rh
> >>>
> > }
> > %%
> >
> > Otherwise it is possible to create music functions that replace notes
> and rests with spacers or remove dynamics, but I can’t do that for you at
> the moment. While they’re not difficult functions they’re not ”built-in”.
> >
> > The second question is also probably not too hard to write a function
> for, but you’ll probably need to be a little more specific about the use
> case, perhaps also supply example code.
> >
> > Best wishes
> > /Leo
> >> 26 apr. 2023 kl. 22:23 skrev Gianmaria Lari :
> >>
> >> First question
> >> Suppose I wrote this score:
> >>
> >> \version "2.25.2"
> >> rh = \fixed c' {c4\pp d\p e\f f\ff}
> >>
> >> \score {
> >>  \new Staff \rh
> >> }
> >>
> >> Is there any "automatic" way to extract the dynamics in the score
> (maybe assigning it to a variable)?
> >> At the end I would like to easily transform the previous code in the
> following one:
> >>
> >> \version "2.25.2"
> >> rh = \fixed c' {c4 d e f}
> >> dy = {s4\pp s4\p s4\f s4\ff}
> >> \score {
> >>  <<
> >>\new Staff \rh
> >>\new Dynamics \dy
> >>>>
> >> }
> >>
> >> Second question
> >> Sometimes I copy a long score without the dynamic and add them
> separately later. For this operation I need to establish the dynamic
> location in the score counting and adding the notes length. This is tedious
> and error prone. Is there any way to make it?
> >>
> >> Thanks,
> >> Gianmaria
> >
>
>


Re: frescobaldi themes

2023-05-01 Thread Gianmaria Lari
Ciao Valentin,
Thank you for your kind msg!

You wrote:

[install multiple themes all at once in Frescobaldi]

> I suppose the easiest way to be able to install multiple files would be to
> slightly
> tweak Frescobaldi’s code (which can easily be done on a distributed copy
> as it is python).
> For this find the location of of the frescobaldi_app module and open
> widgets/schemeselector.py.
>
[]

I found the file and tried to modify it. Unfortunately I have a
(pre)compiled .pyc file so I can't modify it directly.
Now I don't have time but I'll try to find the source and compile it
(hopefully I'll be able to do it).
Thanks a lot!
Gianmaria


Re: Separate dynamics from notes

2023-04-28 Thread Gianmaria Lari
I have infinite esteem in cheerleader so if the message comes from one of
them I will do all what them propose:
- I will study what I can do with the edition engraver
- and wait for your MWE :))

By the way, ahem what is a MWE?

Grazie Kieren!
g.

On Fri, 28 Apr 2023 at 17:13, Kieren MacMillan 
wrote:

> Hi Gianmaria!
>
> > And now I understand better the reason for the thread Kieren linked.
> > I probably have to go back to study the edition engraver :)
>
> I’m the EE’s biggest cheerleader, so I would never dissuade you from that
> study… but I really do think the \sendTo is either already exactly what
> you’re looking for, or 90% of it. I’ll see what I can do in the next few
> days to put together a little MWE for you to consider.
>
> Cheers,
> Kieren.
> __
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>


Re: Separate dynamics from notes

2023-04-28 Thread Gianmaria Lari
Dear Robin,

made some more tests.
Your code works well but it doesn't solve the problem because it returns
the "absolute" location of the notes while on the other hand in the
variable where you write the dynamic you use a relative location. For
example if I want to put a dynamic on the quarter number 3 and on the
quarter number 17 I can't write

s4*3\p
s4*17\f


but I have to write


s4*3\p
s4*20\f


I'm sorry but it's my fault. I proposed a possible solution that was simply
not correct. And now I understand better the reason for the thread Kieren
linked.

I probably have to go back to study the edition engraver :)
g.






On Thu, 27 Apr 2023 at 18:20, Robin Bannister  wrote:

> Gianmaria Lari wrote:
> >
> > This thing always seemed so inconvenient to me that I thought it was
> > practically unusable. Or that there was some trick to maybe have
> > Frescobaldi tell me the "position" of the note (meant as numbers of
> quarter
> > or eight notes from the beginning).
>
> Here is a primitive include file for you to play around with.
>
> When hovering with the mouse
>   - over a notehead
>   - over a barline (inside a staff)
> it shows such a position as (an inconvenient) fraction.
>
>
> Cheers,
> Robin
>


Re: frescobaldi themes

2023-04-28 Thread Gianmaria Lari
[midi player not visible in Frescobaldi]

> Maybe it's just turned off? What if you enable it in Tools > MIDI > MIDI
> player ?


ahhh quelle honte !
My apologies, I didn't know you have to enable it.
Thanks a lot Jean!
gianmaria


Re: frescobaldi themes

2023-04-28 Thread Gianmaria Lari
Ciao Federico,

I'm using windows 11.

I downloaded frescobaldi themes here
https://github.com/frescobaldi/frescobaldi-themes  (I don't need a prettier
environment but I cannot use a pc without a dark mode).

* * *

Another question: I installed Frescobaldi version 3.3 a few hours ago
and no more embedded midi player!!!
I tried to have a look on the mailing list and on google but no one
discusses this issue. Do you know anything about this?

Thks, Gianmaria


On Fri, 28 Apr 2023 at 10:52, Federico Bruni  wrote:

>
>
> Il giorno ven 28 apr 2023 alle 09:40:57 +0200, Gianmaria Lari <
> gianmarial...@gmail.com> ha scritto:
>
> Hope this is not off topic. Is there any way in Frescobaldi to install a
> bunch of themes all at once (instead of passing trough Edit -> Preferences
> -> Fonts & Colors etc.) ?
>
>
>
> Which themes are you talking about? I don't see anything in Fonts &
> Colors...
>
> Frescobaldi themes are available in General preferences>Style, where you
> see some themes included in Qt plus the themes available in your system.
> The themes can be installed using a software center (in Linux). I can't
> remember what's your OS.. maybe Mac?
>
>


frescobaldi themes

2023-04-28 Thread Gianmaria Lari
Hope this is not off topic. Is there any way in Frescobaldi to install a
bunch of themes all at once (instead of passing trough Edit -> Preferences
-> Fonts & Colors etc.) ?

Thanks,
Gianmaria


Re: Separate dynamics from notes

2023-04-27 Thread Gianmaria Lari
Thank you Jean, Kieren and Robin.
I had a look at the edition engraver but it was not trivial to understand
how to install it. Maybe I will try it again in the future.
I had a look at the SendTo thread, thanks!
And finally I tried the Robin code. Well, it looks like it's doing the
job Fantastic Robin! I'll test it more in the following days.

Anyway, couldn't it be of interest to others as well?

Thanks a lot to everyone!!!
Gianmaria

On Thu, 27 Apr 2023 at 18:20, Robin Bannister  wrote:

> Gianmaria Lari wrote:
> >
> > This thing always seemed so inconvenient to me that I thought it was
> > practically unusable. Or that there was some trick to maybe have
> > Frescobaldi tell me the "position" of the note (meant as numbers of
> quarter
> > or eight notes from the beginning).
>
> Here is a primitive include file for you to play around with.
>
> When hovering with the mouse
>   - over a notehead
>   - over a barline (inside a staff)
> it shows such a position as (an inconvenient) fraction.
>
>
> Cheers,
> Robin
>


Re: Separate dynamics from notes

2023-04-27 Thread Gianmaria Lari
Thank you Leo for your answers and help.


> you’ll probably need to be a little more specific about the use case,
> perhaps also supply example code.
>

Regarding my second question, let me try to be more clear

I have a score.
I want to write the dynamics using a separate variable.
Suppose that on the first quarter of the tenth measure there is a "forte"
and then on the note of the next bar there is a "piano." If all the
measures have the same "time signature", let's say of 4/4, then it's pretty
easy: just count the beats and multiply by 4. Finally you will write:

s1*9 s4\f s4*3 s4\p


The operation is not difficult but making mistakes is pretty easy. In fact
this system works well if the "time signature" does not change or changes
very little in the piece. Otherwise you have to add up the duration of each
note individually and making mistakes becomes extremely easy.

This thing always seemed so inconvenient to me that I thought it was
practically unusable. Or that there was some trick to maybe have
Frescobaldi tell me the "position" of the note (meant as numbers of quarter
or eight notes from the beginning).

Hope I have been more clear.
g.


Separate dynamics from notes

2023-04-26 Thread Gianmaria Lari
First question
Suppose I wrote this score:

\version "2.25.2"
rh = \fixed c' {c4\pp d\p e\f f\ff}

\score {
  \new Staff \rh
}


Is there any "automatic" way to extract the dynamics in the score (maybe
assigning it to a variable)?
At the end I would like to easily transform the previous code in the
following one:

\version "2.25.2"
rh = \fixed c' {c4 d e f}
dy = {s4\pp s4\p s4\f s4\ff}
\score {
  <<
\new Staff \rh
\new Dynamics \dy
  >>
}


Second question
Sometimes I copy a long score without the dynamic and add them separately
later. For this operation I need to establish the dynamic location in the
score counting and adding the notes length. This is tedious and error
prone. Is there any way to make it?

Thanks,
Gianmaria


Re: keep measures on the same line

2023-04-06 Thread Gianmaria Lari
Hello Jean,

> Sometimes I want to keep some measures on the same line. To do this I use
> \nobreaks and I set the fontsize manually by trial and error. Isn't there
> an easier way?
>
> Before this group of measures, put
>
> \autoLineBreaksOff
>
> []
>
Using \autoLineBreaksOff lilypond stops to automatically break the line but
it doesn't change the notes size. Anyway, nice to know :)

Merci Jean!

>


keep measures on the same line

2023-04-03 Thread Gianmaria Lari
Sometimes I want to keep some measures on the same line. To do this I use
\nobreaks and I set the fontsize manually by trial and error. Isn't there
an easier way?
Thank you,
gianmaria


Re: \pushToTag and \appendToTag examples

2021-04-30 Thread Gianmaria Lari
>
> > Nota bene: I didn't yet add any examples that take advantage of David new
> > possibilities:
>
> Ah, but that was sort of the point.
>

Sure, I'm sorry :(
I'll help with that too when I will be able to access this new feature.

> P.S. I would have liked to add a screenshot of the generated output
> > immediately after each piece of code.
> > This would make this much more interesting, easy to follow and discuss.
> But
> > I remember that on this mailing list pictures have to be attached and not
> > put inside the mail.
>
> I use inline MIME attachments and there are few complaints, but some
> mail clients do some sort of HTML contraption not working in text mode
> and those will not make it through a lot of mail clients or mailing list
> summarisers.
>

I guessed what the problem was and I hope it will change in the following
years so that we will be able to write clearer posts.
For me, reading (and writing) an email with pictures attached is like
reading a book with numbered photographs placed at the end of the book.
But I know that this is an old argument on which many of us are
hypersensitive. My apologies.

> %%%
> > \markup {"Simple \appendToTag with {}"}
> > \version "2.23.2"
> > music = {c'1 \tag #'here {} c''1}
> > {\music}
> > {\appendToTag #'here g'1 \music}
> > {\pushToTag   #'here g'1 \music}
>
> Tagging an empty {} and pushing a single element means that there is no
> visible difference between \appendToTag and \pushToTag .
>

David, this was the point of the example!
You read this short code, you see the output, you think about these two
things and because of the simplicity of the example you understand how it
works *without* reading long explanations.


> > {\appendToTag #'here {e'4 f' g' a'} \music}
> > {\pushToTag   #'here {e'4 f' g' a'} \music}
>
> Same here, and the example is more complex than necessary for bringing
> the point across.
>

I'm sorry I am of exactly the opposite opinion!
In the previous example you see the simplest possible \pushToTag and
\appendToTag example. It adds a single note.
And now you see an example just a bit more complex with a compound musical
expression.

As before, because of the simplicity of the input and the output you should
easily understand it and also easily compare with the previous example.

But we're probably too far in our opinions. I'm not interested in changing
your mind of course. If those examples are not useful I'm sorry and that's
ok.

> \markup {"Nested \appendToTag with {}"}
> > \version "2.23.2"
> > music = {c'1 \tag #'here {} c''1}
> > {\music}
> > {\appendToTag #'here d'4 \appendToTag #'here e'4 \appendToTag #'here f'4
> > \appendToTag #'here g' \music}
> > {\pushToTag   #'here d'4 \pushToTag   #'here e'4 \pushToTag   #'here f'4
> > \pushToTag   #'here g' \music}
>
> This at least shows a difference between \appendToTag and \pushToTag
>

Yes, but this in my opinion makes sense only *after* you saw and you
understood the other examples. And you compare it with the previous example.

> \markup {"\appendToTag with {} and multiple different tag"}
> > \version "2.23.2"
> > music = {c'4 d' e' f' \tag #'firstLocation {}
> >  g' a' b' c'' \tag #'secondLocation {} }
> > {\music}
> > {\appendToTag #'secondLocation {d''2 e''} \appendToTag #'firstLocation
> {g'4
> > f' g' f'} \music}
> >
> > \markup {"\appendToTag with {} and multiple equal tag"}
> > \version "2.23.2"
> > music = {c'4 d' e' f' \tag #'firstLocation {}
> >  g' a' b' c'' \tag #'firstLocation {}
> >  b' a' g' f'  \tag #'firstLocation {} }
> > {\music}
> > {\appendToTag #'firstLocation {g'2 r} \music}
>
> This just makes the example more complicated without demonstrating any
> additional functionality or use.  Makes it hard to interpret either
> manual entry or regtest.
>

This shows something different and that in my opinion you should know and
it was not visible in the previous examples.

If you read it after the previous example you should very easily understand
it and put it aside for when you will need it.

>
> > % I don't see any good reason to use the following.
> > % It mix different things making everything a bit more complex
> > % to understand withouth any advantage (imho).
> > % That's why I'm not sure it makes sense to show it.
> > \markup {"\appendToTag with {some music}"}
> > \version "2.23.2"
> > music = {c'1 \tag #'here {d'2 e'} c''1}
> > {\music}
> > {\pushToTag #'here {f'4 g' a' b'} \music}
> > {\appendToTag #'here {f'4 g' a' b'} \music}
>
> This at least shows a difference between \pushToTag and \appendToTag .
>

The fact that it shows the difference between \pushToTag and \appendToTag
is absolutely not my point. The difference between them is shown in the
previous examples.

Playing with lilypond I personally needed a way to indicate a location
inside a musical expression where I could add some musical material. I have
absolutely no idea if others have the same need or not. But if you have
this specific need then I 

\pushToTag and \appendToTag examples

2021-04-29 Thread Gianmaria Lari
Following David Kastrup's suggestion, I wrote some hopefully simple
examples for \pushToTag and \appendToTag.

I paid the maximum attention to make this code simple and clear but I'm
sure it contains millions of errors etc. etc.
It's just a starting point. I hope it can be useful.

Nota bene: I didn't yet add any examples that take advantage of David new
possibilities:

\pushToTag #'here ~ \music

I will do it as soon as this feature will be included in a new lilypond
version.

To test the code, just copy and paste the code inside Frescobaldi or use
the attached file.

P.S. I would have liked to add a screenshot of the generated output
immediately after each piece of code.
This would make this much more interesting, easy to follow and discuss. But
I remember that on this mailing list pictures have to be attached and not
put inside the mail.
Let me know if the "mailing list good practices" have changed.

%%%
\markup {"Simple \appendToTag with {}"}
\version "2.23.2"
music = {c'1 \tag #'here {} c''1}
{\music}
{\appendToTag #'here g'1 \music}
{\pushToTag   #'here g'1 \music}
{\appendToTag #'here {e'4 f' g' a'} \music}
{\pushToTag   #'here {e'4 f' g' a'} \music}

\markup {"Nested \appendToTag with {}"}
\version "2.23.2"
music = {c'1 \tag #'here {} c''1}
{\music}
{\appendToTag #'here d'4 \appendToTag #'here e'4 \appendToTag #'here f'4
\appendToTag #'here g' \music}
{\pushToTag   #'here d'4 \pushToTag   #'here e'4 \pushToTag   #'here f'4
\pushToTag   #'here g' \music}

\markup {"\appendToTag with {} and multiple different tag"}
\version "2.23.2"
music = {c'4 d' e' f' \tag #'firstLocation {}
 g' a' b' c'' \tag #'secondLocation {} }
{\music}
{\appendToTag #'secondLocation {d''2 e''} \appendToTag #'firstLocation {g'4
f' g' f'} \music}

\markup {"\appendToTag with {} and multiple equal tag"}
\version "2.23.2"
music = {c'4 d' e' f' \tag #'firstLocation {}
 g' a' b' c'' \tag #'firstLocation {}
 b' a' g' f'  \tag #'firstLocation {} }
{\music}
{\appendToTag #'firstLocation {g'2 r} \music}


% I don't see any good reason to use the following.
% It mix different things making everything a bit more complex
% to understand withouth any advantage (imho).
% That's why I'm not sure it makes sense to show it.
\markup {"\appendToTag with {some music}"}
\version "2.23.2"
music = {c'1 \tag #'here {d'2 e'} c''1}
{\music}
{\pushToTag #'here {f'4 g' a' b'} \music}
{\appendToTag #'here {f'4 g' a' b'} \music}


\markup {"\appendToTag with <>"}
\version "2.23.2"
music = {c'1 \tag #'here <> c''1}
{\music}
{\appendToTag #'here e'1 \music}
{\pushToTag #'here e'1 \music}

\markup {"nested \appendToTag with <>"}
\version "2.23.2"
music = {c'1 \tag #'here <> c''1}
{\music}
{\appendToTag #'here e'1 \appendToTag #'here g'1 \appendToTag #'here b'1
\music}
{\pushToTag   #'here e'1 \pushToTag   #'here g'1 \pushToTag   #'here b'1
\music}
% {\appendToTag #'here 1 \music} % Doesn't work. Adding a chord
to a chord is not defined/allowed
% {\appendToTag #'here {e'1 g'1 b'1} \music} % Doesn't work. Adding a
compound music expression to a  chord not defined/allowed

\markup {"\appendToTag with "}
\version "2.23.2"
music = {c'1 \tag #'here 1 c''1}
{\music}
{\appendToTag #'here g'1 \appendToTag #'here b'1 \music}
% {\appendToTag #'here g'4 \music} % Doesn't work. Adding a 4 duration note
to a 1 duration chord is not defined/allowed

\markup {"\appendToTag with 'multiple' <>"}
\version "2.23.2"
music = {\tag #'here 4 \tag #'here  \tag #'here  \tag
#'here <>}
{\music}
{\appendToTag #'here b'4 \appendToTag #'here d''4 \music}
\markup {"Simple \appendToTag with {}"}
\version "2.23.2"
music = {c'1 \tag #'here {} c''1}
{\music}
{\appendToTag #'here g'1 \music}
{\pushToTag   #'here g'1 \music}
{\appendToTag #'here {e'4 f' g' a'} \music}
{\pushToTag   #'here {e'4 f' g' a'} \music}

\markup {"Nested \appendToTag with {}"}
\version "2.23.2"
music = {c'1 \tag #'here {} c''1}
{\music}
{\appendToTag #'here d'4 \appendToTag #'here e'4 \appendToTag #'here f'4 \appendToTag #'here g' \music}
{\pushToTag   #'here d'4 \pushToTag   #'here e'4 \pushToTag   #'here f'4 \pushToTag   #'here g' \music}

\markup {"\appendToTag with {} and multiple different tag"}
\version "2.23.2"
music = {c'4 d' e' f' \tag #'firstLocation {} 
 g' a' b' c'' \tag #'secondLocation {} }
{\music}
{\appendToTag #'secondLocation {d''2 e''} \appendToTag #'firstLocation {g'4 f' g' f'} \music}

\markup {"\appendToTag with {} and multiple equal tag"}
\version "2.23.2"
music = {c'4 d' e' f' \tag #'firstLocation {} 
 g' a' b' c'' \tag #'firstLocation {}
 b' a' g' f'  \tag #'firstLocation {} }
{\music}
{\appendToTag #'firstLocation {g'2 r} \music}


% I don't see any good reason to use the following.
% It mix different things making everything a bit more complex 
% to understand withouth any advantage (imho).
% That's why I'm not sure it makes sense to show it.
\markup {"\appendToTag with {some music}"}
\version "2.23.2"
music = {c'1 \tag #'here 

Re: tags

2021-04-28 Thread Gianmaria Lari
Hello David,

I've submitted a merge request
>  that will at
> least make the following work for your purpose:
>
> \version "2.23.3"
> music = {\tag#'here a a}
> {\pushToTag #'here ~ \music }
>
[]

> I don't like the sample code in the documentation and the regtest: feel
> free to submit something better.
>

I will be very happy to propose some \pushToTag and \appendToTag simple
examples and maybe to improve the documentation about them.

I'll be back hopefully today with some materials.

Thanks a lot David for your work!

Ciao,
g.

>


Re: maple leaf rag mutopia

2021-04-27 Thread Gianmaria Lari
>
> Replace \applyMusic #unfold-repeats with \unfoldRepeats ?
>

Yes, now it works fantastically :)

Grazie!
g.


maple leaf rag mutopia

2021-04-27 Thread Gianmaria Lari
Hello,

I'm trying to engrave Maple Leaf Rag from mutopia. It has been written
with LilyPond, version 2.14.2.
I converted it using "Tools/Update with convert-ly" (in Frescobaldi) but
when I try to engrave it I get this error message:

Parsing...C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/ly/music-functions-init.ly:155:4
<0>: In procedure unfold-repeats in expression (func music):

C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/ly/music-functions-init.ly:155:4
<1>: Wrong number of arguments to #


Any suggestions?

Attached the source file.

Thanks, g.
\version "2.23.2"

\header {
 title = "Maple Leaf Rag"
 composer = "Scott Joplin"
 piece = "Tempo di marcia"

 mutopiatitle = "Maple Leaf Rag"
 mutopiacomposer = "JoplinS"
 mutopiainstrument = "Piano"
 date = "c. 1899"
 style = "Jazz"
 copyright = "Public Domain"
 source = "Reproduction of original edition (1899)"

 maintainer = "Chris Sawer"
 maintainerEmail = "ch...@mutopiaproject.org"
 maintainerWeb = "http://cjsawer.whitewillow.co.uk/;

 footer = "Mutopia-2011/11/13-23"
 tagline = \markup { \override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box \center-column { \small \line { Sheet music from \with-url "http://www.MutopiaProject.org; \line { \teeny www. \hspace #-0.5 MutopiaProject \hspace #-0.5 \teeny .org \hspace #0.5 } • \hspace #0.5 \italic Free to download, with the \italic freedom to distribute, modify and perform. } \line { \small \line { Typeset using \with-url "http://www.LilyPond.org; \line { \teeny www. \hspace #-0.5 LilyPond \hspace #-0.5 \teeny .org } by \maintainer \hspace #-0.6 . \hspace #0.5 Reference: \footer } } \line { \teeny \line { This sheet music has been placed in the public domain by the typesetter, for details see: \hspace #-0.5 \with-url "http://creativecommons.org/licenses/publicdomain; http://creativecommons.org/licenses/publicdomain } } } }
}

\paper {
  top-margin = 15
  bottom-margin = 10
  min-systems-per-page = #4
  max-systems-per-page = #5
  system-system-spacing.padding = #8
}

top =  \relative c' {
 \override TextScript.padding = #2
 
 \key as \major
 \time 2/4
 \clef treble
 \partial 8
 r8 \f |
 \repeat volta 2 {
  r16 as'  as, c 8 g,16 |
  16 g, bes  ~ 4 |
  r16 as,  as, c 8 g,16 |
  16 g, bes  ~ 8 r16  |
  r16 as, ces  r16  r16  |
  r16 as, ces  r16  r8 |
  \change Staff = "down"
   \stemUp r16^\p as,,,-( ces as'-) r as-( ces as'-) \stemNeutral |
  \change Staff = "up"
  r16 as-( ces as'-) r as-( ces as'-) |
  8-\mf \<   16  ~ |
   \! es f c es 8 16 ~ |
   bes  as bes 8 as16 |
   as 8  r16  ~ |
  8   16  ~ |
   es  c es 8 16 ~ |
   bes  as bes 8 as16 |
 } \alternative {
  {  as 8  r8 }
  { 16 as 8  r8 }
 }
 
 \break
 
 \repeat volta 2 {
  r16_\markup {\dynamic f \italic "stacc."} g'  g, bes 8 g,16 |
   g, bes  ~  es,  es, |
  r c  c, es 8 c16 |
   c, es  ~  c 8 |
  r16 es  bes, des 8 es16 |
   bes, des  ~  des 8 |
  r16 c  c, es 8 c16 |
   c, es  ~  c 8 |
  r16 g  g, bes 8 g,16 |
   g, bes  ~  es,  es, |
  r c  c, es 8 c16 |
  8|
  r16 f, a c f c a f |
  r f bes des 8  |
   r16  r 8 es,16 |
 } \alternative {
  { 8}
  { r16 as, c es 8 r }
 }
 
 r16-\f as,  as, c 8 g,16 |
 16 g, bes  ~ 4 |
 r16 as,  as, c 8 g,16 |
 16 g, bes  ~ 8 r16  |
 r16 as, ces  r16  r16  |
 r16 as, ces  r16  r8 |
 \change Staff = "down"
  \stemUp r16^\p as,,,-( ces as'-) r as-( ces as'-) \stemNeutral |
 \change Staff = "up"
 r16 as-( ces as'-) r as-( ces as'-) |
 8-\mf \<   16  ~ |
  \! es f c es 8 16 ~ |
  bes  as bes 8 as16 |
  as 8  r16  ~ |
 8   16  ~ |
  es  c es 8 16 ~ |
  bes  as bes 8 as16 |
  as 8   |
 
 \key des \major
 \repeat volta 2 {
  8.^\markup {\large "TRIO"} 16 ~ 16  bes8 |
  8. 16 ~ 16  bes  |
  as, des bes des f as, des f |
  bes, des f as, ~ as f' bes, f' |
  8. 16 ~ 16  bes8 |
  8. 16 ~ 16  bes  |
  as, des bes des f as, des f |
  bes, des f as, ~ as f' a,  |
  8. 16 ~ 16  c8 |
  8. 16 ~ 16  c  |
  r es  es, ges 8 es,16 |
   es, ges  ~  es, 8 |
  |
  16 des es  ~  bes, 8 |
  16 des es  ~  c   ~ |
 } \alternative {
  { 16 8 f16  f  f }
  { 16 des f as 8 r }
 }
 
 \break
 
 \key as \major   
 \repeat volta 2 {
  |
   16  ~  bes as f |
  es f8 16 ~ 4 |
  r16 es  c es 8 c16 |
  8 f16  ~ 4 |
  r16 des  bes, des 8 16 ~ |
   es  c es 8 16 ~ |
   es  c es 8 es16 |
  8|
   16  ~  bes as f |
  as8 f es16 as8 16 ~ |
   es  c es 8 16 ~ |
   bes 8  16  ~ |
   bes  as bes 8 16 ~ |
   bes  as r 8 es,16 |
 } \alternative {
  { 8}
  {}
 }
 
 \bar "|."
}


bottom =  \relative c {
 \key as \major
 \time 2/4
 \clef bass
 \partial 8
 8 |
 \repeat volta 2 {
  |
  |
  |
  |
  4 8  |
  4 8 r |
  \stemDown as,, r as' r \stemNeutral |
  as' r as' r \clef treble |
  |
  |
  |
 r \clef bass |
  |
  |
  |
 } \alternative {
  { }
  { }
 }
 
 \repeat volta 2 {
  8|
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
  |
 } \alternative {
  { }
  { }
 }
 
 |

Re: tags

2021-04-26 Thread Gianmaria Lari
> How is { ~ } correct?  ~ is not standalone music.
>
>
Maybe it would be nice to get an error message when you try to use a wrong
object with \pushToTag etc.


Re: tags

2021-04-26 Thread Gianmaria Lari
Ciao David,

[]

> At any rate, \pushToTag's documentation states:
>
>Sometimes you want to splice some music at a particular place in an
> existing music expression.  You can use ‘\pushToTag’ and ‘\appendToTag’
> for adding material at the front or end of the ‘elements’ of an
> existing
> music construct.  Not every music construct has ‘elements’, but
> sequential and simultaneous music are safe bets:
>
> But you are not pushing to sequential or simultaneous music but rather
> to the second a , a single note.  This needs to be a sequential music
> expression.


 Ah I made another mistake when I "distilled" the code before
posting it!!

I know very well the part of the documentation you quoted.
So this is was I wanted to write:

music = {a a \tag#'here {} a}


Is that right? Can \tag act on {} instead of {a} or  ?

Regarding the first part of your msg.:

How is { ~ } correct?  ~ is not standalone music.


Ok. I didn't understand that \pushToTag wanted a music expression.
Thanks,
g.


tags

2021-04-26 Thread Gianmaria Lari
Be patient with me.

I expect this to generate {a~a} but it generates {a a} . Why?

\version "2.23.2"
music = {a \tag#'here a}
{\pushToTag #'here ~ \music }

The \displayLilyMusic output looks "correct".


{ { a4 \tag #'here { ~ } a4 } }


* * *


I also tried this


\version "2.23.2"

music = {a \tag#'here {} a a}

{\pushToTag #'here ~ \music }

expecting {a ~ a a} but I get {a a ~ a}. The \displayLilyMusic gives me:


{ { a4 \tag #'here {  ~ } a4 a4 } }

Thank you, g.


Re: "compound music expression" to "music" expression"

2021-04-24 Thread Gianmaria Lari
Thank you David for your help.

I made some tests with \displayMusic and I have seen the situation :)

Thank you Aaron for the detailed explanation and also for the other code!
I will continue to use your \extract code but I keep also the new one for
the future :)

Have a nice w/e.

Ciao, g


On Sat, 24 Apr 2021 at 11:40, Aaron Hill  wrote:

> On 2021-04-23 11:32 pm, David Kastrup wrote:
> > Gianmaria Lari  writes:
> >
> >> Thank you Aaron and Jean, your code works!
> >>
> >> But I have some trivial questions.
> >> If I write:
> >>
> >> \displayLilyMusic \chordmode {c}
> >>
> >>
> >> I get:
> >>
> >> { < c' e' g' >4 }
> >>
> >>
> >> It looks a good "compound music expression".
> >
> > Try \displayMusic rather than \displayLilyMusic for more details.
>
> In case David's hint was not sufficient, there is an additional layer of
> complexity when using \chordmode.  Unfortunately, that layer is not
> visible when using \displayLilyMusic, and this is where the confusion
> arises.
>
> \chordmode produces UnrelativableMusic that contains SequentialMusic and
> then EventChords of NoteEvents.
>
> Jean's first-element assumes that the music argument has a property
> called elements and resolves to the first value within the collection.
> UnrelativableMusic only has an element property, so first-element gets
> stuck.  Here is a modified version of first-element that does not:
>
> 
> #(define (first-element music)
>(or (ly:music-property music 'element #f)
>(first (ly:music-property music 'elements
>
> % This works, but you get a SequentialMusic.
> { #(first-element #{ \chordmode {c} #}) }
>
> % This grabs the EventChord from the SequentialMusic.
> { #(first-element (first-element #{ \chordmode {c} #})) }
> 
>
> My \extract uses the built-in extract-typed-music procedure to do the
> heavy lifting, including the logic necessary to traverse nested music
> expressions with both element and elements properties.
>
>
> -- Aaron Hill
>


Re: "compound music expression" to "music" expression"

2021-04-24 Thread Gianmaria Lari
This should be the good one that doesn't work :)

\version "2.23.2"
#(define (first-element music)
   (first (ly:music-property music 'elements)))

{ #(first-element #{ \chordmode {c} #}) }


Ciao, g.


Re: "compound music expression" to "music" expression"

2021-04-24 Thread Gianmaria Lari
Ah!!! Sorry, I made many tests and I copied the wrong code. My apologies.
g.


On Sat, 24 Apr 2021 at 08:11, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > Thank you Aaron and Jean, your code works!
> >
> > But I have some trivial questions.
> > If I write:
> >
> > \displayLilyMusic \chordmode {c}
> >
> >
> > I get:
> >
> > { < c' e' g' >4 }
> >
> >
> > It looks a good "compound music expression".
> > But Aaron code and Jean code behave differently. Have a look here
> > This does not work.
> >
> > \version "2.23.2"
> > #(define (extract music)
> >(first (ly:music-property music 'elements)))
> >
> > { #(first-element #{ \chordmode {c} #}) }
>
> You define a function called "extract" but call a function called
> "first-element".
>
> --
> David Kastrup
>


Re: "compound music expression" to "music" expression"

2021-04-23 Thread Gianmaria Lari
Thank you Aaron and Jean, your code works!

But I have some trivial questions.
If I write:

\displayLilyMusic \chordmode {c}


I get:

{ < c' e' g' >4 }


It looks a good "compound music expression".
But Aaron code and Jean code behave differently. Have a look here
This does not work.

\version "2.23.2"
#(define (extract music)
   (first (ly:music-property music 'elements)))

{ #(first-element #{ \chordmode {c} #}) }


And this work as expected:

\version "2.23.2"
extract =
#(define-music-function
   (which what music)
   (symbol? symbol? ly:music?)
   (let ((extracted (extract-typed-music music what)))
(case which
 ((first) (first extracted))
 ((last) (last extracted))
 ((all all-as-sequence) (make-sequential-music extracted))
 ((all-as-chord) (make-event-chord extracted))
 (else (ly:input-warning (*location*)
"\\extract does not understand '~s'" which)
   music

{ \extract first event-chord \chordmode {c} }


why?
Sorry if the question is very trivial.
g.

On Fri, 23 Apr 2021 at 11:29, Aaron Hill  wrote:

> On 2021-04-23 1:58 am, Jean Abou Samra wrote:
> > If you have it at hand in Scheme:
> >
> > \version "2.23.
> >
> > #(define (first-element music)
> >(first (ly:music-property music 'elements)))
> >
> > { #(first-element #{ { c'1 } #}) }
> >
> > It would be helpful to understand your use
> > case; this sounds like you may not necessarily
> > need to unpack a sequential music expression.
>
> In my usual fashion, here's an over-engineered option showing off some
> of the built-in functions in an easily extensible pattern:
>
> 
> \version "2.22.0"
>
> extract =
> #(define-music-function
>(which what music)
>(symbol? symbol? ly:music?)
>(let ((extracted (extract-typed-music music what)))
> (case which
>  ((first) (first extracted))
>  ((last) (last extracted))
>  ((all all-as-sequence) (make-sequential-music extracted))
>  ((all-as-chord) (make-event-chord extracted))
>  (else (ly:input-warning (*location*)
> "\\extract does not understand '~s'" which)
>music
>
> foo = { c  }
>
> \fixed c' {
>\extract first event-chord \foo
>\extract last note-event \foo
>\extract all note-event \foo
>\extract all-as-chord note-event \foo
> }
> 
>
> -- Aaron Hill


"compound music expression" to "music" expression"

2021-04-23 Thread Gianmaria Lari
How can I convert a "compound music expression" made of just *one* "music
expression" to a music expression?
So something that "removes" curly brackets.

For example it should convert

{}

to




Thanks, g.


Re: combining chords in chords

2021-04-22 Thread Gianmaria Lari
>
> If the only purpose for using tags is to generate different octaves in the
> midi and the display, it would be much easier to just change the octavation
> of the clef.
>
>
Nice escamotage Carl :))

But no, the visual representation and the midi output do not differ only in
the octave.
g.


Re: combining chords in chords

2021-04-22 Thread Gianmaria Lari
Thank you Aaron and Valentin for your help and your codes.
It worked perfectly in my previous example.
Is it possible to make it working also with tags?

Here is a bit of information.
In my code, I use tags to generate two different outputs, one for midi and
one for layout.
So my variables are like this...

ja = {\tag #'midiOut 8 \tag #'screenOut 8}


...and my "score" part is like this:

\score { \keepWithTag #'screenOut \music \layout {} }
\score { \keepWithTag #'midiOut \music \midi{} }


In this way I can specify a visual representation that is very different
from the midi output.

Now let's go back to my problem.
Here it is my code with tags:

\version "2.23.2"
ja = {\tag #'midiOut 8 \tag #'screenOut 8}
jb = {\tag #'midiOut 8 \tag #'screenOut 8 }

music = \new Voice \fixed c << \ja \jb >>

\score { \keepWithTag #'screenOut \music \layout {} }
\score { \keepWithTag #'midiOut \music \layout{} } %here \layout{} should
be \midi{}


This works perfectly and generates two scores:

<< { \tag #'screenOut < c' e' >8 } { \tag #'screenOut < g' b' >8 } >>

<< { \tag #'midiOut   < c e >8   } { \tag #'midiOut   < g b >8   } >>


Now I would like to make it work also with a manual beam. These are the
solution I tried that don't work:

music = \new Voice \fixed c << \ja [\jb] >> % trivial wrong solution

music = \new Voice \fixed c \mergeChords \ja \jb  % Aaron solution

music = \new Voice \fixed c \ja s[ \jb s] % Valentin solution


If you have any suggestion to fix it you're welcome.
Thanks, g.


Re: combining chords in chords

2021-04-22 Thread Gianmaria Lari
Ciao Valentin,

thanks for your code, it works and it is very simple.

Before asking my question, I had tried a solution similar to yours, I used
<>. Unfortunately it didn't work because I forgot to specify it also after
\kc.

Thanks for your help and the explanation.

Best regards, g.


On Thu, 22 Apr 2021 at 18:48, Valentin Petzel  wrote:

> Hello Gianmaria,
>
> Your problem here is that the postfixed [ adds an event the the note it is
> applied to. Now, this does not work with macros. In such cases you can do
> something like this
>
> << \ka s[ >> \kb << \kc s] >>
>
> So just apply the event to a simultaneous skip.
>
> Cheers,
> Valentin


Re: combining chords in chords

2021-04-22 Thread Gianmaria Lari
Dear Aaron,

> How can I solve this?
>
> Here's a way that involves merging the elements of the two EventChords:
> [...]


that's great It seems to work perfectly.

Thanks a lot Aaron!!
Gianmaria


combining chords in chords

2021-04-22 Thread Gianmaria Lari
I have some variables, each containing one chord as in the following
example:

ja = 8
jb = 8
jc = 8



and some other variables combining them, like this:

ka = <<\ja \jb>>
kb = <<\ja \jc>>
kc = <<\jb \jc>>



This is a working example engraving \ka \kb and \kc:

\version "2.23.2"
ja = 8
jb = 8
jc = 8

ka = <<\ja \jb>>
kb = <<\ja \jc>>
kc = <<\jb \jc>>

\new Voice \fixed c' {\ka \kb \kc}


Now I would like to manually beam my pseudo-chords ka,kb,kc like this (it
doesn't work):

\new Voice \fixed c' {\ka[ \kb \kc]}


but I get:

warning: Unattached BeamEvent
\new Voice \fixed c' {\ka[ \kb \kc
  ]}


If I'm not wrong this is because \ka, \kb and \kc are not chords, they are
more complex musical expressions and beaming is not defined for that.
My code would work if \ka would be

8


but instead \ka is something like

<<   >>




How can I solve this?
Thanks, g.


Re: What usb keyboard to enter voices into lilypond? What other hardware and/or Software is indispensable?

2021-03-24 Thread Gianmaria Lari
> you plug it into your desktop via USB and it works? Or do I have to
> install other software to make it working?
>
For windows no driver to install. You just plug in and enable the
Frescobaldi midi input feature. Absolutely trivial.

Ciao, g.


Re: What usb keyboard to enter voices into lilypond? What other hardware and/or Software is indispensable?

2021-03-24 Thread Gianmaria Lari
Ciao Bernhard,

I have the "M-Audio Keystation Mini 32"  that Knute suggests.
I can confirm it works flawlessly with Frescobaldi (and Musescore).
His small size makes it very practical. And it's cheap so if you decide to
not use it, it should not be a big problem :)

Ciao, g.

On Mon, 22 Mar 2021 at 21:02, Knute Snortum  wrote:

> Here's a cheap, USP MIDI keyboard (disclaimer, I haven't used it
> personally):
>
>
> https://www.sweetwater.com/store/detail/KeyStatn3-32m--m-audio-keystation-mini-32-mk3-keyboard-controller
>
> --
> Knute Snortum
>
> On Mon, Mar 22, 2021 at 11:02 AM Bernhard Kleine
>  wrote:
> >
> > This has not been asked for a while. Which equipment (low cost) do you
> > favor? Do I need more than an usb keyboard?
> >
> > As I am / we all are working with opensource software, there isn't any
> > need for fancy hardware. It only has to work.
> >
> > Thanks for sharing your situation.
> >
> > Bernhard
> >
> > --
> > spitzhalde9
> > D-79853 lenzkirch
> > bernhard.kle...@gmx.net
> > www.b-kleine.com, www.urseetal.net
> > Ich darf auf mein neues Buch "670 Falterarten im Hochschwarzwald"
> aufmerksam machen
> > (Infos bei mir)
> > -
> > thunderbird
> > GPG schlüssel: D5257409
> > fingerprint:
> > 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
> >
> >
>
>


Re: organ - off topic

2020-10-01 Thread Gianmaria Lari
Thanks Martin, Moser and Frauke!

A few days ago I tried to think of a mechanical system to implement the
"sustain" and the "sustained" pedal on an *accordion*.

I found some solutions that didn't seem particularly ingenious and that at
least theoretically could work.

So I wondered if these pedals already existed on some organs where there
are less size weight issues compared to an accordion.

As you say, probably the reason why these pedals are not there (or are not
common) is not a technical one; it's that they are simply not useful or not
useful enough on an organ.

Gianmaria

On Thu, 1 Oct 2020 at 13:36, Frauke Jurgensen  wrote:

> Some organs have a toy stop emulating bagpipes, which is a single lever
> that activates two drone pipes (reeds): they are either on continuously, or
> off. And organ tuners commonly use a key weight to depress individual keys
> while they are tuning, if they have to tune without an assistant. There are
> contemporary organ pieces that use multiple key weights for special
> effects.
>
> > On 1 Oct 2020, at 10:37, J Martin Rushton <
> martinrushto...@btinternet.com> wrote:
> >
> > "the church built around many organs" - I like your priorities!  I got
> in trouble once for similarly suggesting that the purpose of a cathedral
> was to support the bell tower (we were in the ringing chamber at the time).
> :-o
> >
> > On 01/10/2020 10:02, Lukas-Fabian Moser wrote:
> >> Hi Gianmaria,
> >> Am 01.10.20 um 10:32 schrieb Gianmaria Lari:
> >>> Sorry if I ask this question here. I do it as usual because I have a
> lot of consideration for the people who write on this group and I'm sure
> someone can help me.
> >>>
> >>> I'm curious to know if a pipe organ (mechanical) can have a sustain
> pedal and a sostenuto pedal like a piano. I had a look online but I have
> not been able to find it.
> >> Not that I know of.
> >> Or, to be more precise:
> >>  * The _soft_ pedal (left, una corda) does indeed have a rough
> >>equivalent on many organs, namely the "Schweller":
> >>https://en.wikipedia.org/wiki/Swell_box
> >>  * The _sostenuto_ pedal (middle) can, as far as I know, only be faked
> >>using mechanical devices holding down some keys. And of course, keys
> >>may be stuck also without the player intending it.
> >>  * The _damper_ pedal (right, sustain) is built-in to most organs by
> >>virtue of the acoustics of the church build around many organs,
> >>drowning the music in a sea of lingering pitches ;-)
> >> Lukas
> >
> > --
> > J Martin Rushton MBCS
> >
>
>
>


organ - off topic

2020-10-01 Thread Gianmaria Lari
Sorry if I ask this question here. I do it as usual because I have a lot of
consideration for the people who write on this group and I'm sure someone
can help me.

I'm curious to know if a pipe organ (mechanical) can have a sustain pedal
and a sostenuto pedal like a piano. I had a look online but I have not been
able to find it.

Thanks a lot!
gianmaria


Re: [OT] modify midi

2020-06-16 Thread Gianmaria Lari
Thank you Matt, Mark & Gilles.

I had a look to all your propositions and the idea to convert midi to ascii
etc. etc. looks interesting and promising. I will make some test to see how
much work it needs and if it something that can work.

Thanks a lot!
g.

On Mon, 15 Jun 2020 at 16:58, Matt Wallis  wrote:

> On 15/06/2020 12:18, Mark Knoop wrote:
> > At 11:09 on 15 Jun 2020, Gianmaria Lari wrote:
> >> Sometimes I would like to modify a bit the midi file generated by
> >> Lilypond. What stops me from doing that is that in case I modify the
> >> lilypond source I lose all the work done on the midi and I have to do
> >> it again from scratch.
> >>
> >> So I was wondering if anyone knows a software that gives you the
> >> possibility to record the list of operations I do on a midi file so
> >> that I can reapply them "automatically". Of course I understand the
> >> limitation that a software like this will have: the midi file you want
> >> to apply the change has to be "very similar" to the original one (for
> >> example changing only the note pitch etc. etc.).
> >
> > There are various utilities on the web for converting midi to and from
> text formats, e.g. http://www.archduke.org/midi/
> >
> > You could have a potential workflow as follows:
> >
> > - convert Lilypond's MIDI output to text
> > - edit as necessary
> > - save diff of the edit
> > - convert back to MIDI for playback
> > ...
> > - edit Lilypond, export new MIDI, convert to text
> > - use patch to apply previous diff
> > - convert back to MIDI for playback
> >
> > https://www.pair.com/support/kb/paircloud-diff-and-patch/
>
> I wonder if it's possible to use git.  For example:
>
> - Commit (text version of) original midi in a branch called, say
> 'from-lilypond'
> - Create a new branch called, say 'modifications'
> - Make your modifications in the 'modifications' branch (this may
> involve another conversion from text to midi and back, depending on how
> you make your modifications)
> - When you have a new midi from lilypond, commit (a text version of) it
> to the 'from-lilypond' branch,.
> - Switch to  'modifications' branch, and merge from the branch
> 'from-lilypond'
>
> In all of the above, you use the same filename for all versions of the
> midi, and in both branches.
>
> Well, that's a back of an envelope sketch. I'm not sure if this has any
> benefits over the diff-and-patch method described by Mark.
> Is git better than diff-and-patch at dealing with this kind of merge? I
> don't know. I guess it may be useful to have all versions saved in git.
> git also is good at presenting conflicts - but again, I don't know how
> this compares with diff-and-patch - I haven't done much with the latter.
>
> Of course, with either method, you'd probably need to automate it (e.g..
> using make)
>
> Matt
>
>


[OT] modify midi

2020-06-15 Thread Gianmaria Lari
Sometimes I would like to modify a bit the midi file generated by Lilypond.
What stops me from doing that is that in case I modify the lilypond source
I lose all the work done on the midi and I have to do it again from scratch.

So I was wondering if anyone knows a software that gives you the
possibility to record the list of operations I do on a midi file so that I
can reapply them "automatically".  Of course I understand the limitation
that a software like this will have: the midi file you want to apply the
change has to be "very similar" to the original one (for example changing
only the note pitch etc. etc.).

Not sure I have been clear enough . let me know if I have to explain
myself better.
Thanks, g.


Re: Staff.OttavaBracket.direction

2020-06-11 Thread Gianmaria Lari
On Thu, 11 Jun 2020 at 17:33, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> wrote:

> Hi Gianmaria,
> Are you sure to want an *ottava bassa* on above the staff?
> This could be pretty disturbing...
>


No, I'm not sure.
I have no experience; in my particular case it just looked better. If you
advise against it I will avoid it .

Thank you Pierre!
g.


Staff.OttavaBracket.direction

2020-06-11 Thread Gianmaria Lari
My apologies if the question is trivial.

I would like to print the ottavaBracket up the staff but even if I specify
the direction of ottava bracket it doesn't work.  Here it is a not working
example.

\version "2.21.1"
\fixed c'' {
  \override Staff.OttavaBracket.direction = #UP
  \ottava #-1 c d e f
}


Any suggestions?

Thanks, g.


Re: move object - accordion register

2020-06-10 Thread Gianmaria Lari
Thank you Pierre and Jamie for your kind help. The command you mentioned

\markup\halign


worked perfectly!

Thanks a lot, g.

On Wed, 10 Jun 2020 at 13:54, Jamie Beardslee 
wrote:

> Use \halign to horizontally align markup.  A positive value moves it to
> the left (before), and a negative value moves in to the right (after).
>
> For example, the following value of 1.8 moves it just far enough to the
> left that it isn't above the notehead, but above the time signature.
>
> {
>   c'''4-232^\markup\halign #1.8 \discant "120"
> }
>
> --
> Jamie
>


move object - accordion register

2020-06-10 Thread Gianmaria Lari
I would like to move the accordion register symbol on the left, before the
c''. How can I do it?

\version "2.21.1"
#(use-modules (scm accreg))
{
  \discant "120"
  c'''4-232
}


Thank you, gianmaria


Re: Tone cluster

2020-05-22 Thread Gianmaria Lari
>
>  \toneCluster f' ~ f'' ~ \toneCluster f' f''
>
> should work.
>

Yes, it works :)

Thanks Pierre!
g.


Re: Tone cluster

2020-05-22 Thread Gianmaria Lari
Hello Klaus and Pierre,

I tried to use your \toneCluster and it works perfectly for me. Now I tried
to use \toneCluster with tie like this:

 \toneCluster f'  f'' ~ \toneCluster f' f''


... and it works well except it only add a single tie at the top. Is there
any way to add a lower and upper tie like in the attached picture?

Thanks, gianmaria


Re: italian list or forum

2020-05-22 Thread Gianmaria Lari
Ciao Federico,

[...] As I'm seeing more and more italians here (and also on Frescobaldi
> mailing list), I think it's the moment to create a new italian
> "community place".
> Please let me know if you are interested.
>

Interested.
No preference regarding Mailing list on gnu.org or google groups.

Ciao, g.


Re: Suggestion to make sharps and flats persistent

2020-05-18 Thread Gianmaria Lari
My apologies for the text formatting of my last mail. I wrote the message
on my mobile phone and didn't notice the formatting issue.

>


Re: Suggestion to make sharps and flats persistent

2020-05-18 Thread Gianmaria Lari
> [...]. That being said…
>
> Are not
>
> \relative f'
>
> and
>
> \fixed c'''
>
> just "feature requests for laziness with resulting opaqueness"?  ;)

 [...]

>

We (well… modulo me LOL) don’t get this worked up about how \relative makes
> cut-and-paste a nightmare. Why start now?  ;)


Some lilypond users get vaccinated against \relative issues and they are
using it without any problem (it's not my case). So looks pretty clear you
can live and get profit from \relative.

Personally I really don't like \relative: it always cause problems to me
but maybe there are also aesthetic reasons for my aversion.

As I previously said (few months ago) \relative is another thing that in my
opinion should be handle by the editor.

Copy and paste issues with relative is only another bad things but for me
it's not the main one.  For example I consider perfectly acceptable copy
and paste issues with Python indention because the benefits largely
outweigh the drawbacks imho.
G.


Re: Suggestion to make sharps and flats persistent

2020-05-18 Thread Gianmaria Lari
Hello Paul,


> [...]If I'm writing music in F, then I suggest that I be able to use *bF*
> as a pitch instead of *bf*. The *F* would indicate that all subsequent *b*s
> would be flattened until one is encountered with a different accidental or
> until the end of the current music expression. It should have the same
> scope as \stemUp or similar. [...]
>

I don't know "how much Frescobaldi knows" of the lilypond code the user is
editing. If it has a logical representation of the source code it could be
Frescobaldi (and not lilypond) to handle this feature and offering to
autocorrect, according the key signature indicated in the source code, the
note you write while you write it.
You are in F, you write b and it propose bes.
Maybe with different language (never used english for lilypond note input)
this would be more difficult.

Ciao, g.


Re: Remote Ensemble Playing

2020-04-02 Thread Gianmaria Lari
>
> Does anyone have any idea how these people is able to do things like these?
>
> https://youtu.be/Sj4pE_bgRQI
> https://youtu.be/3eXT60rbBVk
>
> [...]

> > One possibility might be having one instrument play along with the
> > conductor video, then have the next musician play along that video
> > while listening to the first recording and so on. That might work out
> > to produce a decent recording (with unreasonable amounts of technical
> > trickery), but I have to second Ralf in saying this is not really
> > playing together. "Making music together" (but not at the same time)
> > might capture the idea better ...
>
> You can reiterate.  Start with people just seeing the conductor, then
> give everyone a mix without their own track and rerecord.  After a few
> iterations, it's becoming pretty close to playing together.
>

Thank you for all the very useful answer.

Best regards, g.


Re: Remote Ensemble Playing

2020-04-01 Thread Gianmaria Lari
Ciao Urs!

On Wed, 1 Apr 2020 at 09:05, Urs Liska  wrote:

> Am Mittwoch, den 01.04.2020, 08:51 +0200 schrieb Gianmaria Lari:
>
> Off topic but very interesting :)
>
> Does anyone have any idea how these people is able to do things like these?
>
> https://youtu.be/Sj4pE_bgRQI
> https://youtu.be/3eXT60rbBVk
>
>
> I think the Rotterdam Philharmonic information says it all: Most of the
> solutions that pop up so far are not "playing together" but playing
> separately to a preproduced "click track", whether this is an actual click
> track or a video recording of the conductor. Then every musician plays
> their part and someone does the digital post production.
>

Could be a "click track" a "neutral" recording maybe a midi file temporized
according a conductor? So that each player can play "with" the music?

I'm asking this because, of course the orchestral musician are
professional, but to play an instrument part without the other instrumental
parts and only following a metronome (or a video of the conductor) doesn't
look easy.

Does anyone know if this (temporized midi file) is something that people
do? Or they really only watch a click track (a video with the score and the
beating metronome)?

Thanks, g.
P.S. Hope my english is understandable.


Re: Remote Ensemble Playing

2020-04-01 Thread Gianmaria Lari
Off topic but very interesting :)

Does anyone have any idea how these people is able to do things like these?

https://youtu.be/Sj4pE_bgRQI
https://youtu.be/3eXT60rbBVk


The only information I found is this:

https://slippedisc.com/2020/03/exclusive-rotterdam-made-that-amazing-beethoven-9th-without-rehearsal/

=
[]
SD What technology did you use for recording?
RP: The video might look ‘easy’ but its not. We used really professional
hard and software, since we also have to protect the level of recording
that we put of there Rotterdam Philharmonic Orchestra. Besides that we
believe that the quality is part of the impact a message like this has.

(We asked Mike for further specifications). Mike adds: In general, what we
do is we pre-produce a click-track which the musicians play to. Keep in
mind that you have to think about tuning and intonation. Then we put all
those videos in sync and work on the sound with professional studio
software and equipment. []
=

What does they mean with "click-track" ?

Thank you, g.


Re: modaltranspose & scheme function

2020-03-19 Thread Gianmaria Lari
(iota 8) produces (0 1 2 3 4 5 6 7).
> (iota 8 0 -1) would produce (0 -1 -2 -3 -4 -5 -6 -7).
>

oh, great! Thanks Aaron!
g.


modaltranspose & scheme function

2020-03-19 Thread Gianmaria Lari
Long time ago with the help of the people in this forum I have been able to
write (to collect) this simple code

\version "2.19.82"
\include "changePitch.ly"

multiModal =
#(define-music-function (scale patternRhytmic patternMelodic) (ly:music?
ly:music? ly:music?)
   #{
 #@(map(lambda (p)
 #{ \changePitch $patternRhytmic \modalTranspose c #(ly:make-pitch -1
p) $scale $patternMelodic #})
 (iota 8))
   #})

scalex = \fixed c' {c d e f g a b}
{ \multiModal \scalex {4 8 8} {c' d' e'} }

generating this:

c4 d8 e
d4 e8 f
e4 f8 g
etc.


I would like to modify it so that the generated output would be:

c4 d8 e
b'4 c8 d
a'4 b'8 c
etc.


Any help?
Thank you, g.


Re: New release

2020-02-06 Thread Gianmaria Lari
Ciao Federico, I would be very glad to help.

On Thu, 6 Feb 2020 at 17:06, Federico Bruni  wrote:

> I'm installing on Windows 7 after cleaning a previous very old version.
> The default path is C:\Program Files (x86)\LilyPond
>

ok.


> Gianmaria, can you test this issue?
> https://sourceforge.net/p/testlilyissues/issues/4943/
>

Sorry but never used Lilyissue. Do you need help for the

#4943 Manual page breaking causing assertion failure


or for the wrong installation path?


Re: New release

2020-02-06 Thread Gianmaria Lari
Hello Phil,

I downloaded and I'm trying to install the windows version.

Is it normal that 2.19.84 version tries to install itself it in the old
folder "LilyPond2.19.83"?

Have a look to the attached screenshot.
Regards Gianmaria

On Thu, 6 Feb 2020 at 14:40, Phil Holmes  wrote:

> We have just released LilyPond version 2.19.84.  We hope this will quickly
> be followed by a new stable release, version 2.20.0.  Please download
> 2.19.84 and test it, to ensure it is stable enough to form the new stable
> release.
>
> Thank you.
>
> --
> Phil Holmes
>
>
>
>


Re: "\removeWithTag #'x {.....}" more concisely

2020-02-06 Thread Gianmaria Lari
Ciao Pierre,

On Thu, 6 Feb 2020 at 08:52, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> wrote:

> Hi Gianmaria,
> How about: rcl = \removeWithTag #'chordLetter \etc
>

Well, that exactly what I need! Great, thanks a lot.

P.S. I have already seen the \etc command but never used and I don't know
what it does. Now I will check!


"\removeWithTag #'x {.....}" more concisely

2020-02-05 Thread Gianmaria Lari
I use very often the following instructions in my lilypond code

\removeWithTag #'chordLetter {.}

where chordletter is a tag I created. Is there any way to write it more
concisely like

\rcl {...}


Thanks a lot, Gianmaria


Re: clusters (accordion)

2020-02-01 Thread Gianmaria Lari
>
> I would like to engrave the cluster symbol in the attached image.
>

I have been able to do something that is similar. Here it is:

\version "2.19.83"
{
  \hide Rest
  \makeClusters { 8 8} r8
  \makeClusters { 8 8} r8
  \makeClusters { 8 8} r8
  \makeClusters { 8 8} r8
  \undo \hide Rest
}

But I'm sorry I didn't understand how it really works makeClusters and they
go out the first measure.
Any help would be appreciated.

Thanks, g.


Re: beam and partial

2020-01-28 Thread Gianmaria Lari
Thank you Aaron and Martin.

It's very clear.

Best regards, g.

On Tue, 28 Jan 2020 at 14:25, Aaron Hill  wrote:

> On 2020-01-28 4:52 am, Gianmaria Lari wrote:
> > Just a curiosity. Why lilypond engrave this:
> >
> > \version "2.19.83"
> > {\partial 8*7 g8 8 8 8 8 8 8}
> >
> >
> > like
> >
> > g8[ 8 8] 8[ 8 8 8]
> >
> > I would expect:
> >
> > g8[ 8 8 8] 8[ 8 8]
>
> Notes within the anacrusis are adjacent to the end of the measure.  To
> beam notes, you would need to consider what the complete measure would
> look like.  This could be done by adding in imaginary skips at the
> beginning of the measure.
>
>\partial 8*7 g8  8 8   8  8 8 8
>=>  \partial 8*8 s8  g8  8 8   8  8 8 8
>=>  \partial 8*8 s8[ g8  8 8]  8[ 8 8 8]
>=>  \partial 8*7 g8[ 8 8]  8[ 8 8 8]
>
>
> -- Aaron Hill
>
>


beam and partial

2020-01-28 Thread Gianmaria Lari
Just a curiosity. Why lilypond engrave this:

\version "2.19.83"
{\partial 8*7 g8 8 8 8 8 8 8}


like

g8[ 8 8] 8[ 8 8 8]

I would expect:

g8[ 8 8 8] 8[ 8 8]


Thanks, g.


clusters (accordion)

2020-01-27 Thread Gianmaria Lari
I would like to engrave the cluster symbol in the attached image.
The excerpt is from the fifth movement of the Zolotaryov accordion kinder
suite N1.

I don't want to use exactly the same notation: if there is a better one
(more modern/standard), that would be ok.

Any suggestions?
Thank you, g.


Re: $nota ^\markup {M} version 2.19 vs 2.21

2019-11-26 Thread Gianmaria Lari
On Tue, 26 Nov 2019 at 15:25, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > On Tue, 26 Nov 2019 at 14:14, David Kastrup  wrote:
> >
> >> Thomas Morley  writes:
> >>
> >> > Am Di., 26. Nov. 2019 um 09:30 Uhr schrieb Gianmaria Lari
> >> > :
> >> >>
> >> >> This code works.
> >> >>
> >> >> \version "2.21.0"
> >> >> test = #(define-scheme-function (nota) (ly:music?)
> >> >>   #{
> >> >>  $nota ^\markup {M}
> >> >>   #})
> >>
> >> Ugh.  Why a scheme function?
> >>
> >
> > Do you remember my work on accordion standard bass notation? Kids are
> grown
> > and now they play things with a more complex notation. I would like to
> > update the "library" I wrote years ago.
> >
> > In my old version of the library I created a list of variables like this:
> >
> > % c note
> >
> > xcb  = {\tag #'midiOut \midiBass
> >\tag #'screenOut \screenBass}
> > xcM = {\tag #'midiOut \midiMajorChord
> >\tag #'screenOut \screenMajorChord}
> > xcm = {\tag #'midiOut \midiMinorChord
> >\tag #'screenOut \screenMinorChord}
> > xcs = {\tag #'midiOut \midiDominantSeventhChord
> >\tag #'screenOut \screenDominantSeventhChord}
> > xcd = {\tag #'midiOut \midiDiminishedSeventhChord
> >\tag #'screenOut \screenDiminishedSeventhChord}
> >
> >
> > The same list exists for each note name: cis, d, dis e etc (it's not a
> long
> > work because it is only the variable name that change so it was almost a
> > copy operation)
> > This worked pretty well except some small issue (ties and other small
> > things). But this year the score I have to engrave use also chords like
> > \chordmode {f/d}. Obviously I can't create a variable for each possible
> > chord like that. Now I would like to try to do the same using some scheme
> > functions.
>
> But why a scheme function and not a music function?
>

ahem. I didn't remember to pay attention to the function type to use.
It's some time I didn't played with lilypond so I had a look online and
tried to get something working.
I will check for music function.

Thank you, g.


Re: $nota ^\markup {M} version 2.19 vs 2.21

2019-11-26 Thread Gianmaria Lari
On Tue, 26 Nov 2019 at 14:14, David Kastrup  wrote:

> Thomas Morley  writes:
>
> > Am Di., 26. Nov. 2019 um 09:30 Uhr schrieb Gianmaria Lari
> > :
> >>
> >> This code works.
> >>
> >> \version "2.21.0"
> >> test = #(define-scheme-function (nota) (ly:music?)
> >>   #{
> >>  $nota ^\markup {M}
> >>   #})
>
> Ugh.  Why a scheme function?
>

Do you remember my work on accordion standard bass notation? Kids are grown
and now they play things with a more complex notation. I would like to
update the "library" I wrote years ago.

In my old version of the library I created a list of variables like this:

% c note

xcb  = {\tag #'midiOut \midiBass
   \tag #'screenOut \screenBass}
xcM = {\tag #'midiOut \midiMajorChord
   \tag #'screenOut \screenMajorChord}
xcm = {\tag #'midiOut \midiMinorChord
   \tag #'screenOut \screenMinorChord}
xcs = {\tag #'midiOut \midiDominantSeventhChord
   \tag #'screenOut \screenDominantSeventhChord}
xcd = {\tag #'midiOut \midiDiminishedSeventhChord
   \tag #'screenOut \screenDiminishedSeventhChord}


The same list exists for each note name: cis, d, dis e etc (it's not a long
work because it is only the variable name that change so it was almost a
copy operation)
This worked pretty well except some small issue (ties and other small
things). But this year the score I have to engrave use also chords like
\chordmode {f/d}. Obviously I can't create a variable for each possible
chord like that. Now I would like to try to do the same using some scheme
functions.

Ciao, g.


Re: $nota ^\markup {M} version 2.19 vs 2.21

2019-11-26 Thread Gianmaria Lari
On Tue, 26 Nov 2019 at 10:53, Thomas Morley 
wrote:

> Am Di., 26. Nov. 2019 um 09:30 Uhr schrieb Gianmaria Lari
> :
> >
> > This code works.
> >
> > \version "2.21.0"
> > test = #(define-scheme-function (nota) (ly:music?)
> >   #{
> >  $nota ^\markup {M}
> >   #})
> >
> > {\test c}
> >
> > but it didn't in version 2.19.83. How I should modify it to make it
> working in 2.19.83?
> > Thank you, g.
> >
>
> If you ensure `nota´ is a single note or a single event-chord, you could
> do:
>  <>^\markup { M } $nota
>

Thank you Harm, it works!!

And yes, 'nota' is a single note or a chord :)

Ciao, g.


$nota ^\markup {M} version 2.19 vs 2.21

2019-11-26 Thread Gianmaria Lari
This code works.

\version "2.21.0"
test = #(define-scheme-function (nota) (ly:music?)
  #{
 $nota ^\markup {M}
  #})

{\test c}

but it didn't in version 2.19.83. How I should modify it to make it working
in 2.19.83?
Thank you, g.


Re: tie & tag

2019-11-25 Thread Gianmaria Lari
Dear Aaron, you wrote:

 []

> \pushToTag and \appendToTag only work on things that have an elements
> property.  So that means this expression is valid but useless:
>
>  \pushToTag #'here c' \tag #'here g'


I tried to search "Element property" and I found this:

http://lilypond.org/doc/v2.18/Documentation/extending/internal-music-representation


[...]
A compound music expression is a music object that contains other music
objects in its properties. A list of objects can be stored in the elements
property of a music object, or a single ‘child’ music object in the element
property. For example, SequentialMusic has its children in elements, and
GraceMusic has its single argument in element. The body of a repeat is
stored in the element property of RepeatedMusic, and the alternatives in
elements.


So if I understand correctly, the code:

  \pushToTag #'here c' \tag #'here g'


doesn't work because g', that is a single note and not a compound music
expression does not have an element property. That's the reason why this
instead works:

\pushToTag #'here c' \tag #'here {g'}


Because {g'} is a compound music expression and it has an element property.
Could you please confirm?

Thank you, g.


Re: tie & tag

2019-11-25 Thread Gianmaria Lari
Dear Aaron...


> A \tag is not a location per se, but rather it marks the following bit
> of music with some identifier.

[.]

Thanks a lot for  your examples, now it's perfectly clear!

I post here some other examples inspired by your code. I did my best to
write the easiest as possible examples. I hope they will be useful to
others. The best would be to see them beside a screenshot of score
generated (I don't put the screenshot here because of the mailing list
policy).

% appendTag {} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first {} c'}
{\someMusic}
{\appendToTag #'first e'4 \appendToTag #'first f' \appendToTag #'first g'
\appendToTag #'first a' \someMusic}
{\appendToTag #'first {e' f' g' a'} \someMusic}

% pushTag {} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first {} c'}
{\someMusic}
{\pushToTag #'first e'4 \pushToTag #'first f' \pushToTag #'first g'
\pushToTag #'first a' \someMusic}
{\pushToTag #'first {e'4 f' g' a'} \someMusic}

% appendTag & pushTag {d2 e} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first { d2 e} c'1}
{\someMusic}
{\appendToTag #'first f'4 \appendToTag #'first g' \appendToTag #'first a'
\appendToTag #'first b' \someMusic}
{\appendToTag #'first {f' g' a' b'} \someMusic}
{\pushToTag #'first f' \pushToTag #'first g' \pushToTag #'first a'
\pushToTag #'first b' \someMusic}
{\pushToTag #'first {f' g' a' b'} \someMusic}

% appendTag & pushTag <>
\version "2.19.83"
someMusic = \fixed c' {r4 \tag #'first <> r4}
{\someMusic}
{\appendToTag #'first e'2 \appendToTag #'first g' \appendToTag #'first b'
\someMusic}
% {\appendToTag #'first  \someMusic}  % wrong, doesn't compile
% {\appendToTag #'first {e'2 g' b'} \someMusic}  % wrong, doesn't compile
{\pushToTag #'first e'2 \pushToTag #'first g' \pushToTag #'first
b'\someMusic}
% {\pushToTag #'first  \someMusic} % wrong, doesn't compile
% {\pushToTag #'first {e'2 g' b'} \someMusic} % wrong, doesn't compile
{\appendToTag #'first e'2 \appendToTag #'first g'4 \appendToTag #'first b'4
\someMusic}
{\pushToTag   #'first e'2 \pushToTag #'first   g'4  \pushToTag #'first b'4
\someMusic}

% appendTag & pushTag 
\version "2.19.83"
someMusic = \fixed c' {r4 \tag #'first 2 r4}
{\someMusic}
{\appendToTag #'first g' \appendToTag #'first b' \someMusic}
{\pushToTag #'first g' \pushToTag #'first b' \someMusic}

% appendTag & pushTag  others examples
\version "2.19.83"
someMusic = \fixed c' {\tag #'first  \tag #'first  \tag #'first
 \tag #'first <>}
{\someMusic}
{\appendToTag #'first b' \appendToTag #'first d'' \someMusic}
{\pushToTag   #'first b' \pushToTag   #'first d'' \someMusic}

% appendTag & pushTag <<>>
\version "2.19.83"
someMusic = \tag #'here <<>>
{\someMusic} %this doesn't generate any score
\pushToTag #'here {c'2 d'} \pushToTag #'here {e'2 f'} \someMusic
\appendToTag #'here {c'2 d'} \appendToTag #'here {e'2 f'} \someMusic

% appendTag & pushTag <>
\version "2.19.83"
someMusic = \tag #'here <>
{\someMusic}
\pushToTag #'here {c'2 d'} \pushToTag #'here {e'2 f'} \someMusic
\appendToTag #'here {c'2 d'} \appendToTag #'here {e'2 f'} \someMusic


Re: tie & tag

2019-11-22 Thread Gianmaria Lari
On Fri, 22 Nov 2019 at 18:53, Aaron Hill  wrote:

> On 2019-11-22 7:49 am, Gianmaria Lari wrote:
> > I tried (again) with PushToTag with no success. And I don't understand
> > why
> > it doesn't work. Here it is the code:
>
> \pushToTag and \appendToTag only work on things that have an elements
> property.  So that means this expression is valid but useless:
>
>  \pushToTag #'here c' \tag #'here g'
>
> Instead, consider the following variations:
>
> 
> \version "2.19.83"
> \pushToTag #'here c' \tag #'here { g' }
> \pushToTag #'here c' \tag #'here < g' >
> \pushToTag #'here c' \tag #'here << g' >>
> 
>

Your code surprise me, so probably I didn't understand how tag do work.
I thought that this

\pushToTag #'here c' \tag #'here { g' }


would be 'converted' to

c' { g' }


that is not a compound music expression and then should not be compiled. So
if I had write that line of code I would instead wrote:

\pushToTag #'here c' { \tag #'here g' }


I would say the same thing about the other lines of your code that I would
write like this:

\pushToTag #'here c' < \tag #'here g' >
\pushToTag #'here c' << \tag #'here g' >>


Of course I tried your code and works perfectly while my variation doesn't.

Could you please give me some hints?

I will discuss the rest of your mail later after I have studied it.
Thank you, g.

>
>


Re: tie & tag

2019-11-22 Thread Gianmaria Lari
I tried (again) with PushToTag with no success. And I don't understand why
it doesn't work. Here it is the code:

\version "2.21.00"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'tieTag {} \tag #'screenOut c' }
myScore = {\pushToTag #'tieTag ~ \nc \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore


I thought that the previous code would be equivalent to

\keepWithTag #'screenOut \pushToTag #'tieTag ~  {\tag #'midiOut   
\tag #'tieTag {} \tag #'screenOut c' } {\tag #'midiOut\tag
#'tieTag {} \tag #'screenOut c' }
\keepWithTag #'midiOut \pushToTag #'tieTag ~  {\tag #'midiOut\tag
#'tieTag {} \tag #'screenOut c' } {\tag #'midiOut\tag #'tieTag {}
\tag #'screenOut c' }

and then to:

{c' c'}
{~}


Where is my mistake?
Thank you, g.


On Fri, 22 Nov 2019 at 14:01, Gianmaria Lari 
wrote:

> Hello Aaron,
> made some tests and I discovered where are the issues.
>
> Here is our working code (just a bit simplified):
>
> \version "2.21.0"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut\tag #'screenOut c' }
> myScore = {\nc << \nc <>~ >> \nc}
> \keepWithTag #'screenOut \myScore
> \keepWithTag #'midiOut   \myScore
>
> It works as desired (by me). It generates two scores. I attached to this
> email.
>
> Now two issues.
> 1) The code stop to works if I remove the highlighted element from myScore
> = {\nc << \nc <>~ >> \nc}. Here it is the new code
>
>
> \version "2.21.0"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut\tag #'screenOut c' }
> myScore = {<< \nc <>~ >> \nc}
> \keepWithTag #'screenOut \myScore
> \keepWithTag #'midiOut   \myScore
>
>
> I think the issue is related to implicite voice creation but in this
> situation I have not a clear idea how to fix it. Any help?
>
> 2) The code doesn't work with articulate script, it generates a warning
> and the ties disappear (tried with version 2.21.0 and 2.19.83). Here it is
> the code that doesn't work:
>
> \version "2.21.0"
> \include "articulate.ly"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut\tag #'screenOut c' }
> myScore = {\nc {<< \nc <>~ >> \nc}}
> *\articulate *\keepWithTag #'screenOut \myScore
> *\articulate *\keepWithTag #'midiOut   \myScore
>
>
> Is there anything we can do?
>
> Thank you, g.
>
>>


Re: tie & tag

2019-11-22 Thread Gianmaria Lari
Hello Aaron,
made some tests and I discovered where are the issues.

Here is our working code (just a bit simplified):

\version "2.21.0"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'screenOut c' }
myScore = {\nc << \nc <>~ >> \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore

It works as desired (by me). It generates two scores. I attached to this
email.

Now two issues.
1) The code stop to works if I remove the highlighted element from myScore
= {\nc << \nc <>~ >> \nc}. Here it is the new code


\version "2.21.0"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'screenOut c' }
myScore = {<< \nc <>~ >> \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore


I think the issue is related to implicite voice creation but in this
situation I have not a clear idea how to fix it. Any help?

2) The code doesn't work with articulate script, it generates a warning and
the ties disappear (tried with version 2.21.0 and 2.19.83). Here it is the
code that doesn't work:

\version "2.21.0"
\include "articulate.ly"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'screenOut c' }
myScore = {\nc {<< \nc <>~ >> \nc}}
*\articulate *\keepWithTag #'screenOut \myScore
*\articulate *\keepWithTag #'midiOut   \myScore


Is there anything we can do?

Thank you, g.

>


Re: tie & tag

2019-11-21 Thread Gianmaria Lari
Ciao Aaron, you wrote:


> > Here's something you can do in 2.19.83:
> >
> > 
> > \version "2.19.83"
> >
> > \tagGroup #'(screenOut midiOut)
> > nc = {\tag #'midiOut   \tag #'screenOut c' }
> > nd = {\tag #'midiOut   \tag #'screenOut d' }
> > myScore = {\nc \nd \nc << \nd s~ >> \nd}
> > \score {\keepWithTag #'screenOut \myScore \layout{}}
> > \score {\keepWithTag #'midiOut   \myScore \layout{}}
> > 
>
> And empty chord works in place of the spacer too:
>
> 
> myScore = {\nc \nd \nc << \nd <>~ >> \nd}
> 
>

it works, and it works also on 2.21.00

But it doesn't work in a bit more complex situation. I make some test and I
will be back.
Thanks a lot, g.


Re: tie & tag

2019-11-21 Thread Gianmaria Lari
Consider this situation:

\version "2.21.00"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut   \tag #'screenOut c' }
nd = {\tag #'midiOut   \tag #'screenOut d' }
myScore = {\nc \nd \nc \nd~\nd}
\score {\keepWithTag #'screenOut \myScore \layout{}}
\score {\keepWithTag #'midiOut   \myScore \layout{}} %here should be \midi{}

Is there any way to have a tie in the score generated for the screen
(screenOut) and also in the score generated for the midi (midiOut)?
Thank you, g.

P.S. I tried using \PushToTag but without success.


Re: tie & tag

2019-11-21 Thread Gianmaria Lari
On Thu, Nov 21, 2019, 5:35 PM David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > I would expect this code
> >
> >
> > \version "2.21.00"
> > test = {\tag #'first c'
> > \tag #'second e'}
> > \keepWithTag #'first {\test~\test}
> > \keepWithTag #'second {\test~\test}
> >
> > ... generates two scores
> >
> > c~c
> >
> > and
> >
> > e~e
> >
> > but it doesn't! It generates
> >
> > c c
> >
> > and
> >
> > e~e
> >
> > Why no ties in the first score?
>
> Why would there be a tie?  This is:
>
> \keepWithTag #'first {\tag #'first c' \tag #'second e'~ ... }
>

Uhm... Ok. The tie is a postevent attached only to e.

>
> > Any "fix"?
>
> { \keepwithTag #'first \test ~ \keepwithTag #'first \test }
>

No, I can't do like this in the code I have.
But I remember something about push tag that maybe could work.
Now I can't try, I'll do it later and I if I found something useful I'll
post it here.

Thank you David



> --
> David Kastrup
>


tie & tag

2019-11-21 Thread Gianmaria Lari
I would expect this code


\version "2.21.00"
test = {\tag #'first c'
\tag #'second e'}
\keepWithTag #'first {\test~\test}
\keepWithTag #'second {\test~\test}

... generates two scores

c~c

and

e~e

but it doesn't! It generates

c c

and

e~e

Why no ties in the first score? Any "fix"?

Thank you, g.


Re: acciaccatura & mis-predicted

2019-11-18 Thread Gianmaria Lari
Thank you Jacques and Harm for your help. I will try to use the previous
version.

Best regards g.


acciaccatura & mis-predicted

2019-11-18 Thread Gianmaria Lari
I'm sure this is a trivial issue but I need help to understand why this
code...

\version "2.21.0"
{
  \acciaccatura cis'8 d'1
  \acciaccatura cis'8 d'1
}


... generates this log:

[]

programming error: mis-predicted force, 108.120472 ~= 108.620856

continuing, cross fingers

programming error: mis-predicted force, 108.120472 ~= 108.620856

continuing, cross fingers

[]



The same code in lower octaves works correctly. For instance this one


\version "2.21.0"

{

  \acciaccatura cis8 d'1

  \acciaccatura cis8 d'1

}


...works without generating errors. Any help?

Apologies if I'm missing something obvious!


Thank you, g.


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
Ciao Aaron,

[]

> And you can use tags if you need the tie to be conditional:
>
> 
> \version "2.19.83"
>
> multipleVoiceConditionalTie = \fixed c' {
><< { g4 \tag #'tie a~ \tag #'noTie a } \\ { e2 } >>
> }
>

Yes, I didn't forget tags; but to me they are syntactically difficult to
use. I always make million of mistakes before my code compiles correctly so
I keep them as a last resort.

Thanks a lot!
Ciao, Gianmaria


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
Ciao Harm,


P.S. My apologies if I included the images in the email and not attached it
> it's for clarity. Please let me know if you lilypond email users always
> prefer to attach images at the end of the messages.
>
> Please always attach and use plain text ;)
>

Well, I saw my beard well grown and clearly gray so I hoped it was time to
try again to include images. I'm joking Harm
Ciao, Gianmaria


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
Michael you gave me the solution! Or at least you gave me the solution for
my simple example. The following works!

\version "2.21.0"
pa = {<< {e'1*~*}\\{c'1*~*}>>}
{ \pa \pa }


Now I have to try in my real file code but I don't see any reason why it
should not work

Thank you!
g.


On Wed, 13 Nov 2019 at 11:16, Gianmaria Lari 
wrote:

>
> On Wed, 13 Nov 2019 at 10:01, Michael Käppler  wrote:
>
>> Hi Gianmaria,
>> Interesting, for me running 2.19.80 the first example does not compile,
>> either.
>>
>
> Yes, I vaguely remember that version 2.21 manage differently
> ties/variable. And probably that was the reason why I decided to use it :)
>
>
>> Was there a recent change regarding post-event handling?
>>
>
> No idea about post-event handling.
>
>
> The problem is that the tie is not a separate expression that you could
>> concatenate with other
>> musical expressions like
>>
> [.]
> Thank you Michael for the explanations!
>
>
>> What are you trying to achieve? Your second example does not make much
>> sense to me,
>> because if you want to tie two equally long notes you would normally use
>> chords []
>>
>
> You're right Michael; to tie two equally long notes I would use a chord.
> But my code was just a very simple example.
>
> Here it is the real situation. My phrase is in a variable. The end of the
> phrase is the following:
>
> [image: image.png]
> and that should be connected once with this
>
> [image: image.png]
>
> and once with this
> [image: image.png]
>
> Probably it doesn't exist a simple solution and the best would to keep the
> last measure outside the variable.
> Thank you Michael!!
>
> P.S. My apologies if I included the images in the email and not attached
> it it's for clarity. Please let me know if you lilypond email users always
> prefer to attach images at the end of the messages.
>


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
On Wed, 13 Nov 2019 at 10:01, Michael Käppler  wrote:

> Hi Gianmaria,
> Interesting, for me running 2.19.80 the first example does not compile,
> either.
>

Yes, I vaguely remember that version 2.21 manage differently ties/variable.
And probably that was the reason why I decided to use it :)


> Was there a recent change regarding post-event handling?
>

No idea about post-event handling.


The problem is that the tie is not a separate expression that you could
> concatenate with other
> musical expressions like
>
[.]
Thank you Michael for the explanations!


> What are you trying to achieve? Your second example does not make much
> sense to me,
> because if you want to tie two equally long notes you would normally use
> chords []
>

You're right Michael; to tie two equally long notes I would use a chord.
But my code was just a very simple example.

Here it is the real situation. My phrase is in a variable. The end of the
phrase is the following:

[image: image.png]
and that should be connected once with this

[image: image.png]

and once with this
[image: image.png]

Probably it doesn't exist a simple solution and the best would to keep the
last measure outside the variable.
Thank you Michael!!

P.S. My apologies if I included the images in the email and not attached it
it's for clarity. Please let me know if you lilypond email users always
prefer to attach images at the end of the messages.


Tie multiple voice music contained in variable

2019-11-12 Thread Gianmaria Lari
The following code containing a tie between variables, compiles and works
perfectly:

\version "2.21.0"
pa = {e'1}
*{ \pa~\pa } * %here is the tie!


Is there any way to do the same in case the variable contains two voices
like in the following code?

\version "2.21.0"
pa = {<< {e'1}\\{c'1}>>}
{ \pa~ \pa } %this does not compile


Thank you, g.


prall / mordent with accidentals

2019-05-24 Thread Gianmaria Lari
What's the standard way to engrave a prall/mordent with accidentals?

I found online these two solutions but would like to know if there is
anything more "standard".

mordentsharp = \mordent _\markup { \tiny \sharp }
{a2^\mordentsharp}

mordentsharp = ^\markup \left-align \center-column {
\musicglyph #"scripts.mordent" \raise #1.0 \tiny\sharp
   }
{a2^\mordentsharp}


P.S. The first one put the sharp above the mordent. How can we put it below
the mordent?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Two simultaneous mark events

2019-05-20 Thread Gianmaria Lari
On Sun, 19 May 2019 at 22:46, Simon Albrecht  wrote:

> On 18.05.19 18:58, Gianmaria Lari wrote:
> > In the past I used some snippet I found on LSR giving the possibility
> > to write multiple rehearsal marks, but I was wondering if there is a
> > simpler way. Isn't this something happen frequently and so should be
> > easy to do?
>
>
> The reason there is an LSR snippet is because the functionality doesn’t
> exist in core LilyPond yet. There are many such snippets where one would
> hope that someone(TM) will implement it properly and add it to the
> codebase…
>

Thank you Simon, this is what I was thinking but I wanted to be sure
nothing change lately.
Thanks also to Andrew and Simon.
g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Two simultaneous mark events

2019-05-18 Thread Gianmaria Lari
I'm often in this situation:

\version "2.21.0"
fine = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
  \mark \markup \italic  "Fine"
}

\fixed c' {
c d e f \bar "|." \fine \break
\mark A c c c c
}


So, I would like the text "Fine" at the end of the first measure (and in
this case at the end of the line) and the rehearsal mark "A" at the
beginning of the next measure (and in this case at the beginning of the
second line).

In the past I used some snippet I found on LSR giving the possibility to
write multiple rehearsal marks, but I was wondering if there is a simpler
way. Isn't this something happen frequently and so should be easy to do?

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


Re: fixed vs relative

2019-05-09 Thread Gianmaria Lari
On Thu, 9 May 2019 at 21:32, David Wright  wrote:

> On Thu 09 May 2019 at 20:20:36 (+0200), David Kastrup wrote:
> > Gianmaria Lari  writes:
> >
> > > I saw the discussion about fixed vs relative few times in the lilypond
> ml.
> > >
> > > I think it's a lot about personal taste and habit and personally I
> decided
> > > to stick to fixed mainly because I find fixing mistakes in relative
> mode is
> > > much more annoying than writing in fixed way
> > >
> > > But what if the editor would help a bit? What if you enter music in
> > > relative mode (don't worrying to specify the octave) but your editor
> would
> > > propose the "correct" (nearest) octave to add?
> > >
> > > For example suppose your cursor is immediatly after
> > >
> > > b'
> > >
> > >
> > > and then you type
> > >
> > > c
> > >
> > >
> > > What if the editor proposes to autocomplete with '' ?
> > >
> > > This is just an idea.
> >
> > You know that Frescobaldi can convert absolute to relative and vice
> versa?
>
> As can the   ly   standalone (derived from F~ possibly).
>

Sorry I don't understand.


> But if you can coerce an editor into doing this trick, I would suggest
> that absolute is a better target than fixed. Perhaps you meant that anyway.
>

What's the difference? I was thinking they were synonimus in lilypond
talking.


> However, there may be a downside. With relative, a wrong decision on
> one note has a dramatic effect on the following music, but is easily
> corrected with one tick. When this trick has been applied, many
> notes may have to be individually tickled after the mistake is
> discovered.
>

Maybe you're right. Or maybe the fact to see clearly what the editor
propose you (for each note) make you very self conscious of what you write.

Generally I appreciate the autocomplete feature even if I found it making
my though less fluent (but maybe it's better :))
g.





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


Re: fixed vs relative

2019-05-09 Thread Gianmaria Lari
On Thu, 9 May 2019 at 20:20, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > I saw the discussion about fixed vs relative few times in the lilypond
> ml.
> >
> > I think it's a lot about personal taste and habit and personally I
> decided
> > to stick to fixed mainly because I find fixing mistakes in relative mode
> is
> > much more annoying than writing in fixed way
> >
> > But what if the editor would help a bit? What if you enter music in
> > relative mode (don't worrying to specify the octave) but your editor
> would
> > propose the "correct" (nearest) octave to add?
> >
> > For example suppose your cursor is immediatly after
> >
> > b'
> >
> >
> > and then you type
> >
> > c
> >
> >
> > What if the editor proposes to autocomplete with '' ?
> >
> > This is just an idea.
>
> You know that Frescobaldi can convert absolute to relative and vice versa?
>

Sure! And the conversion from relative to fixed is the first operation I do
with Frescobaldi each time I interact with a score written in relative
mode.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


fixed vs relative

2019-05-09 Thread Gianmaria Lari
I saw the discussion about fixed vs relative few times in the lilypond ml.

I think it's a lot about personal taste and habit and personally I decided
to stick to fixed mainly because I find fixing mistakes in relative mode is
much more annoying than writing in fixed way

But what if the editor would help a bit? What if you enter music in
relative mode (don't worrying to specify the octave) but your editor would
propose the "correct" (nearest) octave to add?

For example suppose your cursor is immediatly after

b'


and then you type

c


What if the editor proposes to autocomplete with '' ?

This is just an idea.
Best regards, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: chord and chordChanges

2019-05-09 Thread Gianmaria Lari
On Thu, 9 May 2019 at 14:18, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> >>
> >>
> >> \version "2.21.0"
> >> <<
> >>   \new Staff   {
> >> c'4 d' e' f'
> >> \repeat volta 2 {c' d' e' f' | g' a' b' c''}
> >>   }
> >>   \new ChordNames \with { chordChanges = ##t } {
> >> g1 \once \unset chordChanges \repeat volta 2 {g1|1}
> >>   }
> >> >>
> >>
> >
> > Thank you David, this is what I wanted!
> >
> > In the meantime I also found another working solution, but it's not
> neat. I
> > post it here anyway:
> >
> > \version "2.21.0"
> > <<
> >   \new Staff   {
> > c'4 d' e' f'
> > \repeat volta 2 {c' d' e' f' | g' a' b' c''}
> >   }
> >   \new ChordNames \with { chordChanges = ##t } {
> > g1 \once \unset chordChanges \repeat volta 2 {g1|1}
> >   }
> >>>
>
> That does not look significantly worse.  Mostly because it is literally
> the same.
>

ahem apologies, I pasted your solution instead of this one:

\version "2.21.0"
<<
  \new Staff   {
c'4 d' e' f'
\repeat volta 2 {c' d' e' f' | g' a' b' c''}
  }
  \new ChordNames {

g1 \repeat volta 2 {g1|\set chordChanges = ##t 1}
  }
>>

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


Re: chord and chordChanges

2019-05-09 Thread Gianmaria Lari
>
>
> \version "2.21.0"
> <<
>   \new Staff   {
> c'4 d' e' f'
> \repeat volta 2 {c' d' e' f' | g' a' b' c''}
>   }
>   \new ChordNames \with { chordChanges = ##t } {
> g1 \once \unset chordChanges \repeat volta 2 {g1|1}
>   }
> >>
>

Thank you David, this is what I wanted!

In the meantime I also found another working solution, but it's not neat. I
post it here anyway:

\version "2.21.0"
<<
  \new Staff   {
c'4 d' e' f'
\repeat volta 2 {c' d' e' f' | g' a' b' c''}
  }
  \new ChordNames \with { chordChanges = ##t } {
g1 \once \unset chordChanges \repeat volta 2 {g1|1}
  }
>>

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


chord and chordChanges

2019-05-09 Thread Gianmaria Lari
Following code prints chord even if they don't change.

\version "2.21.0"
<<
  \new Staff   {
c'4 d' e' f'
\repeat volta 2 {c' d' e' f' | g' a' b' c''}
  }
  \new ChordNames {
g1 \repeat volta 2 {g1|1}
  }
>>

To avoid to print chords always, I used \set chordChanges = ##t. but  I
would like to keep displaying the chord at the beginning of repeat. I tried
this

\version "2.21.0"
<<
  \new Staff   {
c'4 d' e' f'
\repeat volta 2 {c' d' e' f' | g' a' b' c''}
  }
  \new ChordNames {
g1 *\set chordChanges = ##t *\repeat volta 2 {g1|1}
  }
>>

but obviously does not work. Is there any easy way to force lilypond print
the chord in that case or I have to unroll the repeat etc. etc.?
Thank you, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fingering

2019-05-06 Thread Gianmaria Lari
Dear Robin you wrote:


> [...] You should limit lilypond to one staff by saying
> \new Staff << \myMusic \myFing >>
>
>
> That looks better, but it is still not equivalent.
> Try changing the s-2 to s_2:
> the notehead and the fingering collide.
> To avoid that you should also limit lilypond to one voice by saying
> \new Staff \new Voice << \myMusic \myFing >>
>

Thank you Robin! As you probably have seen the third solution it's almost
the same you proposed (probably the only difference is I didn't specified
"\new Staff" ).
Thank you!!
Ciao, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fingering

2019-05-06 Thread Gianmaria Lari
I found some solution that I post here to get some feedback and/or other
suggestions.

Here they are 4 different ways to add fingering to a musical expression:

*1 Standard:*

\version "2.21.0"
\fixed c' {a-1 c' f'-\finger\markup\circle 3 a'-4}


*2 Different context *(thanks Pierre Perol-Schneider for your help!)*:*

\version "2.21.0"
<<
  \new Dynamics \with { \consists Fingering_engraver } {s-1 s
s-\finger\markup\circle 3 s-4}
  \new Staff \fixed c' {a c' f' a'}
>>

*3 Multiple voices* (please correct me if my terminology is not correct!):

\version "2.21.0"
\new Voice {
  <<
{ s-1 s s-\finger\markup\circle 3 s-4}
\fixed c'{ a c' f' a' }
  >>
}


*4 addFingering*

\version "2.21.0"
\include "addFingering.ly"
\addStringNumber \addFingering \fixed c'{a c' f' a'} "1xx4" "xx3x"


The engraved results are the same except for example 2 where the output is
less pleasant because fingering doesn't follow the flow of the notes.
The solution 4 is a bit special because I used the addFingering external
function (thanks Gilles Thibault!).

* * *

Let me discuss a bit about solution 3.

Here it is:


\version "2.21.0"
\new Voice {
  <<
{ s-1 s s-\finger\markup\circle 3 s-4}
\fixed c'{ a c' f' a' }
  >>
}


I rewrite it using variables:


\version "2.21.0"
myMusic = \fixed c'{ a c' f' a' }

myFing = { s-1 s s-\finger\markup\circle 3 s-4}

\new Voice << \myMusic \myFing  >>


Now lets me compare it with the standard solution:

\fixed c' {a-1 c' f'-\finger\markup\circle 3 a'-4}


If I'm not wrong to generate the two variables (myMusic and myFing) from
the previous code should not be that difficult.

1 I duplicate the music expression
2 In the variable where I want to put the music I remove the fingering
3 In the variable where I want to put the fingering I remove all the
articulations and I substitute each note occurrence with their octave with
s.


In frescobaldi there is already a snippet to remove fingering and remove
many type of articulations. And to substitute each note occurrence with 's'
a regex expression should do it pretty easily.

Any comments?
Thank you, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fingering

2019-05-06 Thread Gianmaria Lari
Ciao Stephane!

On Mon, 6 May 2019 at 11:23, Stephan Schöll  wrote:

> Despite of my newbie status on the list, let me ask back:
>
> What's your intention with separating dynamics, the notes and the
> fingerings?
>
> If the separation is only for displaying purposes in a specific staff, I
> would simply remove the corresponding engravers from the voice
>   \remove "Dynamic_engraver"
>   \remove "Fingering_engraver"
>

No, the reason is not for displaying purpose. (For that you can also use
\omit Fingering in front of a music expression).

The reason is that music and fingering are two different things. You don't
always need both. And sometimes you need multiple fingering for different
instruments or different "hand" etc.

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


Re: fingering

2019-05-06 Thread Gianmaria Lari
On Mon, 6 May 2019 at 11:16, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> wrote:

> Hi Gianmaria,
> I suppose you'll have to create/modify your own contect, say
> 'Fingerings, such as :
>
> \version "2.21.0"
> myMusic = {a4 b c' d'}
> myFing = {s4-1 s-2 s-3 s-4}
> <<
>   \new Staff \myMusic
>\new Dynamics \with { \consists Fingering_engraver } \myFing
> >>
>

Yes Pierre, exactly. Thank you for having fixed my code!
g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


fingering

2019-05-06 Thread Gianmaria Lari
I normally enter fingering instruction using the "note-digit" convention (
http://lilypond.org/doc/v2.18/Documentation/notation/inside-the-staff#fingering-instructions)
like this:

\version "2.21.0"
{a4-1 b-2 c'-3 d'-4}


This way of proceeding it's in my opinion the easiest and less error prone
because you see clearly the note where the fingering is applied.

But when I finished to enter the fingering, I would definitely prefer
having the fingering instruction separated by the music. Something like
this (NB: it does not work correctly but I hope the idea is clear):

\version "2.21.0"
myMusic = {a4 b c' d'}
myFing = {s4-1 s-2 s-3 s-4}
<<\myMusic \myFing >>


Now the question: Does exist any Frescobaldi snippet to make this
operation, that means: it takes the music with fingering and it copy the
fingering and the note in two different variable (or something similar)?

The same would make sense also for dynamics.

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


Re: move rehearsal marks

2019-05-05 Thread Gianmaria Lari
Thank you Malte!! That's perfect!
g.

On Sun, 5 May 2019 at 08:36, Malte Meyn  wrote:

>
>
> Am 05.05.19 um 07:48 schrieb Gianmaria Lari:
> > How I can move a bit on the left the rehearsal mark "A" to make it
> > taking less vertical space?
>
> I’d use X-offset:
>
> \override Score.RehearsalMark.X-offset = 1
>
> ___
> 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


move rehearsal marks

2019-05-04 Thread Gianmaria Lari
Sorry to ask this basic question.

How I can move a bit on the left the rehearsal mark "A" to make it taking
less vertical space?

\version "2.21.0"
{
  \ottava 1 a'''1 1 1 1 \break
  \mark A 1 1 1 1^3 \break
}

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


Re: tag issue

2019-04-15 Thread Gianmaria Lari
On Sat, 13 Apr 2019 at 13:06, Thomas Morley 
wrote:

> Am Sa., 13. Apr. 2019 um 12:20 Uhr schrieb Gianmaria Lari
> :
> >
> > Harm, if I understood corretly the code:
> >
> > \version "2.18.2"
> > \tagGroup #'(testOne testTwo)
> >
> > music = {
> >   \tag #'testOne a
> >   \tag #'testTwo b
> > }
> > \keepWithTag #'testOne {\music~\music}
> >
> >
> > is converted to:
> >
> > \keepWithTag #'testOne  {
> >
> >   \tag #'testOne a
> >   \tag #'testTwo b
> > ~
> >   \tag #'testOne a
> >   \tag #'testTwo b
> >
> > }
> >
> >
> > But then why lilypond removes the tie? Shouldn't just remove the
> expression following testTwo that is "b" ?
>
> Some steps back.
> (1) How are Ties done in LilyPond?
> For note-events a TieEvent is added to the note's articulations-property,
> see:
> \void \displayMusic b4~


I tried your examples and now I understood perfectly how does it works.
Everything is very clear now.
Thanks a lot, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: tag issue

2019-04-13 Thread Gianmaria Lari
Harm, if I understood corretly the code:

\version "2.18.2"
\tagGroup #'(testOne testTwo)

music = {
  \tag #'testOne a
  \tag #'testTwo b
}
\keepWithTag #'testOne {\music~\music}


is converted to:

\keepWithTag #'testOne  {

  \tag #'testOne a
  \tag #'testTwo b
~
  \tag #'testOne a
  \tag #'testTwo b

}


But then why lilypond removes the tie? Shouldn't just remove the expression
following testTwo that is "b" ?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: tag issue

2019-04-13 Thread Gianmaria Lari
On Sat, 13 Apr 2019 at 11:41, Thomas Morley 
wrote:

> Am Sa., 13. Apr. 2019 um 11:16 Uhr schrieb Gianmaria Lari
> :
> >
> > I don't understand the following behaviour:
> >
> > \version "2.18.2"
> > \tagGroup #'(testOne testTwo)
> >
> > music = {
> >   \tag #'testOne b
> >   \tag #'testTwo b^"M "
> > }
> >
> > \keepWithTag #'testOne {\music~\music}
> > \keepWithTag #'testTwo {\music~\music}
> >
> > I would expect this would generate two pretty similar scores: the first
> >
> > b~b
> >
> > and the second
> >
> > b^M~b^M
> >
> > (so both with a tie)
> >
> > but instead it generates:
> >
> > b b(no tie!!)
> >
> > and
> >
> > b^M~b^M
> >
> >  Where is the error?
> >
> > * *
> >
> > I noticed that if i invert the tag order
> >
> > music = {
> >   \tag #'testTwo b^"M"
> >   \tag #'testOne b
> > }
> >
> >
> > now the output is:
> >
> > b~b
> >
> > and
> >
> > b^M b^M (no tie!)
> >
> >
> > Any help?
> > Thank you, g.
>
> Hi Gianmaria,
>
> this is surely not 2.18.2-code ;)
>

:))

Well, I installed 2.21 but the reason is "signed" 2.18 it's because I
started from some old code and didn't pay attention to it!


> With 2.21.0 the construct
> \music ~ \music
> will add the Tie to the last event of first \music, if suitable. But
> this last element is removed by \keepWithTag #'testOne, thus no Tie.
>

Ok! Clear

The following would work, although I guess it's not what you want:
>
> { \keepWithTag #'testOne \music ~ \keepWithTag #'testOne \music }
>

You're right, this does not work for what I need :(

I probably could use a scheme substitution function (probably this is not
the correct name) but probably this would change to much my original code.
I have to think about it.

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


  1   2   3   4   5   6   >