Adjusting instrumentation of a MIDI output?

2024-05-07 Thread Alasdair McAndrew
Hello,

I've set various instruments for my MIDI output (from an early 18th century
piece), but I have a new soundfont with better instruments.  Is there any
way I can get lilypond to pick up, as it were, the instrument from this
soundfont?  As it is, I just set the Staff.midiInstrument to one of the
standard values, and lilypond does the rest.  But I'd like to mix and
match, as it were, instruments from different soundfonts.

Many thanks,
Alasdair

-- 
Alasdair McAndrew (he/him)
mob: 0432 854 858

https://numbersandshapes.net


Re: Spacing in mensural notation

2024-05-07 Thread Graham King
(copying the list, so that others can benefit/contribute)

Giles,
I played around with this some more, and got slightly better results by
setting
\override Score.SpacingSpanner.shortest-duration-space = #1


Another tip, which might be obvious: for proof-reading, I often play
the MIDI output and follow along, reading the original source.

-- Graham


On Tue, 2024-05-07 at 18:59 +, Giles Boardman wrote:
> Hello Graham,
> 
> I couldn't get any noticeable difference from the spanners, though,
> as a beginner, I'm quite pleased I was in the right ballpark at all!
> The other idea definitely has an effect but with two side effects -
> the lines no longer wrap and the rests are unaffected, so I need to
> become more proficient and then I can perhaps figure it out. My main
> aim is to have something easier to compare with the original for
> proof-reading, rather than to repoduce the pages, which are quite
> elegant and legible enough already.
> 
> Thanks for your help
> 
> Best
> 
> Giles
> 
> From: Graham King 
> Sent: 07 May 2024 14:19
> To: Giles Boardman ; lilypond-
> u...@gnu.org 
> Subject: Re: Spacing in mensural notation 
> I had a similar question a while back [1], which Harm kindly solved.
> Try something like this (it should work in older versions of
> lilypond):
> 
> %~~~
> \version "2.23.10"
> 
> 
> \header {
>   title = "Odhekaton"
>   composer = "Obrecht"
>   piece = "Alto"
> 
> }
> 
> \paper { ragged-right = ##t }
> 
> \score {
>   \new MensuralVoice = "alto" {
>     \clef "petrucci-c2"
>     \time 2/2
>     %\set Score.timing = ##f
> 
>     \override NoteHead.style = #'petrucci
>     % \override SpacingSpanner.base-shortest-duration = 
>   #(ly:make-moment 1/4)
>     % \override Score.SpacingSpanner.strict-note-spacing = ##t
>     \override Score.SpacingSpanner.spacing-increment = 1
>     \override Score.SpacingSpanner.base-shortest-duration = 
>   #(ly:make-moment -3)
>     \override Score.SpacingSpanner.common-shortest-duration = 
>   #(ly:make-moment 8)
> 
>     %% play around with below, probably useful are settings between 2
> and ~10
>     \override Score.SpacingSpanner.shortest-duration-space = #3
> 
>     \hide Score.BarNumber {
>   \cadenzaOn
>   d'\breve
>   c'\breve
>   \[ d'1\melisma f'1. \melismaEnd \]
> 
>   e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 
>   d'1 c'2 d'1. c'4 b4 c'\longa
>     }
>   }
> }
> 
> \layout { }
> %~~~
> 
> To my eye, the COP ligature is still taking too much space, but I
> hope
> this is a good start.
> 
> -- Graham
> 
> 
> [1]
> https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00454.html
> 
> On Tue, 2024-05-07 at 09:18 +, Giles Boardman wrote:
> > Hello,
> > I am new to Lilypond, cutting my teeth on a couple of pretty simple
> > layouts - this exercise is to reproduce a page of a Petrucci
> > score.
> > 
> > 
> > I'm thrilled with this  
> > 
> > 
> > 
> > 
> >  but I would like to remove the space from around the notes and
> > bunch them up like in the original. I tried a couple of things I
> > found that looked relevant - they're commented out in my snippet -
> > and "\compressEmptyMeasures" but to no avail .
> > 
> > \version "2.18.2"
> > 
> > 
> > \header {
> >   title = "Odhekaton"
> >   composer = "Obrecht"
> >      piece = "Alto"
> > 
> >  }
> > 
> > \score {
> > 
> > <<
> >     \new MensuralVoice = "alto" {
> > \clef "petrucci-c2"
> > \time 2/2
> > 
> > \override NoteHead.style = #'petrucci
> > % \override SpacingSpanner.base-shortest-duration = #(ly:make-
> moment
> > 1/4)
> > % \override Score.SpacingSpanner.strict-note-spacing = ##t
> > \hide Score.BarNumber {
> > 
> > d'\breve
> > c'\breve
> > \[ d'1\melisma f'1. \melismaEnd \]
> > 
> > e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 d'1 c'2 d'1.
> > c'4 b4 c'\longa
> > 
> >       }
> >     }
> >  
> >   >>
> > }
> >  
> >   \layout { }
> >   \midi { }
> > 
> > 
> > Any help, gratefully received.
> > 
> > By the way, I know it's not a Lilypond question, but if anyone can
> > tell me how to interpret "Verte"(?) that would be a help too.
> > 
> > Many thanks
> > 
> > Giles
> > 
> > PS I have a brand new installation on Windows 11 too if there is a
> > more recent feature required to make this work. All my other
> related
> > software is on this Windows 8.1 machine, so I use it for
> preference.
> > 
> > 
> > 
> > 
> > 
> > 
> 



Re: \after positioning in voices

2024-05-07 Thread Jean Abou Samra
> 
>   % \after 2 \< \after 8*7 \!\> \after 2 \!
>   s2 d8(c b2)


Make that

      s2 d8(\< c \after 8 \> b2) <>\!

\after doesn't work the way you indented your code suggests you
think it does. The syntax is

\after DURATION ARTICULATION MUSIC

and gives something roughly equivalent to

<< { s DURATION   <>ARTICULATION  } MUSIC >>

So when you do

\after 8*7 \!\>

it is telling LilyPond "put \> here and \! at 8*7 after it".
The first thing to correct is to change that into

\after 8*7 \! \after 8*7 \> ...

or just

\after 8*7 \> ...

(since \> automatically ends the previous hairpin).

But you still have the problem that you're using \after
to put an articulation at 8*7 after the s2, and the
skip that delays it to 8*7 makes the length of

\after 8*7 \> s2

be 8*7, not 2.

In short, \after doesn't just "spawn something in parallel
at a given point". It needs a main music argument to put
the articulation in parallel with, and normally you don't
want that main music argument (usually a note) to be
longer than the delay of the articulation.

I feel that's not a very clear explanation, but it's the
best I could do, sorry :(



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


\after positioning in voices

2024-05-07 Thread Robert Garrigos
I have this code which uses \after to position dynamic marks in the right place 
where I want them:

\version "2.25.14"
\language "english"

example = \relative c' {
  \clef treble
  \key c \major
  \time 5/4
  {
\after 2\< \after 8*7 \>
\repeat unfold 10 {e16 f} \!|
  }
}

\score {
  \new Staff \example
}

which prints:


Trying it with a two voices fragment, doesn’t work:

\version "2.25.14"
\language "english"

example = \relative c'' {
  \clef treble
  \key f \major
  \time 5/4
<<
\new Voice {
  \voiceOne
  \stemDown 2 \stemNeutral 4 2
}
\new Voice {
  \voiceTwo
  \after 2 \< \after 8*7 \!\> \after 2 \!
  s2 d8(c b2)
}
  >>
}

\score {
  \new Staff \example
}

which prints wrong music:


commenting out the \after line, prints the right music:

\version "2.25.14"
\language "english"

example = \relative c'' {
  \clef treble
  \key f \major
  \time 5/4
<<
\new Voice {
  \voiceOne
  \stemDown 2 \stemNeutral 4 2
}
\new Voice {
  \voiceTwo
  % \after 2 \< \after 8*7 \!\> \after 2 \!
  s2 d8(c b2)
}
  >>
}

\score {
  \new Staff \example
}


How can I have the dynamics in the same place as the first example in the two 
voices fragment?

Thanks.

Robert

Re: Spacing in mensural notation

2024-05-07 Thread Graham King
On Tue, 2024-05-07 at 09:18 +, Giles Boardman wrote:
> By the way, I know it's not a Lilypond question, but if anyone can
> tell me how to interpret "Verte"(?) that would be a help too.

Sorry, I missed this part of your question.  It just means "turn (the
page)" - much like the modern "V.S."



Re: Spacing in mensural notation

2024-05-07 Thread Graham King
I had a similar question a while back [1], which Harm kindly solved.
Try something like this (it should work in older versions of lilypond):

%~~~
\version "2.23.10"


\header {
  title = "Odhekaton"
  composer = "Obrecht"
  piece = "Alto"

}

\paper { ragged-right = ##t }

\score {
  \new MensuralVoice = "alto" {
\clef "petrucci-c2"
\time 2/2
%\set Score.timing = ##f

\override NoteHead.style = #'petrucci
% \override SpacingSpanner.base-shortest-duration = 
  #(ly:make-moment 1/4)
% \override Score.SpacingSpanner.strict-note-spacing = ##t
\override Score.SpacingSpanner.spacing-increment = 1
\override Score.SpacingSpanner.base-shortest-duration = 
  #(ly:make-moment -3)
\override Score.SpacingSpanner.common-shortest-duration = 
  #(ly:make-moment 8)

%% play around with below, probably useful are settings between 2
and ~10
\override Score.SpacingSpanner.shortest-duration-space = #3

\hide Score.BarNumber {
  \cadenzaOn
  d'\breve
  c'\breve
  \[ d'1\melisma f'1. \melismaEnd \]

  e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 
  d'1 c'2 d'1. c'4 b4 c'\longa
}
  }
}

\layout { }
%~~~

To my eye, the COP ligature is still taking too much space, but I hope
this is a good start.

-- Graham


[1]
https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00454.html

On Tue, 2024-05-07 at 09:18 +, Giles Boardman wrote:
> Hello,
> I am new to Lilypond, cutting my teeth on a couple of pretty simple
> layouts - this exercise is to reproduce a page of a Petrucci
> score.
> 
> 
> I'm thrilled with this  
> 
> 
> 
> 
>  but I would like to remove the space from around the notes and
> bunch them up like in the original. I tried a couple of things I
> found that looked relevant - they're commented out in my snippet -
> and "\compressEmptyMeasures" but to no avail .
> 
> \version "2.18.2"
> 
> 
> \header {
>   title = "Odhekaton"
>   composer = "Obrecht"
>      piece = "Alto"
> 
>  }
> 
> \score {
> 
> <<
>     \new MensuralVoice = "alto" {
> \clef "petrucci-c2"
> \time 2/2
> 
> \override NoteHead.style = #'petrucci
> % \override SpacingSpanner.base-shortest-duration = #(ly:make-moment
> 1/4)
> % \override Score.SpacingSpanner.strict-note-spacing = ##t
> \hide Score.BarNumber {
> 
> d'\breve
> c'\breve
> \[ d'1\melisma f'1. \melismaEnd \]
> 
> e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 d'1 c'2 d'1.
> c'4 b4 c'\longa
> 
>       }
>     }
>  
>   >>
> }
>  
>   \layout { }
>   \midi { }
> 
> 
> Any help, gratefully received.
> 
> By the way, I know it's not a Lilypond question, but if anyone can
> tell me how to interpret "Verte"(?) that would be a help too.
> 
> Many thanks
> 
> Giles
> 
> PS I have a brand new installation on Windows 11 too if there is a
> more recent feature required to make this work. All my other related
> software is on this Windows 8.1 machine, so I use it for preference.
> 
> 
> 
> 
> 
> 




Re: Spacing in mensural notation

2024-05-07 Thread Kieren MacMillan
Hi Giles,

> I am new to Lilypond

Welcome!

> I would like to remove the space from around the notes and bunch them up like 
> in the original. I tried a couple of things I found that looked relevant - 
> they're commented out in my snippet - and "\compressEmptyMeasures" but to no 
> avail .

Let’s start here:

%%%  SNIPPET BEGINS
\version "2.25.11"

%\version "2.18.2"

\header {
  title = "Odhekaton"
  composer = "Obrecht"
  piece = "Alto"
}

\layout {
  system-count = 1
  indent = 0.25\in
}

\score {
  <<
\new MensuralVoice = "alto" {
  \override NoteHead.style = #'petrucci
  \omit Score.BarNumber
  \clef "petrucci-c2"
  \time 2/2
%  \override Score.SpacingSpanner.base-shortest-duration = #(ly:make-moment 
1/4)
%  \override Score.SpacingSpanner.strict-note-spacing = ##t
  d'\breve
  c'\breve
  \[ d'1\melisma f'1. \melismaEnd \]
  e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 d'1 c'2 d'1. c'4 b4 
c'\longa
}
  >>
}
%%%  SNIPPET ENDS

Notes:

1. I added a \layout block with "system-count = 1"; I wasn’t sure if you wanted 
it on one system, but that’s one way of forcing that (and I figured you should 
know about it).

2. By commenting/uncommenting those SpacingSpanner overrides, you’ll see they 
do very little (at least in the one-system layout). If you change the number 
1/4 in the first line to 1/1 or 1/64, you’ll see bigger differences… Maybe one 
of those is closer to what you want, or maybe not?

3. You can adjust the effective duration (and thus horizontal space) of a note 
using a multiplier. Observe what happens when you replace
  \[ d'1\melisma f'1. \melismaEnd \]
with
  \[ d'1*1/8\melisma f'1.*1/8 \melismaEnd \]
This kind of “hack” can be a useful mechanism to get notes closer together.

Hope something in there helps!
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.




Spacing in mensural notation

2024-05-07 Thread Giles Boardman
Hello,
I am new to Lilypond, cutting my teeth on a couple of pretty simple layouts - 
this exercise is to reproduce a page of a Petrucci score.
[X]


I'm thrilled with this 

[cid:710639fb-021d-4038-8cea-e057f36c7914]



 but I would like to remove the space from around the notes and bunch them 
up like in the original. I tried a couple of things I found that looked 
relevant - they're commented out in my snippet - and "\compressEmptyMeasures" 
but to no avail .

\version "2.18.2"


\header {
  title = "Odhekaton"
  composer = "Obrecht"
 piece = "Alto"

 }

\score {

<<
\new MensuralVoice = "alto" {
\clef "petrucci-c2"
\time 2/2

\override NoteHead.style = #'petrucci
% \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/4)
% \override Score.SpacingSpanner.strict-note-spacing = ##t
\hide Score.BarNumber {

d'\breve
c'\breve
\[ d'1\melisma f'1. \melismaEnd \]

e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 d'1 c'2 d'1. c'4 b4 
c'\longa

  }
}

  >>
}

  \layout { }
  \midi { }


Any help, gratefully received.

By the way, I know it's not a Lilypond question, but if anyone can tell me how 
to interpret "Verte"(?) that would be a help too.

Many thanks

Giles

PS I have a brand new installation on Windows 11 too if there is a more recent 
feature required to make this work. All my other related software is on this 
Windows 8.1 machine, so I use it for preference.