|
|
getting midi timings into a perl program
I'm open to ideas here, because I'm not 100% what I want to achieve. The
aim is to have /something/ that will read midi events (from a drum kit)
in real time, and give some sort of idea of how accurate (or not!) the
note timings are. Googling for a ready-made thingy has turned up nothing
to date.
I'm happy playing with perl for prototyping, so the my game is to feed
midi events into a perl program. But there I'm having a 'spot of bother'.
Most primitive idea - use aseqdump and parse the output. aseqdump
doesn't give timestamps though.
Second guess - use ALSA::MIDI to read midi events. That offers a
timestamp - but it's always set to 0. Turns out this calls ALSA's
snd_seq_event_input() internally - which always returns a 0 timestamp
(I hacked the module's c code to check this). I've not a clue why this
should be: kmidimon for example shows note timings, so they're available
somehow.
Anyway, if someone knows a program to achieve the goal, that would be
ace; otherwise, ideas on how to get at the midi event timestamps would
be more than welcome!!
Thanks.
Oh, ubuntu 10.04; emu 0404/usb for the midi interface.
--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
|
|
0
|
|
|
|
Reply
|
usenet.14 (50)
|
6/6/2012 3:00:34 PM |
|
Mike Scott wrote:
> The aim is to have /something/ that will read midi events (from a drum
> kit) in real time, and give some sort of idea of how accurate (or not!)
> the note timings are.
>
> - use ALSA::MIDI to read midi events. That offers a timestamp - but
> it's always set to 0.
Timestamps require a running queue.
Regards,
Clemens
|
|
0
|
|
|
|
Reply
|
clemens (150)
|
6/6/2012 7:06:16 PM
|
|
On 06/06/12 20:06, Clemens Ladisch wrote:
> Mike Scott wrote:
>> The aim is to have /something/ that will read midi events (from a drum
>> kit) in real time, and give some sort of idea of how accurate (or not!)
>> the note timings are.
>>
>> - use ALSA::MIDI to read midi events. That offers a timestamp - but
>> it's always set to 0.
>
> Timestamps require a running queue.
Thanks. I'd set the 'queue' flag in the client() call, but hadn't
realised I also needed to call start(). Working now.
--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
|
|
0
|
|
|
|
Reply
|
usenet.14 (50)
|
6/7/2012 10:15:17 AM
|
|
Greetings,
On 2012-06-06, Mike Scott <usenet.14@scottsonline.org.uk.invalid> wrote:
> Second guess - use ALSA::MIDI to read midi events. That offers a
> timestamp - but it's always set to 0. Turns out this calls ALSA's
> snd_seq_event_input() internally - which always returns a 0 timestamp
>
Just to help future seachers ... I think that should be:
MIDI::ALSA
Regards, Peter
--
Peter Billam www.pjb.com.au www.pjb.com.au/comp/contact.html
|
|
0
|
|
|
|
Reply
|
peter3566 (122)
|
6/10/2012 7:59:28 AM
|
|
On 10/06/12 08:59, Peter Billam wrote:
> Greetings,
>
> On 2012-06-06, Mike Scott<usenet.14@scottsonline.org.uk.invalid> wrote:
>> Second guess - use ALSA::MIDI to read midi events. That offers a
>> timestamp - but it's always set to 0. Turns out this calls ALSA's
>> snd_seq_event_input() internally - which always returns a 0 timestamp
>>
> Just to help future seachers ... I think that should be:
> MIDI::ALSA
>
> Regards, Peter
>
Ooops. Thanks for the correction.
--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
|
|
0
|
|
|
|
Reply
|
usenet.14 (50)
|
6/11/2012 1:16:20 PM
|
|
|
4 Replies
52 Views
(page loaded in 0.107 seconds)
|
|
|
|
|
|
|
|
|