[gst-devel] MIDI/OSC update

Josh Green jgreen at users.sourceforge.net
Fri Sep 10 12:30:06 CEST 2004


On Thu, 2004-09-09 at 15:45, Leif Johnson wrote:
> Hi all -
> 
> I've just returned from a summer trip and was wondering about the status
> of MIDI/OSC support ; I saw some emails briefly this summer but didn't
> have time to respond to them. If anyone working on libraries or design
> could ping back, I'd appreciate it.
> 
> FWIW, I started a MIDI support library this spring but only got it
> partly finished before leaving on said trip ; my aim was to support
> General MIDI with a library for reading and writing MIDI streams and
> files. The library uses an object for converting raw MIDI data to and
> from GstEvents (MIDI streams have a lot of state shortcut conventions,
> so it seemed like some sort of state object would be useful) ; all the
> MIDI parameters are stored as fields in the event's GstStructure.
> 
> I completed some basic functions for converting GstEvents to and from
> binary data and also wrote a basic GstSequencer interface to implement
> in MIDI sequencer elements (GstAlsaMidiSink, etc.). If this sounds
> useful to anyone I'd be glad to continue working on it, or maybe we
> could combine code somehow if someone else has a nice library going.
> 
> Cheers !
> 
> leif

I posted a few of those emails concerning creating a new GValue based
event network in GStreamer. This is how I'm doing MIDI as well as other
control data (connecting GObject properties to GUI widgets in
model-view-controller fashion, etc) in my own project Swami
(http://swami.sourceforge.net). I realized that for the time being, I
will be concentrating my efforts on Swami, since there is still a bit of
work before it is releasable. At some point I'd like to return to
interfacing Swami with GStreamer, to essentially add support for
instrument patch files like SoundFont, DLS2, GUS patches, etc to the
GStreamer media framework. In order for this to be useful, support for
MIDI and soft synths (such as FluidSynth http://www.fluidsynth.org) need
to be added to GStreamer as well.

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). 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.

I like the idea of adding GValue event capabilities to GStreamer, but
perhaps it is overkill? I never really received any feedback as to if it
seemed like something that belonged in the GStreamer framework. I
personally think it is an elegant solution to adding MIDI events as well
as arbitrary valued events. It would only be a matter of porting this
code from Swami to GStreamer.

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.
	Cheers!
	Josh Green

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20040910/8d6ced23/attachment.pgp>


More information about the gstreamer-devel mailing list