Mixing music and markup in Scheme

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Mixing music and markup in Scheme

Phil Holmes
Yet another question about Scheme functions (note - I _do_ try to find the
answers to my questions by reading the manual and experimenting, and have
been looking at this for a couple of hours without success).

Background: Renaissance music has a somewhat cavalier attitude to
placement of accidentals.  Sometimes they are conventionally placed to the
left of the note, and occasionally they are placed above the note, like
musica ficta in modern transcriptions.  If I use \set suggestAccidentals =
##t in Mensural music, I get a modern accidental sign, so this doesn't
help setting these.  A long-hand way of getting this effect is:

mus = \relative c''
{ c4 d e
  \tag #'mod { fis }
  \tag #'mens {\once \omit Accidental fis
    ^\markup { \musicglyph #"accidentals.mensural1" } }
}

\score {
\keepWithTag #'mens {
    \new MensuralStaff
    {
      \new MensuralVoice { \mus }
    }
  }
}

\score {
\keepWithTag #'mod {
    \new Staff
    {
      \new Voice { \mus }
    }
  }
}

I've tried to write a function that replaces all the tag ... stuff, so
that all I need in the music is

\MensFict fis4

but I can't see how to return the music and the markup in the same
function.

Guidance please?


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing music and markup in Scheme

David Kastrup
Phil Holmes <[hidden email]> writes:

> Yet another question about Scheme functions (note - I _do_ try to find the
> answers to my questions by reading the manual and experimenting, and have
> been looking at this for a couple of hours without success).
>
> Background: Renaissance music has a somewhat cavalier attitude to
> placement of accidentals.  Sometimes they are conventionally placed to the
> left of the note, and occasionally they are placed above the note, like
> musica ficta in modern transcriptions.  If I use \set suggestAccidentals =
> ##t in Mensural music, I get a modern accidental sign, so this doesn't
> help setting these.  A long-hand way of getting this effect is:
Ugh.

Being cleverer than LilyPond rarely pays off.


mus = \relative c''
{ c4 d e \once \set suggestAccidentals = ##t fis
}

\score {
  \new MensuralStaff \with { \override AccidentalSuggestion.glyph-name-alist =
                             #alteration-mensural-glyph-name-alist }
    {
      \new MensuralVoice { \mus }
    }
}



--
David Kastrup

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing music and markup in Scheme

Mark Knoop-4
In reply to this post by Phil Holmes
At 09:25 on 14 Jun 2016, Phil Holmes wrote:

>Yet another question about Scheme functions (note - I _do_ try to find
>the answers to my questions by reading the manual and experimenting,
>and have been looking at this for a couple of hours without success).
>
>Background: Renaissance music has a somewhat cavalier attitude to
>placement of accidentals.  Sometimes they are conventionally placed to
>the left of the note, and occasionally they are placed above the note,
>like musica ficta in modern transcriptions.  If I use \set
>suggestAccidentals = ##t in Mensural music, I get a modern accidental
>sign, so this doesn't help setting these.  A long-hand way of getting
>this effect is:
>
>mus = \relative c''
>{ c4 d e
>  \tag #'mod { fis }
>  \tag #'mens {\once \omit Accidental fis
>    ^\markup { \musicglyph #"accidentals.mensural1" } }
>}
>
>\score {
>\keepWithTag #'mens {
>    \new MensuralStaff
>    {
>      \new MensuralVoice { \mus }
>    }
>  }
>}
>
>\score {
>\keepWithTag #'mod {
>    \new Staff
>    {
>      \new Voice { \mus }
>    }
>  }
>}
>
>I've tried to write a function that replaces all the tag ... stuff, so
>that all I need in the music is
>
>\MensFict fis4

MensFict =
#(define-music-function (note) (ly:music?)
  #{
    \tag #'mens {
      <>^\markup { \musicglyph #"accidentals.mensural1" }
      \once \omit Accidental
    }
    $note
  #})

--
Mark Knoop

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing music and markup in Scheme

Phil Holmes
In reply to this post by David Kastrup
----- Original Message -----
From: "David Kastrup" <[hidden email]>
To: "Phil Holmes" <[hidden email]>
Cc: <[hidden email]>
Sent: Tuesday, June 14, 2016 10:53 AM
Subject: Re: Mixing music and markup in Scheme


> Phil Holmes <[hidden email]> writes:
>
>> Yet another question about Scheme functions (note - I _do_ try to find
>> the
>> answers to my questions by reading the manual and experimenting, and have
>> been looking at this for a couple of hours without success).
>>
>> Background: Renaissance music has a somewhat cavalier attitude to
>> placement of accidentals.  Sometimes they are conventionally placed to
>> the
>> left of the note, and occasionally they are placed above the note, like
>> musica ficta in modern transcriptions.  If I use \set suggestAccidentals
>> =
>> ##t in Mensural music, I get a modern accidental sign, so this doesn't
>> help setting these.  A long-hand way of getting this effect is:
>
> Ugh.
>
> Being cleverer than LilyPond rarely pays off.
>
>


--------------------------------------------------------------------------------


> mus = \relative c''
> { c4 d e \once \set suggestAccidentals = ##t fis
> }
>
> \score {
>  \new MensuralStaff \with { \override
> AccidentalSuggestion.glyph-name-alist =
>      #alteration-mensural-glyph-name-alist }
>    {
>      \new MensuralVoice { \mus }
>    }
> }
>


--------------------------------------------------------------------------------


>
>
> --
> David Kastrup
>

Excellent, as always.  Thanks.

--
Phil Holmes


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing music and markup in Scheme

David Kastrup
"Phil Holmes" <[hidden email]> writes:

>> mus = \relative c''
>> { c4 d e \once \set suggestAccidentals = ##t fis
>> }
>>
>> \score {
>>  \new MensuralStaff \with { \override
>> AccidentalSuggestion.glyph-name-alist =
>>      #alteration-mensural-glyph-name-alist }
>>    {
>>      \new MensuralVoice { \mus }
>>    }
>> }
>>
>
> Excellent, as always.  Thanks.

Well, not really.  Should AccidentalSuggestion.glyph-name-alist be
changed by default here?  Or are the ficta signs in mensural music
usually added as well as styled modernly?

Should there be some more obvious interface?  And/or documentation?

My basic approach here was "there must be something better" and digging
around in the internals doc for candidates and in the "musica ficta" NR
index and finally looking for something related in default context/grob
properties in the Scheme files.

Approaches that don't work without specialist handholding and/or code
archaeology don't really scale well.

--
David Kastrup

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing music and markup in Scheme

Phil Holmes
----- Original Message -----
From: "David Kastrup" <[hidden email]>
To: "Phil Holmes" <[hidden email]>
Cc: <[hidden email]>
Sent: Tuesday, June 14, 2016 11:58 AM
Subject: Re: Mixing music and markup in Scheme


> "Phil Holmes" <[hidden email]> writes:
>
>>> mus = \relative c''
>>> { c4 d e \once \set suggestAccidentals = ##t fis
>>> }
>>>
>>> \score {
>>>  \new MensuralStaff \with { \override
>>> AccidentalSuggestion.glyph-name-alist =
>>>      #alteration-mensural-glyph-name-alist }
>>>    {
>>>      \new MensuralVoice { \mus }
>>>    }
>>> }
>>>
>>
>> Excellent, as always.  Thanks.
>
> Well, not really.  Should AccidentalSuggestion.glyph-name-alist be
> changed by default here?  Or are the ficta signs in mensural music
> usually added as well as styled modernly?
I think it should be changed by default for mensural music.  I have never
seen a modern style accidental in mensural music.  I also believe their
meaning is different: it seems simply an alternative way of showing an
accidental, rather than illustrating an editorial suggestion.

> Should there be some more obvious interface?  And/or documentation?

I think if it's not the default, then it should be documented.  If it is the
default, probably no need.

> --
> David Kastrup
>

FYI attached is an image from a 1597 publication showing both styles.

--
Phil Holmes

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

MensuralFicta.png (35K) Download Attachment