[PD] MIDIFILE read Tempo
Maciej Sledziecki
maciej at satelita.de
Thu Sep 5 19:27:02 CEST 2013
That works great !
Even tempo changes within the file are updated.
Thank you very much.
Maciej
Am 05.09.2013 um 18:36 schrieb Martin Peach:
> 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
> <midifile_tempo.pd>
More information about the Pd-list
mailing list