Description Usage Arguments Details Value
View source: R/markov_minimalism.R
Synthesizes a single voice over a given section with model input
1 2 3 4 5 6 7 8 9 10 11 12 | minimal_voice(
initial_voice,
P,
W,
n,
nb,
bpm,
harmonicParams,
state_lengths,
melody_states,
rhythm_states
)
|
initial_voice |
the index of the initial voice |
P |
the probability transition matrix determining the melodic transitions |
W |
the duration of the entire section |
n |
the number of steps to generate the DTMC(P) sample-path (make it large) |
nb |
the number of beats per measure |
bpm |
the beats per minute |
harmonicParams |
the parameters for the harmonics generation (see details) |
state_lengths |
the size of the state-spaces for each voice i.e. the number of melodies per voice |
melody_states |
the list of state-spaces containing the pitch-tones in midi numbering |
rhythm_states |
the list of state-spaces containing the rhythms of each melody in fractions of measures |
The algorithm generates a large DTMC and then uses the sample path up until the section duration is reached, this allows for state-spaces of melodies of varying lengths.
The argument harmonicParams must be a named list containing:
lambdaRange the range of mean number of harmonics
betaRange the range of the beta distribution parameters
list containing the wave vector and the time-error between input section length and generated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.