OAVp5.drums.cues#
variableoav-p5OAVp5.drums.cues
The list of every cue declared so far, in the order they were declared.
Read it to show a plan on screen or to check what is declared. It is the machine's own list, so treat it as read-only; declare cues with cue().
- Type
Array<Object>
Each item is { bar, name, every, at, period, key }: the values you passed, and at and period counted in steps. An empty list at the start.
Examples
function setup() {
createCanvas(400, 300);
startDrums('four on floor', 120);
cue(1, 'calm', 8);
cue(5, 'storm', 8);
textSize(14);
}
function draw() {
background(20);
fill(255);
OAVp5.drums.cues.forEach((c, i) => {
text('bar ' + c.bar + (c.every ? ' (every ' + c.every + ')' : '') + ': ' + c.name, 20, 30 + i * 24);
});
}Related
cue()Plans something for a bar: at barbarthe functioncueFired(name, bar)is called andcueNamebecomesname; withevery, again every that many bars.OAVp5.drums.cue()The same ascue(bar, name, every), but it returns the cue it made (or the one that was already there), andnullwhenbaris not valid.cueNameThe name of the last cue that fired, or an empty string before the first one.