lilypond-devel
[Top][All Lists]
Advanced

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

Re: Automatically unfold percent and tremolo repeats in MIDI output. (is


From: dak
Subject: Re: Automatically unfold percent and tremolo repeats in MIDI output. (issue 769) (issue 40720060)
Date: Sat, 21 Dec 2013 08:23:05 +0000

Keith comments:
The other limitation of \unfoldRepeats is that it fails to see repeats
in
parallel expressions << {\repeat volta 2 s1 } {c2 d2} >> while this
approach
using the iterators will see them and be able to expand them when
requested.

I think he is wrong about that.  I don't see anything inherent in this
code that would work differently here.


https://codereview.appspot.com/40720060/diff/20001/lily/repeated-music.cc
File lily/repeated-music.cc (right):

https://codereview.appspot.com/40720060/diff/20001/lily/repeated-music.cc#newcode152
lily/repeated-music.cc:152: Repeated_music::should_unfold_repeat (Music
*mus, Context *context)
This does not belong in the Repeated_music class.  It's not a property
of the music, but of iteration.

It would probably make sense to derive the various repeat iterators from
a common base class.  This could then have this as a member function
without arguments.

I'm not happy with the hardcoding of midi, but until we can write
\new Staff \with { \midi { repeatTypes = #'(volta-repeated-music } }
namely until context mods can get more discriminatory, we are probably
stuck with it.

However, if the comment is "only unfold in midi" you should make it
match the code by checking is-midi.  Even if we can nowadays only
iterate layouts and midi, there is nothing precluding the iteration of
MusicXML output or other.

https://codereview.appspot.com/40720060/diff/20001/lily/repeated-music.cc#newcode164
lily/repeated-music.cc:164: SCM *tail = &l;
It's usually simpler to just cons the list at the front and do an
scm_reverse_x on it before returning.

https://codereview.appspot.com/40720060/diff/20001/lily/repeated-music.cc#newcode182
lily/repeated-music.cc:182: if (i >= rep_count - alt_count)
That condition does not agree with the current implementation of
unfold-repeats-fully or what it was called.  After checking with the
notation manual, that would appear to be the mistake of
unfold-repeats-fully while this code gets it right.  (Actually, it
should, stealing the code from Unfolded_repeat_iterator).  Duh.

Seems like I should push a fix to that...

https://codereview.appspot.com/40720060/



reply via email to

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