music.structures.peals package¶
Submodules¶
music.structures.peals.base module¶
music.structures.peals.peals module¶
-
class
music.structures.peals.peals.Peals¶ Bases:
music.structures.permutations.InterestingPermutationsUse permutations to make peals and represent peals as permutations.
- Core reference:
- Also check peal rules, such as conditions for trueness.
- Wikipedia seemed ok last time.
-
TwentyAllOver()¶
-
anEightAndForty()¶
-
transpositionsPeal(permutation, peal_name='transposition_peal')¶
-
music.structures.peals.peals.printPeal(peal, hunts=[0, 1])¶ Print peal with colored numbers. Hunt have also colored background
TODO: documentation
music.structures.peals.plainChanges module¶
-
class
music.structures.peals.plainChanges.PlainChanges(nelements=4, nhunts=None, hunts=None)¶ Bases:
objectPresent plain changes as swaps and act in domains to make peals
http://www.gutenberg.org/files/18567/18567-h/18567-h.htm
-
act(domain=None, peal=None)¶
-
actAll(domain=None)¶
-
initializeHunts(nelements=4, nhunts=None)¶
-
performChange(nelements, hunts, hunt=None)¶ Perform change procedure from ‘hunt’ on to subsequent hunts.
Return permutation of the change and the hunts dictionary. Peals should be classified by restrictions satisfied by permutations between changes:
- canonical peal: only adjacent swaps allowed. E.g. plain changes, twenty all over.
- semi-canonical peal: only adjacent chunks are displaced, at least one permutation needs more than one swap. E.g.: rotations, mirrors.
- free peal: at least one permutation displaces non-adjacent indexes. E.g. paradox peal, phoenix peal, any nondihedral?
-
performPeal(nelements, hunts=None)¶
-