[Tkinter-discuss] Drawing waveform on a Canvas

Michael Lange klappnase at web.de
Thu Jan 19 13:30:12 CET 2006


Frederik, Mohammad, Stewart,

thanks to all of you.

On Thu, 19 Jan 2006 00:04:32 -0800 (PST)
Mohammad Tayseer <m_tayseer82 at yahoo.com> wrote:

> What is the relationship you want to draw? frequency vs. time or what?
>  frequency/time requires only 1 chart, but other relationships requires more than one, which may suggest using another widget.
>

It's peak level vs. time; the purpose of my app is to display the graphical representation of a (possibly very large)
soundfile to make it easy to determine track borders in e.g. a recorded vinyl album or tape cassette.
I am not sure if "waveform" is the correct term here, Snack calls it that way.
The screenshot at the bottom of <http://www.speech.kth.se/wavesurfer/screenshots.html> shows what it is supposed to
look like, however this one is only about two minutes wheras I need to draw much bigger soundfiles. The fact
that the gap between two tracks may be very short is why I need to be able to stretch it horizontally.

The reason why I don't want to use Snack anymore is that with Snack I had serious problems with simple audio
operations; I could still use Snack only for drawing the waveform, however Snack is a little
"unfriendly" when it tries to access the sound card, making it impossible to start the program
e.g. when esd or artsd are running (BTW, my app is supposed to run on linux only), that's why I
want to look for an alternative.


On Thu, 19 Jan 2006 10:30:16 +0100
"Fredrik Lundh" <fredrik at pythonware.com> wrote:

> the WCK allows you to draw directly from Python data structures:
> 
>     http://effbot.org/zone/wck.htm
> 

On Wed, 18 Jan 2006 18:43:08 -0700
Stewart Midwinter <stewart.midwinter at gmail.com> wrote:

> If you have data from another source, what about using pylab
> (matplotlib) to create the sine-wave plot and save it to an image,
> then display that image on the canvas?  I've used the toolkit for a
> project and it works quite well.

Thanks, I will check what mathplotlib and WCK can do for me (and probably come back with further questions later ,-).

Best regards

Michael


More information about the Tkinter-discuss mailing list