The figure.
What the dials say.
The position-addressed sampler.
Where the figure sits.
The deformed figure, sorted by position.
import { deform, resolveContext } from '@libraz/libcantus';
const figure = [
{ step: 0, velocity: 1, limb: 'kick' },
{ step: 4, velocity: 0.9, limb: 'snare' },
{ step: 8, velocity: 1, limb: 'kick' },
{ step: 12, velocity: 0.9, limb: 'snare' },
];
const draw = resolveContext(7).part('drums');
const busier = deform(figure, { rhythmic: 0.9 }, draw, 'bar', 0);
// Above the neutral middle the figure is syncopated: onsets are added off
// the beat, and the result comes back sorted by position.
busier.length; // 7
busier.map((event) => event.step); // [0, 3, 4, 7, 8, 11, 12]
Apply the complexity dials to a figure.
This is the one place complexity touches vocabulary: genre has already chosen the material, and the ceiling has not been consulted yet.