mrpeach = my favorite externals
On Sep 6, 2013, at 2:54 AM, pd-list-request@iem.at wrote:
From: Martin Peach martin.peach@sympatico.ca Subject: Re: [PD] MIDIFILE read Tempo Date: September 5, 2013 12:36:41 PM EDT To: Maciej Sledziecki maciej@satelita.de Cc: pd-list@iem.at
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
Dan Wilcox @danomatika danomatika.com robotcowboy.com