Sunday, 23 September 2012

Pylab spectogram with log. frequency scale

Since the IPython notebook is coolest Open Source project I know, I started doing many prototyping tasks with IPython. The notebook is a great tool not only for DSP, but also for data analysis (SQL), debugging and testing. With Firefox it is easy to create a PDF from your work and show it to colleagues or a customer.

For audio programming I often need a spectrogram that has a logarithmic frequency scale. Matplotlib hasn't got that feature (it doesn't work) and I couldn't find a module on the web, so I hacked a few lines, it uses numpy, scipy and matplotlib. The memory and performance optimisation might be a bit off-the-wall, but it works well.

No comments:

Post a Comment