arca- A digital implementation of Athanasius Kircher's device for automatic music composition, the Arca musarithmica of 1650

Copyright(c) 2022 Andrew A. Cashner
Safe HaskellNone



Kircher's ark does require a small amount of free choice on the part of the user, in selecting which voice permutation and rhythm permutation to use from each column. We take the (for Kircher) theologically dangerous route of chance operations and generate a random number for the index of the voice and rhythm permutations.



data Perm Source #

A Perm stores the random number choices used to select voice and rhythm permutations.




Show Perm Source # 
Instance details

Defined in Fortuna


showsPrec :: Int -> Perm -> ShowS #

show :: Perm -> String #

showList :: [Perm] -> ShowS #

choosePerms :: IO Perm Source #

Make a pair of random numbers to select vperm and rperm:

  • vperm is always one of 10 vperms per column
  • rperm lists are variable in length, so we choose a larger number and then take the modulo of the length of the list once it's selected (in Aedifico)

type SentencePerm = [Perm] Source #

Each sentence needs a list of perms, one per phrase

type SectionPerm = [SentencePerm] Source #

A list of perms for each sentence in the section

sentencePerms Source #


:: PhrasesInLyricSentence

number of permutations

-> IO SentencePerm 

Generate a list of Perms of a given length to match a Sentence

sectionPerms :: PhrasesInLyricSection -> IO SectionPerm Source #

Generate perms for a whole section

inputPerms :: [PhrasesInLyricSection] -> IO [[SentencePerm]] Source #

Generate perms for the whole input structure