Description Usage Arguments Details Value
View source: R/stochastic_fugue.R
Three Markov chains are generated to model an outline of a fugue, i.e. the path of the subject through different voices, keys, and transformations. Then counterpoint is filled in on each statement for the other voices. Random harmonics are used.
1 2 3 4 5 6 7 8 9 10  | stochastic_fugue(
  subject,
  rhythms,
  N,
  registers,
  transition_matrices,
  subjectKeys,
  answerKeys,
  keySig = "major"
)
 | 
subject | 
 the fugue subject, a vector of midi numbers in 0-127  | 
rhythms | 
 the rhythms, either constant or variable  | 
N | 
 the number of statements to generate  | 
registers | 
 the registers of each voice  | 
transition_matrices | 
 a list of transition matrices, see details  | 
subjectKeys | 
 the state space for keys of the subject  | 
answerKeys | 
 the state space for the keys of the answers  | 
keySig | 
 the key signature of the subject  | 
transition_matrices must be a list of four probability transition matrices:
P.voice
P.transform
P.key
P.answer
vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.