state in streams (was Re: [gephex-devel] [Bug 115] libmidi does not support "running status")

Martin Bayer martin at gephex.org
Mon Mar 28 12:17:07 CEST 2005


>>> I propose that the input modules must convert the byte streams from the
>>> hardware interface to event streams. The event sets must be usable
>>> without keeping a parser state in all stream handling modules.
>>>
>>> -> no running status
>>> -> no splitting of midi messages
>
> I agree for gephex-0.5. For 0.4, I think the current behaviour works
> well enough.
> In most cases (alsa sequencer driver, wavein driver, and probably also
> raw alsa
> and OSS), there will not be partial midi messages. And the missing support
> for running status did not cause noticable problems for me so far, so I
> guess it
> is a minor issue.

The proposed behavior is yet "implemented" in the alsaseq and windows
midi input. I'm not sure about the other midi sources.

Without these constraints on the midi stream there is some unneeded
overhead in midi processing modules like mergers, filters, splitters.
The biggest disadvantage is the need to keep internal state in all midi
processing modules.

> For gephex 0.5 we could use OSC with special restrictions as the internal
> event type.

Yes, we should do it that way.

> P.S.: Could somebody with midi hardware please test the running status
> feature in libmidi?

I'll test it later. But you can also try this:

--- orig/modules/src/midiinmodule/alsaseqmidiindriver.cpp
+++ mod/modules/src/midiinmodule/alsaseqmidiindriver.cpp
@@ -93,7 +93,7 @@
      throw std::runtime_error ("Error creating midi event parser");

    snd_midi_event_init(m_impl->decoder);
-  snd_midi_event_no_status (m_impl->decoder,1);
+  // snd_midi_event_no_status (m_impl->decoder,1);
  }

and generate midi data with sequencer like muse or rosegarten. You need
to connect both applications with alsa's "aconnect" or "aconnectgui".

Martin

_______________________________________________
gephex-devel mailing list
gephex-devel at lists.gephex.org
http://lists.gephex.org/mailman/listinfo/gephex-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.gephex.org/pipermail/gephex-devel/attachments/20050328/a01e9df8/signature.pgp


More information about the gephex-devel mailing list