lilypond-devel
[Top][All Lists]
Advanced

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

Re: Drums broken in 2.0.1?


From: R. D. Davis
Subject: Re: Drums broken in 2.0.1?
Date: 23 Nov 2003 12:01:57 -0500
Date: Sun, 23 Nov 2003 12:01:57 -0500
User-agent: Mutt/1.3.24i

Quothe Graham Percival, from writings of Sat, Nov 22, 2003 at 09:08:25PM -0800:
> On Sat, 22 Nov 2003 22:16:52 -0500
> "R. D. Davis" <address@hidden> wrote:
> > like some other instrument playing tones, not percussion.  Similarly,
> > with 2.1.0, the drums no longer sound right in the MIDI output from

Oops... I got the 0 and 1 backwards; should have been 2.0.1; I
apologize for the mixup.

What is happening is that the output from the script is somehow being
transposed down an octave.  This script was one that I used for
testing a while back, and I didn't realize at first that the other
instruments didn't sound right in comparison to how they should have
sounded.  Apparently the same thing somehow happened to the output of
drums.ly.  The postscript and pdf output was also transposed down an
octave.  So, perhaps, unless something else is also going on, perhaps
fixing this will fix the problem and make the drums sound like drums
again.

> Did you set the MIDI instrument?  Could you send a short example file
> that demonstrates this?

A file that demonstrates this is included in the lilypond
distribution: lilypond-2.0.1/input/regression/drums.ly.

> There's two possible causes:
> 1.  The LilyPond syntax for percussion changed between 1.6 and 2.1, and
> convert-ly didn't fix everything.

While at first I was suspecting convert-ly, what I've written in reply
to possibility "2." below makes me question my questioning that.

> 2.  There's a bug in the MIDI code for percussion in 2.1

Could there be a bug in the midi code for 2.0.1?  Or, is it possible
that the drums.ly example script is wrong for the new version?  Has
anyone else tried listening to it with this version?

The reason that I doubt this being a midi problem is that if lilypond
is writing notes for the drums lower than the midi software
(e.g. timidity) expects, then perhaps the midi software tries to play
the note, but there are no samples for the drums that go that low in
frequency, so something else, namely a piano sample, gets
substituted... or, something like that, perhaps.

Also note: convert-ly inserted "#(ly:set-option 'old-relative)" as the
first line in the script, but I don't see where it helps anything, and
there don't appear to be any differences if it's removed.

Also, why does convert-ly add \fffff after some notes?

Thanks for looking into this.  The previous versions were great for
including drums in one's music.

Here's a copy of an .ly file demonstrating the problem.  The first
note for the english horn, for example, is an octave below the a below
middle c in the output, and the drums sound more like a piano being
played than drums:

#(ly:set-option 'old-relative)
\version "1.9.8"
\header {
        title = " "
        subtitle = " "
        composer = " "
        meter = " "
        piece = " "
        tagline = " "
}

\include "paper16.ly"
\include "english.ly"


global = \notes {
        \time 4/4
}

Key = \notes \key c \major

melody = { \notes { 

\addlyrics \notes \relative c {

% set the following to false so that the spacing if lyrics is
% correct when slurs are used: 

\property Staff.automaticMelismata = ##f

% r2 r2 r2 r2 r2 r2 r2 r2  f2\fffff e c1 a2 b4 e f } 

} 


 \context Lyrics \lyrics {

}

  }

}


% for stanza numbering: 
% see for example input/regression/lyrics-multi-stanza.ly  


% ------ English Horn ------

ehorn = \notes \relative c {
        \Key

a b a b

}

englishhorn = {
        \global
        \property Staff.instrument = #"english horn"
        \clef treble
        \context Staff <<
                \ehorn
        >>
}
% ------ Bagpipes or maybe Sitar ...maybe use both ------

star = \notes \relative c {
        \Key

         r2 r2 r2 r2 r2 r2 

}


sitar = {
        \global
        \property Staff.instrument = #"sitar"
        \property Staff.midiInstrument = #"sitar"
        \clef bass
        \context Staff <<
                \star
        >>
}


% ------ Drums ------

\include "drumpitch-init.ly"

drh = \notes {\repeat "unfold" 20 {hhc8}}

drl = \notes {\repeat "unfold" 20 {bd4} }

\score { \repeat "volta" 2
<<

         \context StaffGroup = sing <<

                \context Staff = melody \melody
                
\property Score.BarNumber \override #'break-visibility = #end-of-line-invisible
\property Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
\property Score.BarNumber \override #'molecule-callback =
#(make-molecule-boxer 0.1 0.25 0.25 Text_item::brew_molecule)
\property Score.BarNumber \override #'font-relative-size = #1

        >>

        \context StaffGroup = horns <<

                \context Staff = englishhorn \englishhorn

                \context Staff = sitar \sitar
        >>

         \apply #(drums->paper 'drums) \context Staff=drumst \notes <<
             \property Staff.instrument="drums"
             \clef "percussion"
             \context Voice=voa {\stemUp \drh }
             \context Voice=vob {\stemDown \drl }
         >>
>>
        \paper {
                papersize = "letter" 
                linewidth = 14.0 \cm
                \translator { \RemoveEmptyStaffContext }
                \translator {
                        \StaffContext
                        \consists Instrument_name_engraver
                }
                \translator {
                        \ScoreContext
                        BarNumber \override #'padding = #3
                        RehearsalMark \override #'padding = #2
                        skipBars = ##t
                }
        }
}



     \score {

         \context Staff <<


                \context Staff = englishhorn \englishhorn

                \context Staff = sitar \sitar

             \property Staff.instrument = "drums"
             \context Voice=voa {\stemUp \drh }
             \context Voice=vob {\stemDown \drl }
         >>
         \midi { \tempo 4 = 120 }
}

  



-- 
Copyright (C) 2003 R. D. Davis The difference between humans & other animals: 
All Rights Reserved            an unnatural belief that we're above Nature & 
address@hidden  410-744-4900  her other creatures, using dogma to justify such
http://www.rddavis.org         beliefs and to justify much human cruelty.






reply via email to

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