scamp_extensions.engraving.note_graph

Module containing the PartNoteGraph class, which makes it possible to draw the notes of a PerformancePart to an SVG file. Ultimately, I plan to make it so that you can save a whole Performance to an SVG file or even to a PDF.

Classes

PartNoteGraph(performance_part, ...)

Class that takes a performance part and a bunch of drawing/visualization settings, and can render to a class:svgDraw.Drawing.

Functions

default_color_map(intensity)

The color map used by a PartNoteGraph unless another is given: a blue-to-red gradient.

get_fill(parameter, start_x, end_x[, ...])

The SVG fill to use for a note whose color is governed by the given parameter value: a gradient if that value is an envelope, and a plain hex color if it is a constant.

make_intensity_gradient(envelope, start_x, end_x)

Create an SVG linear gradient that spans horizontally from start_x to end_x, taking its color at each point from the value of the given envelope there.

rgb_to_hex(rgb)

Convert an (red, green, blue) tuple, each component from 0 to 255, to a hex color string like "#ff7a00".