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

Copyright(c) 2020
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Fortuna

Description

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.

Synopsis

Documentation

data Perm Source #

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

Constructors

Perm 

Fields

Instances
Show Perm Source # 
Instance details

Defined in Fortuna

Methods

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 #

Arguments

:: 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