All Projects → andrewrk → PyWaveform

andrewrk / PyWaveform

Licence: other
Python library to create an image of a song's waveform

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
===========================================
*NOTE* This module is deprecated. What you
probably want is to use this C program with
subprocess.Popen:

https://github.com/superjoe30/waveform
===========================================



waveform python module. Synopsis:

    import waveform

    # quickly draw the waveform of an mp3 file to a picture
    waveform.draw("infile.mp3", "outfile.png", (800, 100), bgColor=(0,0,0,0),
        fgColor=(0,0,128,255))

    # draw using a gradient
    center_color = (184, 221, 242, 255)
    outer_color = (19, 117, 205, 255)
    waveform.draw("infile.mp3", "outfile.png", (800, 100), bgColor=(0,0,0,0),
        fgGradientCenter=center_color, fgGradientOuter=outer_color)

    # generate the picture extremely quickly at the loss of how
    # good the image looks
    waveform.draw("infile.mp3", "outfile.png", (800, 100), cheat=True)


Supported audio formats:
libsndfile + libmad123, e.g.:
wav
aiff
au
ogg
flac
mp3

Supported graphic formats:
pretty much anything as far as I know. ImageMagick is pretty hefty.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].