enharmonic_variations

pitchtools.enharmonic_variations(notes, fixedslots=None, force=False)[source]

Generates all enharmonic variations of the given notes

Parameters:
  • notes (list[str]) – a list of notenames

  • fixedslots (dict[int, int | None]) – a dict of slot:alteration_direction, fixes the given slots to a given alteration direction (1=#, -1=b). If Slot 0 corresponds to C, 1 to C+/Db-, 2 to C#/Db, etc.

  • force – if True, it will always return at least a variation even if there are no valid solutions

Return type:

list[tuple[str, …]]

Returns:

a list of enharmonic alternatives

See also

enharmonic()