hints#
optionoav-p5?oav_hints=on | off
Whether oav-p5 shows its explaining cards beside the 🎹 (blocked microphone, no Web MIDI, an error in your callback): on or off.
When something goes wrong, a small card beside the 🎹 says what happened, why, and what to press, in the browser's language, once per page. hints: 'off' takes the cards off the page: the console still says the same thing and OAVp5.hints still lists what was said. Use it for a finished piece that goes on a wall or into a recording.
It also hides the corner oscilloscope of scope(), which is part of the same on-page help. scope=off hides only that.
- Type
String- Values
on | off- default
on
Only off turns the cards off. Any other value, including the text false, leaves them on.
Notes
- Set it before oav-p5 loads.
window.OAV_P5 = { hints: … };above the loader line wins, then?oav_hints=…on the page address, then?hints=…on the script's own URL. Values inwindow.OAV_P5are turned into text, so write'off', notfalse. On OpenProcessing the page address takes?sketch_oav_hints=…(the project's README says OpenProcessing forwards it to the sketch).
Examples
window.OAV_P5 = { hints: 'off' };
function setup() {
createCanvas(400, 300);
lag(1); // an unnamed lag() outside draw(): oav-p5 has something to say about that
}
function draw() {
background(20);
fill(255);
text('cards said: ' + OAVp5.hints.length + ' (none on the page)', 20, 30);
text(OAVp5.hints.map((h) => h.what).join('\n'), 20, 60);
}window.OAV_P5 = { hints: false }; // not 'off': the value is turned into the text "false"
function setup() {
createCanvas(400, 300);
lag(1);
}
function draw() {
background(20);
fill(255);
text('the card is still beside the 🎹', 20, 30);
}false is not 'off', so the card still appears.Related
OAVp5.hintsThe list of cards oav-p5 has shown or would have shown so far (a blocked microphone, no Web MIDI, an error in your callback), each with what, why and what to press.scopeWhetherscope()draws its oscilloscope in the corner of the page:onoroff.hints=offturns it off too.debugPrints[oav-p5 debug]lines in the console about clicks, the 🎹 button and loading, for finding out why the 🎹 does not respond.OAVp5.check()Runs the 🩺 check-up: the version, page, browser, microphone, MIDI, sound, drums, recording, wiring and hints, as a card to screenshot and as an object.