[GMG-Devel] Spectrogram colors

Joar Wandborg joar at wandborg.se
Fri Oct 11 06:18:39 EDT 2013


I and Tumulte went through the code yesterday:

In the class SpectrogramImage in
mediagoblin/media_types/audio/audioprocessing.py, in the definition of
"colors" you can modify the definition to fit your needs.

The "colors" variable has to be of the format colors = [(r, g, b, a), (r,
g, b, a),  ...]

Where the first rgba tuple is the color of the lower intensities and the
last tuple is the color of the higher intensities. It can be any number of
rgba tuples and they will be distributed evenly over the spectrum.

This is a hack that works today, hopefully in the future we will have it
configurable from the main MediaGoblin configuration.
On Oct 9, 2013 2:55 PM, <tumulte at dogmazic.net> wrote:

> Hey !
>
> I just want to achieve a simple thing : having a grayscale spectum instead
> of this green/orange colors that don't fit my design.
>
>
> I've toyed with avery parameters, trying to follow the workflow of a
> spectrogram creation. Changed drastically quite a lot of parameters, but
> only ended up with to results : "nothing" or "same"
>
> The comments don't really help "# TODO: What does this do?" so, I can use
> some how to here :)
>
> How to change those colors ?
>
> Thanks
>
> T.
> _______________________________________________
> devel mailing list
> devel at mediagoblin.org
> http://lists.mediagoblin.org/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mediagoblin.org/pipermail/devel/attachments/20131011/8002c4a9/attachment.html>


More information about the devel mailing list