Lilypond: Two Fixes for midi2ly

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lilypond: Two Fixes for midi2ly

Christopher Heckman
A few weeks ago, I brought up some issues concerning midi2ly. I have
made changes and created a patch containing both of them.

(1) Because of calculation errors, "clean" midi files sometimes
produce durations like 4*61/120. The first fix looks for a better
fraction close to 61/120, namely 60/120 or 62/120 that reduces as much
as possible. If there is a factor of 2 in the denominator, the first
part of the duration is modified. For example, 4*61/120 becomes 8
(being 4*1/2 en route).

(2) There is a comment in midi2ly about the code "barfing" if there is
a meter change. The patch also features a fix for the barfing bug: It
keeps track of the current meter and calculates the measure number
based on that.

I know that I probably should have split these up, but in the
debugging process, I did (1) and (2) before knowing about git.

==================================
Christopher Carl Heckman
Honors Faculty
Lecturer
33° 25' 7'' N, 111° 55' 55'' W
ECA 212
School of Mathematical & Statistical Sciences
Arizona State University (T1N R4E Sect22 NW1/4)
Tempe, AZ 85287 - 1804
United States of America
North America
Planet Earth
Solar System
Gould Belt
Local Bubble
Local Fluff
Milky Way Galaxy, Orion Arm
Local Group
Virgo Supercluster
Pisces-Cetus Supercluster Complex
Universe
Multiverse
==================================

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

0001-Fixes-to-midi2ly.py-better-note-lengths-now-supports.patch (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Lilypond: Two Fixes for midi2ly

Christopher Heckman
A few weeks ago, I brought up some issues concerning midi2ly. I have
made changes and created a patch containing both of them.

(1) Because of calculation errors, "clean" midi files sometimes
produce durations like 4*61/120. The first fix looks for a better
fraction close to 61/120, namely 60/120 or 62/120 that reduces as much
as possible. If there is a factor of 2 in the denominator, the first
part of the duration is modified. For example, 4*61/120 becomes 8
(being 4*1/2 en route).

(2) There is a comment in midi2ly about the code "barfing" if there is
a meter change. The patch also features a fix for the barfing bug: It
keeps track of the current meter and calculates the measure number
based on that.

I know that I probably should have split these up, but in the
debugging process, I did (1) and (2) before knowing about git.

--- Christopher Heckman

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

0001-Fixes-to-midi2ly.py-better-note-lengths-now-supports.patch (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lilypond: Two Fixes for midi2ly

James Lowe
Hello Christopher,

On Fri, 26 May 2017 19:54:31 -0500
Christopher Heckman <[hidden email]> wrote:

> A few weeks ago, I brought up some issues concerning midi2ly. I have
> made changes and created a patch containing both of them.
>
> (1) Because of calculation errors, "clean" midi files sometimes
> produce durations like 4*61/120. The first fix looks for a better
> fraction close to 61/120, namely 60/120 or 62/120 that reduces as much
> as possible. If there is a factor of 2 in the denominator, the first
> part of the duration is modified. For example, 4*61/120 becomes 8
> (being 4*1/2 en route).
>
> (2) There is a comment in midi2ly about the code "barfing" if there is
> a meter change. The patch also features a fix for the barfing bug: It
> keeps track of the current meter and calculates the measure number
> based on that.
>
> I know that I probably should have split these up, but in the
> debugging process, I did (1) and (2) before knowing about git.
>
> --- Christopher Heckman

Thank you for the patch, it is now in the Patch testing queue. has
now been assigned to both the tracker and a Rietveld issue (where I
have added you as a CC for any comments/reviews you may need to
address).

I'll shepherd this through the testing and review process for you,
although any changes that may need to be made to the patc, as it is
reviewed by the other Devs, will have to be addressed directly by
yourself (i.e. submit a new patch and attach it to the tracker).

Thank you for contribution so far.

James

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Loading...