Re: how to use variables

2023-03-25 Thread Dario Marrini
Solved by myself, an ending "}" was missing

Il giorno sab 25 mar 2023 alle ore 09:30 Dario Marrini <
dario.marr...@gmail.com> ha scritto:

> Hi lilypond people,
> I'm going to transcribe an orchester part; I'd like to put some musica
> fragments in variables, then I coil avoid to type again the same things or
> do so many copy and paste; I tried by this way :
>
>
> \version "2.24.1"
>
> \header {
>   title = "Piano Concerto No 1"
>   instrument = "Oboe"
>   composer = "S. Prokofiev"
>   opus = "10"
> }
>
> global = {
>   \key des \major
>   \time 2/2
>
>   }
>
> TEMA = {
>   \relative c'' {
>
> r1
> r2 r4 aes8.( aes16
> c4\< des f g\!
> aes4\> ges f)\!\< g8.( g16\!
> aes4\> ges f\!\< g\!
> aes4\> ges f)\!
>   }
>
> oboe = \relative c'' {
>   \global
>   %1
>   r1
>   r2 r4 aes8.( aes16
>   c4\< des f g\!
>   aes4\> ges f)\!\< g8.( g16\!
>   aes4\> ges f\!\< g\!
>   aes4\> ges f)\!
>   \TEMA
>
> }
>
> but I get error; my goal would be to get all common music fragments in a
> single file, keeping them separated from other music parts, and using it
> with \include statement; is it possible?
>


how to use variables

2023-03-25 Thread Dario Marrini
Hi lilypond people,
I'm going to transcribe an orchester part; I'd like to put some musica
fragments in variables, then I coil avoid to type again the same things or
do so many copy and paste; I tried by this way :


\version "2.24.1"

\header {
  title = "Piano Concerto No 1"
  instrument = "Oboe"
  composer = "S. Prokofiev"
  opus = "10"
}

global = {
  \key des \major
  \time 2/2

  }

TEMA = {
  \relative c'' {

r1
r2 r4 aes8.( aes16
c4\< des f g\!
aes4\> ges f)\!\< g8.( g16\!
aes4\> ges f\!\< g\!
aes4\> ges f)\!
  }

oboe = \relative c'' {
  \global
  %1
  r1
  r2 r4 aes8.( aes16
  c4\< des f g\!
  aes4\> ges f)\!\< g8.( g16\!
  aes4\> ges f\!\< g\!
  aes4\> ges f)\!
  \TEMA

}

but I get error; my goal would be to get all common music fragments in a
single file, keeping them separated from other music parts, and using it
with \include statement; is it possible?


Re: how to install in Linux

2023-03-25 Thread Dario Marrini
Thanks all, I inserted the bin location of 2.24 files in my PATH variable
and everything work fine; I'll have more questions to do...

regards

Il giorno ven 24 mar 2023 alle ore 23:48 Knute Snortum 
ha scritto:

> On Fri, Mar 24, 2023 at 2:47 PM William Rehwinkel via LilyPond user
> discussion  wrote:
>
>> Dear Dario,
>>
>> Personally, I think adding the `lilypond-2.24.1/bin` directory to $PATH
>> is the best way to handle this, whether you placed lilypond-2.24.1 in
>> the user's home directory or somewhere else.
>>
>> -William
>>
>> On 3/24/23 17:41, Dario Marrini wrote:
>> > Hi lilypond people,
>> > I'm using a LinuxMint 21.1 Linux OS distribution, it provides 2.22
>> > Lilypond version, but in website I see there is 2.24 as last stable
>> > version; I've downloaded it, no installer is provided, how could I
>> > integrate the software in my system? is there a script or something
>> else
>> > that could automate the process, or must I link every executable in
>> > /usr/bin or elsewhere, in any location 'touched' by my $PATH ?
>>
>
> There are no installation programs anymore since 2.24.  Lilypond stands on
> its own and is self-contained.  There are, however, extensive instructions
> for how to get LilyPond and Frescobaldi working in a GNU Linux system:
>
> Here are the installation instructions for a GUI install:
> https://lilypond.org/doc/v2.24/Documentation/learning/graphical-setup-under-gnu_002flinux
>
> And here are the same instructions, but from the command line:
> https://lilypond.org/doc/v2.24/Documentation/learning/command-line-setup
>
> --
> Knute Snortum
>


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Mark Mathias
On Fri, Mar 24, 2023, 7:59 PM Leo Correia de Verdier <
leo.correia.de.verd...@gmail.com> wrote:

> The problem with that solution is that it changes all Scripts, including
> all articulations. I would suggest the somewhat hacky solution of
> redefining just the commands in case, like
>
> segno = \tweak color #red \segno
> coda = \tweak color #red \coda
>
> But if something more elegant is required (for instance if there could be
> conflicting tweaks) there is a solution in this thread:
> https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html
>
> HTH
> /Leo
>
> > 25 mars 2023 kl. 00:35 skrev Michael Werner :
> >
> > Hi Laurie,
> >
> > On Fri, Mar 24, 2023 at 7:19 PM savage.laurie 
> wrote:
> > I think the issue might be that I am using explicit \coda and \segno
> commands and your example uses the new \repeat segno form which will be too
> complex in the specific big band chart I'm editing. It's about 160 bars
> long with the segno in bar 24 and the "to coda" symbol in bar 48 and three
> repeated sections, I got lost in the nested braces when I tried the new
> structure. If I was writing it from scratch rather than re-editing it would
> be simpler.
> >
> > That is indeed the issue, as those marks are a different type. Just
> needs a different override in a different context. Turns out that using the
> \coda and \segno commands the symbols created are handled the same as
> articulations. That means they fall into the somewhat more generic Script
> type, which is handled in the Voice context. Therefor:
> >
> > \layout {
> >   \context {
> > \Score
> > \override CodaMark.color = #red
> > \override SegnoMark.color = #red
> > \override SectionLabel.color = #red
> > \override SectionLabel.font-size = #3
> > \override RehearsalMark.font-size = #3
> > \override RehearsalMark.color = #red
> > \override TextMark.color = #red
> >   }
> >   \context {
> > \Voice
> > \override Script.color = #red
> >   }
> > }
> >
> > should get you sorted.
> >
> > Michael


>
>
The "elegant" solution intrigues me, but the link to the thread appears to
be down.

Mark Mathias


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Aaron Hill

On 2023-03-25 6:10 am, Mark Mathias wrote:

On Fri, Mar 24, 2023, 7:59 PM Leo Correia de Verdier <
leo.correia.de.verd...@gmail.com> wrote:
But if something more elegant is required (for instance if there could 
be

conflicting tweaks) there is a solution in this thread:
https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html


The "elegant" solution intrigues me, but the link to the thread appears 
to

be down.


The link seems to be working here.  You can review the same content here 
[1].


[1]: https://www.mail-archive.com/lilypond-user@gnu.org/msg146125.html


-- Aaron Hill



Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Mark Mathias
On Sat, Mar 25, 2023, 9:21 AM Aaron Hill  wrote:

> On 2023-03-25 6:10 am, Mark Mathias wrote:
> > On Fri, Mar 24, 2023, 7:59 PM Leo Correia de Verdier <
> > leo.correia.de.verd...@gmail.com> wrote:
> >> But if something more elegant is required (for instance if there could
> >> be
> >> conflicting tweaks) there is a solution in this thread:
> >> https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html
> >
> > The "elegant" solution intrigues me, but the link to the thread appears
> > to
> > be down.
>
> The link seems to be working here.  You can review the same content here
> [1].
>
> [1]: https://www.mail-archive.com/lilypond-user@gnu.org/msg146125.html
>
>
> -- Aaron Hill
>

>
>
> Thank you! That works.


> Mark


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Mark Mathias
On Sat, Mar 25, 2023 at 10:41 AM Mark Mathias  wrote:

>
>
> On Sat, Mar 25, 2023, 9:21 AM Aaron Hill  wrote:
>
>> On 2023-03-25 6:10 am, Mark Mathias wrote:
>> > On Fri, Mar 24, 2023, 7:59 PM Leo Correia de Verdier <
>> > leo.correia.de.verd...@gmail.com> wrote:
>> >> But if something more elegant is required (for instance if there could
>> >> be
>> >> conflicting tweaks) there is a solution in this thread:
>> >> https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html
>> >
>> > The "elegant" solution intrigues me, but the link to the thread appears
>> > to
>> > be down.
>>
>> The link seems to be working here.  You can review the same content here
>> [1].
>>
>> [1]: https://www.mail-archive.com/lilypond-user@gnu.org/msg146125.html
>>
>>
>> -- Aaron Hill
>>
>
>>
>>
>> Thank you! That works.
>
>
>> Mark
>
>
Oops... Except it doesn't. The accent remains black when I run it in
2.24.0. (I'm only beginning to get a glimmer of how to use Scheme with
LilyPond.)
Mark


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Werner LEMBERG


> The "elegant" solution intrigues me, but the link to the thread
> appears to be down.

Yesterday and today there was a hiccup with gnu.org (and nongnu.org);
see

  https://hostux.social/@fsfstatus

It seems to be fixed now.


Werner



Vertical position of Tie and Script

2023-03-25 Thread Masaki, Akikazu

Hello,

How to set script position closer to its note than ties?
In default, ties are always closer to the note than scripts, but depending on 
the case, contrary is better.

e.g.

\version "2.24.0"
{
  \override Tie.staff-position = 5
  c''1--~ c''
}


In this case, the tenuto should be placed immediately above the note.
Perhaps overriding Script.extra-offset is one of solutions, but is there 
another property controlling the priority of Tie and Script?

Akikazu



Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Aaron Hill

On 2023-03-25 7:58 am, Mark Mathias wrote:

Oops... Except it doesn't. The accent remains black when I run it in
2.24.0. (I'm only beginning to get a glimmer of how to use Scheme with
LilyPond.)


Hmm... I currently run 2.22 for my scores, and the snippet from the 
email thread does appear to work.  Perhaps something changed in 2.24 
that breaks the snippet's usage of a before-line-breaking procedure.


Here is something I threw together that utilizes a custom music function 
to do something similar, albeit with a local effect rather than global:



\version "2.22.0"

tweakArticulations =
#(define-music-function
  (articulation property value music)
  (string? key-list? scheme? ly:music?)
  (define (process-articulation art)
   (let ((type (ly:music-property art 'articulation-type)))
(if (string=? articulation type)
#{ \tweak $property $value $art #}
art)))
  (define (process-music mus)
   (let ((arts (ly:music-property mus 'articulations #f)))
(if (list? arts)
(ly:music-set-property! mus 'articulations
  (map process-articulation arts)))
mus))
  (music-map process-music (ly:music-deep-copy music)))

asdf = { b'4 -. -+  2 -\tweak font-size 3 -> -. 4 -+ -> }

{
  %% Example of applying one tweak:
  \tweakArticulations accent color #red \asdf

  %% Example of chaining multiple tweaks:
  \tweakArticulations stopped color #green
  \tweakArticulations stopped padding 2 \asdf
}



-- Aaron Hill

Re: Vertical position of Tie and Script

2023-03-25 Thread Knute Snortum
On Sat, Mar 25, 2023 at 9:16 AM Masaki, Akikazu <
masaki-0.56714...@zeus.eonet.ne.jp> wrote:

> Hello,
>
> How to set script position closer to its note than ties?
> In default, ties are always closer to the note than scripts, but depending
> on the case, contrary is better.
>
> e.g.
> 
> \version "2.24.0"
> {
>\override Tie.staff-position = 5
>c''1--~ c''
> }
> 
>
> In this case, the tenuto should be placed immediately above the note.
> Perhaps overriding Script.extra-offset is one of solutions, but is there
> another property controlling the priority of Tie and Script?
>

Does it have to be a tie?  It looks more like a slur, in which case you
could write:

\version "2.24.0"
{
   \override Script.avoid-slur = #'inside
   c''1--( c'')
}

Or else you could force the Y-offset of the tenuto:

\version "2.24.0"
{
   \override Tie.staff-position = 5
   \override Script.Y-offset = 1.5
   c''1--~ c''
}

--
Knute Snortum


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-25 Thread Jean Abou Samra
Le samedi 25 mars 2023 à 10:58 -0400, Mark Mathias a écrit :
> Oops... Except it doesn't. The accent remains black when I run it in 2.24.0. 
> (I'm only beginning to get a glimmer of how to use Scheme with LilyPond.)  

In 2.24, `articulation-type` is a symbol, not a string. You need to remove the 
quotes around `"staccato"`, etc. in the alist.


signature.asc
Description: This is a digitally signed message part


Re: how to install in Linux

2023-03-25 Thread Jean Abou Samra
Le vendredi 24 mars 2023 à 22:41 +0100, Dario Marrini a écrit :
> Hi lilypond people,I'm using a LinuxMint 21.1 Linux OS distribution, it 
> provides 2.22 Lilypond version, but in website I see there is 2.24 as last 
> stable version; I've downloaded it, no installer is provided, how could I 
> integrate the software in my system? is there a script or something else that 
> could automate the process, or must I link every executable in /usr/bin or 
> elsewhere, in any location 'touched' by my $PATH ?

While William gave a correct answer about adding the `~/lilypond-2.24.1/bin` 
directory to your `$PATH`, I want to point out that you probably don't need to 
do this at all, unless you are using LilyPond from a terminal frequently and 
can't afford the inconvenience to type `~/lilypond-2.24.1/bin/` every time you 
call it. This is *not* the common case — rather, the common case is to use some 
editor like Frescobaldi or Emacs, and have it run LilyPond for you. In that 
case, telling the tool about where you put LilyPond is simpler, messes less 
with global state that is traditionally reserved to the package manager, and 
plays more nicely with installing several versions of LilyPond in parallel.


signature.asc
Description: This is a digitally signed message part