Re: Extract tempo / signatures from a MIDI file

From: Alexandre Ratchov <alex_at_caoua.org>
Date: Tue Jul 29 2008 - 08:41:59 CEST
On Mon, Jul 28, 2008 at 10:29:37PM +0200, laurent schwartz wrote:
> Hy,
> 
> I've tried to extract tempo and signatures from a MIDI file using midish.
> 
> I use MIDI file with a lot of signature and tempo changes (even within
> measure). I've come to the conclusion that midish does not yet fully support
> these kind of events.
> 
> I've wrote some procs that extract and print out the desired information
> [measure tempo_change] and [measure signature_change] (see attached file).**
> 

interersting, it would be nice to have ``minfo'' display such a
summary in the long term.

> The measure position for tempo and signatures events that i've extracted
> from MIDI file doesn't correspond to the rosegarden measure position
> indicated in the tempo/signatures view.

it works with the simple .mid files i have. Cound you provide such
a file?

> 
> *My remarks:*
> - it seems that measure position of the tempo and signatures are buggy (if
> you wish, i can provide midi sample)

sure, i'm interested! bugs must be fixed ;)

> - is there a plan to allow tempo changes within a measure  ?

Yes. I've never needed to change the tempo in the middle of a
measure, but there's nothing that would make hard adding code to do
so.

The hard part is to choose the appropriate functions to expose as
``shell'' commands and to extend the syntax to specify all
positions in the ``measure:beat:tick'' format. By ``appropriate'' i
mean simple. A lot of other parts would benefit from such changes
too.

> - is there a plan to provide a function that gives the number of measure of
> the song ?
> - is there a plan to provide a "for" loop within an integer range (or could
> you give me some guidelines on this feature)?

i don't have such plans. imho code that iterates over tempo changes
(or any other event) is much easier to write in C, because it has
access to all appropriate routines that make the task simple and
less error-prone.

-- Alexandre
Received on Tue, 29 Jul 2008 08:41:59 +0200

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:19 CET