[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: midi performance hacking
From: |
Michael Welsh Duggan |
Subject: |
Re: midi performance hacking |
Date: |
Tue, 20 Apr 2004 01:36:35 -0400 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Mats Bengtsson <address@hidden> writes:
> I don't really see why you include a new context, at least
> not as long as you don't add the corresponding type of context
> for the paper output.
I accidentally neglected to change the paper output accordingly. I
should have added
\context {
\ScoreContext
\accepts StaffTrack
}
to the paper block. The new context is necessary because at one
point I want a groups of staves to be aggregated into one midi track,
and there is a separate staff which I want on a separate track.
> So far, people who have tried to use the MIDI output for anything
> else then plain "proof reading" (which really is the level of ambition
> for the current MIDI support), have typically needed to do a separate
> \score{} declaration for the MIDI. If your intention is to make easier
> to affect the MIDI output while keeping a single \score{} for both the
> MIDI and paper output, I see the point.
I do think that one score should be sufficient.
> However, then I would not solve it by adding more types of
> contexts. Rather, it should be done with properties.
I agree. I don't want to add more contexts so much as a way of
saying (for example), "In this particular staff I want you to ignore
the fact that the staff context is a Staff_performer, and pass the
events up the context stack to the next accepting Staff_performer."
> One possibility in current LilyPond that may be useful is the \tag
> feature, see
> http://lilypond.org/doc/v2.2/Documentation/user/out-www/lilypond/Different-editions-from-one-source.html#Different%20editions%20from%20one%20source
There are some things that could be hacked with tags, but the ones I
can think of would still require seperate scores. I would like to
make as much of the midi output "just work" as much as possible,
because I see that as the LilyPond way.
> Regarding your previous email on restructuring the MIDI support, I hope
> you can also solve the following bug report:
> http://mail.gnu.org/archive/html/bug-lilypond/2003-10/msg00069.html
I would like to fix that one as well, and should be pretty easy to
do. I think I will look at this next. What I have read
(<URL:http://www.borg.com/~jglatt/> is a good source) seems to
indicate that tempo should be in track zero.
<URL:http://www.borg.com/~jglatt/tech/midifile/tempo.htm> reads:
In format 1, the very first MTrk should consist of only the tempo (and
time signature) events so that it could be read by some device capable
of generating a "tempo map". It is best not to place MIDI events in
this MTrk.
> Michael Welsh Duggan wrote:
>> The included file demonstrates one of the things I want to do on a
>> general basis: to be able to determine at what context levels midi
>> tracks are aggregated upon.
>> It would be nice if this were less tortuous, and didn't require
>> making a new type of Staff. Can anyone think of a good way to do
>> this? (Doesn't necessarily have to be possible in current LilyPond.
>> Something which makes good sense which could be implemented would be
>> just fine. Of course, I am volunteering to help with
>> implementation.)
>> \include "english.ly"
>> \version "2.2.3"
>> \score {
>> <<
>> \new StaffTrack \notes a'1
>> \new PianoStaff <<
>> \new Staff \notes a'
>> \new Staff \notes {\clef bass a}
>> >>
>> >>
>> \paper { raggedright = ##t }
>> \midi {
>> \context {
>> \ScoreContext
>> \accepts StaffTrack
>> }
>> \context {
>> \name StaffTrack
>> \accepts Voice
>> \type "Staff_performer"
>> \consists "Key_performer"
>> \consists "Tempo_performer"
>> \consists "Time_signature_performer"
>> }
>> \context {
>> \StaffContext
>> \type "Performer_group_performer"
>> \remove "Key_performer"
>> \remove "Tempo_performer"
>> \remove "Time_signature_performer"
>> }
>> \context {
>> \PianoStaffContext
>> \type "Staff_performer"
>> \consists "Key_performer"
>> \consists "Tempo_performer"
>> \consists "Time_signature_performer"
>> }
>> }
>> }
--
Michael Welsh Duggan
(address@hidden)