lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \articulate command and "rit." was: Re: lilypond-user Digest, Vol 14


From: Thomas Morley
Subject: Re: \articulate command and "rit." was: Re: lilypond-user Digest, Vol 147, Issue 102
Date: Sun, 15 Feb 2015 13:18:21 +0100

Speaking only for myself:

I regard LilyPond as a music-_typesetting_-program.
I don't care much about midi.

Nevertheless, the NR clearly states:
"
A MIDI file is a series of notes in a number of tracks. It is not an
actual sound file [...]
Pieces of music can be converted to MIDI files, so you can listen to
what was entered. This is convenient for checking the music; octaves
that are off or accidentals that were mistyped [...]
"
And that's the best one can say about midi. Any simple midi from
computer generated music sounds terrible. It has _nothing_ to do with
music.

The articulate-script tries to improve the simple midi, but is not
very mature yet, imho.

2015-02-14 22:34 GMT+01:00 Cynthia Karl <address@hidden>:
>>
>> Message: 5
>> Date: Sat, 14 Feb 2015 20:20:37 +0100
>> From: Thomas Morley <address@hidden>
>> To: Patrick Karl <address@hidden>
>> Cc: lilypond-user <address@hidden>
>> Subject: Re: lilypond-user Digest, Vol 137, Issue 62
>> Message-ID:
>>       <address@hidden>
>> Content-Type: text/plain; charset=UTF-8
>>
>> 2015-02-14 18:18 GMT+01:00 Patrick Karl <address@hidden>:
>>> I have run into a couple of anomalies with the \articulate command and the 
>>> abbreviation "rit."
>>>
>>> First,
>>>
>>> \version "2.19.15"
>>> \include "articulate.ly"
>>>
>>> \score{
>>>    \unfoldRepeats \articulate
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>    \new ChoirStaff <<
>>>        \new Staff c-"rit."
>>>        \new Staff c-"rit."
>>>>>
>>>    \layout { }
>>>    \midi { }
>>> }
>>>
>>> throws a warning:       warning: Two simultaneous tempo-change events, 
>>> junking this one
>>>                                warning: Previous tempo-change event here
>>>
>>> If "rit." is replaced with "\markup { "rit." }, no warning is thrown. 
>>> Section "1.8.1 Writing text" pretty much implies that those two ways of 
>>> generating text are equivalent.
>>>
>>> I don't think this warning should occur.  Isn't it a common thing to place 
>>> such a notation in all staves so that if parts are generated, each part 
>>> will have the notation.
>>
>> http://www.lilypond.org/doc/v2.18/Documentation/notation/repeats-in-midi
>>
>> "
>> When creating a score file using \unfoldRepeats for MIDI, it is
>> necessary to make two \score blocks: one for MIDI (with unfolded
>> repeats) and one for notation (with volta, tremolo, and percent
>> repeats). For example,
>>
>> \score {
>>  ?music?
>>  \layout { ? }
>> }
>> \score {
>>  \unfoldRepeats ?music?
>>  \midi { ? }
>> }
>>
> Yes, I knew that.  But I didn't think it was necessary if my music didn't 
> contain any \repeat volta's.  Is that wrong?

In a certain way, yes.
\articulate needs the \unfoldRepeats-command to work with all coded cases.
The NR says (in my wording): if \unfoldRepeats is used, _always_ use two scores.
I'd recommend to use two score every time for \layout and \midi.
(Apart from most simple use-cases)

> Do you think that doing the midi in a separate score will cure the "rit." 
> problem?  I tried it, it doesn't.

It cures the warning triggered by \layout.

The midi will be build as the articulate-script does. This might not
result in convincing output.
Though, have a look _in_ articulate.ly and view the (long) TODO-list
on top of it.

> Maybe you can answer a question about \articulate:  if I generate a pdf file 
> for the score containing the \midi block, why doesn't the pdf file reflect 
> what is in the midi file?  For example, the pdf file generated by my original 
> snippet shows a time signature of 4/4, but each measure actually contains 8 
> quarter-note beats.

The articulate-script heavily changes the entered music and therefore
the visual output by scaling durations, inserting (scaled) rests and
spacers and the like.
If you generate a pdf from this changed music you will see strange things.

Here two examples, with and without \articulate only regarding the
printed output.

Example 1

\version "2.19.15"
m = { \time 2/4 c''4-. c''-! }
\score {
  \displayMusic \m
}

returns:

(make-music
  'SequentialMusic
  'elements
  (list (make-music
          'TimeSignatureMusic
          'beat-structure
          '()
          'denominator
          4
          'numerator
          2)
        (make-music
          'NoteEvent
          'articulations
          (list (make-music
                  'ArticulationEvent
                  'midi-extra-velocity
                  4
                  'midi-length
                  #<procedure #f (len context)>
                  'articulation-type
                  "staccato"))
          'duration
          (ly:make-duration 2)
          'pitch
          (ly:make-pitch 1 0))
        (make-music
          'NoteEvent
          'articulations
          (list (make-music
                  'ArticulationEvent
                  'midi-extra-velocity
                  6
                  'midi-length
                  #<procedure #f (len context)>
                  'articulation-type
                  "staccatissimo"))
          'duration
          (ly:make-duration 2)
          'pitch
          (ly:make-pitch 1 0))))

In short, you see some notes with articulations (the articulations
have some settings for midi)


Compare it with Example 2:

\version "2.19.15"
\include "articulate.ly"

m = { \time 2/4 c''4-. c''-! }

\score {
  \displayMusic {
    \unfoldRepeats
    \articulate
    \m
  }
}

It returns:
(make-music
  'SequentialMusic
  'elements
  (list (make-music
          'SequentialMusic
          'elements
          (list (make-music
                  'TimeSignatureMusic
                  'beat-structure
                  '()
                  'denominator
                  4
                  'numerator
                  2)
                (make-music
                  'SequentialMusic
                  'elements
                  (list (make-music
                          'EventChord
                          'elements
                          (list (make-music
                                  'NoteEvent
                                  'articulations
                                  '()
                                  'duration
                                  (ly:make-duration 2 0 1/2)
                                  'pitch
                                  (ly:make-pitch 1 0))))
                        (make-music
                          'EventChord
                          'elements
                          (list (make-music
                                  'RestEvent
                                  'duration
                                  (ly:make-duration 2 0 1/2))))))
                (make-music
                  'SequentialMusic
                  'elements
                  (list (make-music
                          'EventChord
                          'elements
                          (list (make-music
                                  'NoteEvent
                                  'articulations
                                  '()
                                  'duration
                                  (ly:make-duration 2 0 1/512)
                                  'pitch
                                  (ly:make-pitch 1 0))))
                        (make-music
                          'EventChord
                          'elements
                          (list (make-music
                                  'RestEvent
                                  'duration
                                  (ly:make-duration 2 0 511/512))))))))))

In short, all articulations are gone. Instead scaled notes and rests
are inserted to mimic them.

Ofcourse this makes no sense for printed output (see the attached pngs).

So don't use \layout in a score, while using \articulate. Use two scores.

HTH,
  Harm

Attachment: example-1.png
Description: PNG image

Attachment: example-2.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]