[gst-devel] MIDI/OSC update
leif at ambient.2y.net
Fri Sep 10 17:02:00 CEST 2004
Hi Josh -
Thanks for your response ! I was just reading over the mails you posted
On Fri, 2004-09-10 at 12:28 -0700, Josh Green wrote:
> The method I am using to pass MIDI is using the previously mentioned
> GValue event object (which looks a lot like a GStreamer event or
> buffer, except the payload is a GValue).
The GValue concept is cool, but I'm wondering if we couldn't just use
the GstStructure that's already in GstEvent ? A GstStructure is pretty
much a collection of named GValues, so it's perhaps a bit more complex
than the single GValue-in-a-buffer (mmm, pig-in-a-blanket ?), but it
might still work.
With a GstStructure approach all the parameters contained in a MIDI
event can be stored in fields in the GstStructure, and in your approach
it sounds like there's a dedicated GObject holding the parameters.
Either way it's helpful to have a support library for interpreting all
the MIDI parameters in the event.
> I then created a MIDI GBoxed type which is modeled off of the ALSA
> union structure that the ALSA sequencer uses to pass around MIDI
> events. This boxed structure can then be sent using the GValue event.
This sounds really good to me ; I think I was going after a similar
approach, but I wasn't using the ALSA union for inspiration. (Actually,
I was looking at Java's MIDI and sequencer libraries  ...) It sounds
like we could combine a lot of our efforts on this point and come up
with a nice MIDI library.
> I like the idea of adding GValue event capabilities to GStreamer, but
> perhaps it is overkill?
I also like the idea of being able to pass around GValues in events ...
but it seems to me like GstStructures would be functional enough.
Perhaps the only concern might be speed : Reducing a GstEvent to a
single GValue could help minimize the need for lots of allocations.
> I'd like to help with this effort. I'm new to the GStreamer
> architecture, but I'm very familiar with the GObject/glib/GTK+
> programming model, since this is what Swami is built on as well. It
> would be nice to have a CVS branch where those of us interested in
> working on this, could pool together efforts and make it happen.
That would be cool !
Leif Morgan Johnson : http://ambient.2y.net/leif/
More information about the gstreamer-devel