lilypond-user
[Top][All Lists]
Advanced

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

Re: calculating durations


From: Matthew M. Munz
Subject: Re: calculating durations
Date: Sat, 17 Sep 2005 22:59:26 -0400

Erik,

Thanks for the suggestions. I will take a look at midi2ly.py. Since the source format has features that I do not believe are found in midi, there would likely be data loss in the case where I convert to midi first.

  - Matt

On Sep 16, 2005, at 12:08 PM, Erik Sandberg wrote:

On Thursday 15 September 2005 20.48, address@hidden wrote:

Hi all,

I am a new user of LilyPond and I am currently writing a program that
transforms scores expressed in a piano-roll-like format into LilyPond
scores, for the purpose of typesetting/printing.

  In the source format, music is expressed (like Midi, I suppose) as
strings of notes with absolute durations, without a notion of time
signatures, barlines, ties, etc.  Is there a tried-and-true algorithm
for converting such "notes" into their proper equivalents in LilyPond,
given a time signature?


I have 2 ideas:
- You could go through MIDI (i.e. let your program convert from
piano-roll-format to MIDI), and use lilypond's midi2ly program to create
the .ly file
- If you are familiar with python, write a piano-roll-to-.ly converter based on midi2ly.py. In this case, you may only distribute the converter under the
terms of the GNU GPL.


  I'm especially thinking of how to resolve a note like "c3" (where 3
means 3 quarter note beats) into Lilypond's "c2." Any suggestions? I
suppose this problem relates to "quantization" but in this case, the
input data is mostly "clean" and unambiguous.  I don't think the
solution should be too compilcated.


This is done by midi2ly, so both the above solutions would fix this.

--
Erik






reply via email to

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