GSoC project: Waveform generation element

Martijn Grendelman martijn at
Wed Mar 28 04:01:35 PDT 2012

Hi all,

>> My this summer project idea is to create waveform generation element
>> in C. I have few rudimentary ideas how this could happen and if anyone
>> has anything to add to this, please do so.
>> Currently when it's done in Jokosher it's just playing back file to
>> fakesink and then listening for level element messages. Also Pitivi
>> has it's own method of reading and storing waveforms. And buzztard as
>> I understands decode the audio in array using fdsink and mmap.
> Gnome audio recorder could also use this.
>> My idea is to create one unified Gstreamer element who would read
>> levels in C and who could be used by all three (and potentially other)
>> applications. It could have several optional features, like changeable
>> frequency of level reads and caching.
> The level element already has a changeable frequency. Of course if you
> want to get the waveform at a higher precission, you need to re-run the
> pipeline right now.

Perhaps this is a little off-topic, but I have recently been playing with
this method and I ran into some trouble.

I created a small Python application that stored values from a level
element in an array for later processing.

The problem I had with it, was that the number of messages seemed to max
out at something like 150/s; I was not able to collect more detailed stats
than that. Lower values for level's 'interval' property didn't increase
the number of messages.

I consider 150 values per second too low for creating a generally usable
dataset for waveform-drawing, so I gave up. Ideally, I would like to be
able to measure every sample, so 44100 or 48000 values per second.

Any idea what I might have been doing wrong? Is it just that Python is too
slow, or is there something else?

Best regards,
Martijn Grendelman

More information about the gstreamer-devel mailing list