The key the line is written in: a name, plain key data, or a Key.
OptionalchordThe chord the downbeats spell out, when the line is written over one: a chord symbol, plain chord data, or a Chord. Without it no note is pulled to a chord tone.
Length of the motif in bars of ts.
OptionaltsMeter the bars are counted in, which sets the bar length, in any form that names one.
OptionalcontourMelodic contour shape the line follows.
OptionaljitterProbability in [0, 1] that a note is nudged by a single diatonic step;
sugar for the context's complexity.ornament, which wins where both are
given.
OptionalctxThe generation context. Its complexity.ornament is the jitter and its
seed fixes which notes are nudged.
How a motif is generated: what MotifOptions asks for, with the key and the chord taken the way the rest of the class API takes them.