3.8. pctheory.pseg
This module contains functions for working with pitch segments, or psegs. A pseg is represented as a list of Pitch12 or Pitch24 elements.
intervals(pseg: list)[int]
Gets the succession of intervals in a pseg.
invert(pseg: list)[Pitch12]or[Pitch24]
Inverts a pseg.
multiply_order(pseg: list, n: int)[Pitch12]or[Pitch24]
Multiplies the order of a pseg, mod the length of the pseg.
retrograde(pseg: list)[Pitch12]or[Pitch24]
Retrogrades a pseg and returns a copy.
rotate(pseg: list, n: int)[Pitch12]or[Pitch24]
Rotates a pseg to the left n positions.
transpose(pseg: list, n: int)[Pitch12]or[Pitch24]
Transposes a pseg by n.