Subject: Re: [PD] MIDIFILE read Tempo
Date: September 5, 2013 12:36:41 PM EDT
On 2013-09-05 09:29, Martin Peach wrote:
On 2013-09-05 07:04, Maciej Sledziecki wrote:
Hello,
ist there any way to read the tempo information contained in a midi file?
Or do I really have to set up a metro for mrpeach/midifile everytime ?
It's been a while since I worked on that but I think you can dump the
info and use that to set up a metro. I could probably add a message to
get it to play automatically.
If you bang the [midifile] after opening the file, the right outlet will emit ticks_per_quarternote and microsec_per_quarternote messages.
So the millisecond rate for the [metro] would be = (microsec_per_quarternote/ticks_per_quarternote)/1000
See attached patch.
Martin