fleximeter composition and analysis software

3.14. pctheory.util

This module contains miscellaneous functions for working with pitches and pitch-classes.

map_to_chromatic(scale_map, sequence)[int]

Takes a succession of diatonic pitch-classes and maps them to chromatic pitch-classes. For example, you can map diatonic scale degrees to chromatic scale degrees by providing the scale map {0: 0, 1: 2, 2: 4, 3: 5, 4: 7, 5: 9, 6: 11}, and transform a diatonic pcseg to a chromatic pcseg using this function.

norgard(n: int)[int]

Generates the first n numbers of Per Norgard's “infinity series,” OEIS A004718.