Re: Initial rests in MIDI not included?
Le jeudi 28 septembre 2023 à 13:14 +0200, David Kastrup a écrit : > A quick `git grep lilymidi` confirms that there is is no documentation > for lilymidi. Zero, zilch, nada. > > It is installed with other binaries and is used by > elisp/lilypond-song.el (but what for?). There is this comment in elisp/lilypond-song.el: ;; We can't use midi files in ecasound directly, because setpos ;; doesn't work on them. Apparently its output is being used as some intermediate format, but don't ask me about it. The whole lilysong stuff is not documented either and I don't even know if it's working. I imagine it can also serve as a way of testing the midi.py module that also powers midi2ly (the latter is not exactly in a fabulous state of maintenance either ...). signature.asc Description: This is a digitally signed message part
Re: Initial rests in MIDI not included?
David Wright writes: > Yes, like lilymidi --pretty, the evidence that there was silence > at the beginning of the file is circumstantial, necessitating that > the OP believed I sat through the 160 seconds of silence before > any notes were played. > > BTW where is the output of lilymidi documented? A quick `git grep lilymidi` confirms that there is is no documentation for lilymidi. Zero, zilch, nada. It is installed with other binaries and is used by elisp/lilypond-song.el (but what for?). I'd have expected it to be used as part of 'make check' for comparing MIDI outputs, but that doesn't appear to be the case, either. So I don't really know how I know about it: probably by typing lily and getting curious about the completions. It is a rather handy checking tool for which I found no obvious substitute in the boxes of MIDI tools available on a typical GNU/Linux installation. -- David Kastrup
Re: Initial rests in MIDI not included?
On Wed 27 Sep 2023 at 10:22:04 (+0200), David Kastrup wrote: > David Wright writes: > > On Wed 27 Sep 2023 at 01:13:09 (+0200), Jean Abou Samra wrote: > >> After replacing “ ... ” with “ c' ”, I got the expected MIDI output with > >> LilyPond 2.24.2, i.e., lots of silence and four C notes at the end. > > > > I did the same, and I attach a screenshot of audacious playing the > > file, called mid.midi. The little white blip above the Play button > > is the equaliser graph displaying the first c' at 2 min 40 sec of > > playing time. (Yawn.) > > > > I also attach a screenshot of timidity playing the same file. Notice > > the length of the file: 4 seconds; and that's how long it plays for. > > That's all circumstantial evidence. Nobody so far has actually attached > the resulting MIDI file and/or the output of > > lilymidi --pretty > > on it. That would be way more informative. I dashed off my first reply before I dashed off to choir practice, just to give a (correct, as it turned out) hint to the OP to try playing the file with a different player. I didn't really look at the code as it involved repeats, and I know they've been changed in some way, which I haven't yet read up on. When I got back, I saw only Jean's reply, which still didn't mention how the file was being played, so I thought I'd give examples that showed the contrasting behaviour between two different players. Yes, like lilymidi --pretty, the evidence that there was silence at the beginning of the file is circumstantial, necessitating that the OP believed I sat through the 160 seconds of silence before any notes were played. BTW where is the output of lilymidi documented? Cheers, David.
Re: Initial rests in MIDI not included?
Kevin Cole writes: > On Wed, Sep 27, 2023 at 8:28 AM Jean Abou Samra wrote: > >> Le mercredi 27 septembre 2023 à 08:22 -0400, Kevin Cole a écrit : >> > And... we have a winner! It's a timidity problem! >> >> From what I can read, it is the expected behavior of timidity, but there >> is a --preserve-silence option to change it. >> > > Yeah, I was getting to that. ;-) Once it became a timidity issue, I > suspected there would be an option to alter that behavior. It just > hadn't occurred to me that timidity would default to happily ignoring > the quiet bits. I have no idea why anybody would consider that a sensible default, to be honest. I have a hard time imagining a sensible use case at all. Possibly skipping initial silences in manually recorded MIDI files that aren't edited at all in a sequencer? But that does not really sound all that sensible. -- David Kastrup
Re: Initial rests in MIDI not included?
Jean Abou Samra writes: > Le mercredi 27 septembre 2023 à 08:22 -0400, Kevin Cole a écrit : >> And... we have a winner! It's a timidity problem! > > > From what I can read, it is the expected behavior of timidity, but there > is a --preserve-silence option to change it. I don't have timidity installed and consequently am also missing its manual pages or I'd have checked. -- David Kastrup
Re: Initial rests in MIDI not included?
On Wed, Sep 27, 2023 at 8:28 AM Jean Abou Samra wrote: > Le mercredi 27 septembre 2023 à 08:22 -0400, Kevin Cole a écrit : > > And... we have a winner! It's a timidity problem! > > From what I can read, it is the expected behavior of timidity, but there > is a --preserve-silence option to change it. > Yeah, I was getting to that. ;-) Once it became a timidity issue, I suspected there would be an option to alter that behavior. It just hadn't occurred to me that timidity would default to happily ignoring the quiet bits. Especially since most of my problems end up being a misunderstanding of LilyPond or music theory. So naturally, I defaulted to those as the source of my troubles.
Re: Initial rests in MIDI not included?
Le mercredi 27 septembre 2023 à 08:22 -0400, Kevin Cole a écrit : > And... we have a winner! It's a timidity problem! From what I can read, it is the expected behavior of timidity, but there is a --preserve-silence option to change it. signature.asc Description: This is a digitally signed message part
Re: Initial rests in MIDI not included?
On Wed, Sep 27, 2023 at 8:04 AM David Kastrup wrote: What is apparent is that it may be a bad idea to first pause a number of > bars and only then include \global with a different \tempo . > Oops. Good catch. Thanks. But the location of the tempo change aside your principal problem, like > before, seems to be that timidity as a player skips initial rests. > And... we have a winner! It's a timidity problem! Try fluidsynth -ia pulseaudio -n on your MIDI file as an alternative (on > my system, I get inexplicable problems with -ia pipewire or -ia alsa) > instead. > Thanks!
Re: Initial rests in MIDI not included?
Kevin Cole writes: > I just tried it again with the attached, and still do not get "The Sound of > Silence" ;-) > > $ cat mwe.ly > \version "2.24.2" > \language "english" > global = { > \time 4/4 > \key f \major > \tempo 4=150 > } > PartFour = \relative a { > \global > \clef "treble" > \partial 4 a4 > } > \score { > \new Voice = "PartFour" { > R1*32 R1*24 > \repeat unfold 4 { > \transpose c c,, { \PartFour } > } > } > \midi { } > } $ lilymidi --pretty /tmp/mwe.midi Filename: /tmp/mwe.midi MIDI format: 1 (one or more simultaneous tracks) Divisions:1536 per whole note #Tracks: 2 Track 1: Time 0: Text: creator: Text: LilyPond 2.24.2 Time signature: 4/4, metronome 1/4 Tempo: 100 msec/quarter Time 86016: Time signature: 4/4, metronome 1/4 Tempo: 40 msec/quarter Time 86400: Time signature: 4/4, metronome 1/4 Time 86784: Time signature: 4/4, metronome 1/4 Time 87168: Time signature: 4/4, metronome 1/4 Time 87552: End of Track Track 2: Time 0: Track name: \new:PartFour Time 86016: Key signature: F major Note on: Channel 0, A1(33)@90 Time 86400: Note off: Channel 0, A1(33) Key signature: F major Note on: Channel 0, A1(33)@90 Time 86784: Note off: Channel 0, A1(33) Key signature: F major Note on: Channel 0, A1(33)@90 Time 87168: Note off: Channel 0, A1(33) Key signature: F major Note on: Channel 0, A1(33)@90 Time 87552: Note off: Channel 0, A1(33) End of Track What is apparent is that it may be a bad idea to first pause a number of bars and only then include \global with a different \tempo . But the location of the tempo change aside your principal problem, like before, seems to be that timidity as a player skips initial rests. Try fluidsynth -ia pulseaudio -n on your MIDI file as an alternative (on my system, I get inexplicable problems with -ia pipewire or -ia alsa) instead. -- David Kastrup
Re: Initial rests in MIDI not included?
On 2023-09-27 4:20 am, Kevin Cole wrote: I just tried it again with the attached, and still do not get "The Sound of Silence" ;-) $ cat mwe.ly \version "2.24.2" \language "english" global = { \time 4/4 \key f \major \tempo 4=150 } PartFour = \relative a { \global \clef "treble" \partial 4 a4 } \score { \new Voice = "PartFour" { R1*32 R1*24 \repeat unfold 4 { \transpose c c,, { \PartFour } } } \midi { } } $ lilypond mwe.ly GNU LilyPond 2.24.2 (running Guile 2.2) Processing `mwe.ly' Parsing... Interpreting music... MIDI output to `mwe.midi'... Success: compilation successfully completed $ timidity mwe.midi Playing mwe.midi MIDI file: mwe.midi Format: 1 Tracks: 2 Divisions: 384 Text: creator: Text: LilyPond 2.24.2 Track name: \new:PartFour Playing time: ~5 seconds Notes cut: 0 Notes lost totally: 0 Loads into a sequencer as expected, so the MIDI file itself seems fine. -- Aaron Hill
Re: Initial rests in MIDI not included?
I just tried it again with the attached, and still do not get "The Sound of Silence" ;-) $ cat mwe.ly \version "2.24.2" \language "english" global = { \time 4/4 \key f \major \tempo 4=150 } PartFour = \relative a { \global \clef "treble" \partial 4 a4 } \score { \new Voice = "PartFour" { R1*32 R1*24 \repeat unfold 4 { \transpose c c,, { \PartFour } } } \midi { } } $ lilypond mwe.ly GNU LilyPond 2.24.2 (running Guile 2.2) Processing `mwe.ly' Parsing... Interpreting music... MIDI output to `mwe.midi'... Success: compilation successfully completed $ timidity mwe.midi Playing mwe.midi MIDI file: mwe.midi Format: 1 Tracks: 2 Divisions: 384 Text: creator: Text: LilyPond 2.24.2 Track name: \new:PartFour Playing time: ~5 seconds Notes cut: 0 Notes lost totally: 0 mwe.midi Description: MIDI audio \version "2.24.2" \language "english" global = { \time 4/4 \key f \major \tempo 4=150 } PartFour = \relative a { \global \clef "treble" \partial 4 a4 } \score { \new Voice = "PartFour" { R1*32 R1*24 \repeat unfold 4 { \transpose c c,, { \PartFour } } } \midi { } }
Re: Initial rests in MIDI not included?
David Wright writes: > On Wed 27 Sep 2023 at 01:13:09 (+0200), Jean Abou Samra wrote: >> After replacing “ ... ” with “ c' ”, I got the expected MIDI output with >> LilyPond 2.24.2, i.e., lots of silence and four C notes at the end. > > I did the same, and I attach a screenshot of audacious playing the > file, called mid.midi. The little white blip above the Play button > is the equaliser graph displaying the first c' at 2 min 40 sec of > playing time. (Yawn.) > > I also attach a screenshot of timidity playing the same file. Notice > the length of the file: 4 seconds; and that's how long it plays for. That's all circumstantial evidence. Nobody so far has actually attached the resulting MIDI file and/or the output of lilymidi --pretty on it. That would be way more informative. -- David Kastrup
Re: Initial rests in MIDI not included?
On Wed 27 Sep 2023 at 01:13:09 (+0200), Jean Abou Samra wrote: > After replacing “ ... ” with “ c' ”, I got the expected MIDI output with > LilyPond 2.24.2, i.e., lots of silence and four C notes at the end. I did the same, and I attach a screenshot of audacious playing the file, called mid.midi. The little white blip above the Play button is the equaliser graph displaying the first c' at 2 min 40 sec of playing time. (Yawn.) I also attach a screenshot of timidity playing the same file. Notice the length of the file: 4 seconds; and that's how long it plays for. Cheers, David.
Re: Initial rests in MIDI not included?
On Tue 26 Sep 2023 at 18:52:52 (-0400), Kevin Cole wrote: > Once again, I'm flummoxed by some syntax problem... I was hoping for 40 > measures of silence, as I plan to mix it with other parts, and want to be > able to mute parts interactively. However the following doesn't give me 40 > measures of silence, but starts right in on PartTwo. What have I missed > THIS time? > > %%% > \version "2.24.2" > > PartTwo = \relative a { ... } > > \score { > \unfoldRepeats { > \new Voice = "PartTwo" { > R1*32 R1*8 > \repeat unfold 4 { > \transpose c c' { \PartTwo } > } > } > } > > \midi { } > } > %%% Is it possible your player is set to skip leading/trailing silence, which is quite usual. Cheers, David.
Re: Initial rests in MIDI not included?
After replacing “ ... ” with “ c' ”, I got the expected MIDI output with LilyPond 2.24.2, i.e., lots of silence and four C notes at the end. signature.asc Description: This is a digitally signed message part
Initial rests in MIDI not included?
Once again, I'm flummoxed by some syntax problem... I was hoping for 40 measures of silence, as I plan to mix it with other parts, and want to be able to mute parts interactively. However the following doesn't give me 40 measures of silence, but starts right in on PartTwo. What have I missed THIS time? %%% \version "2.24.2" PartTwo = \relative a { ... } \score { \unfoldRepeats { \new Voice = "PartTwo" { R1*32 R1*8 \repeat unfold 4 { \transpose c c' { \PartTwo } } } } \midi { } } %%%