open-audiovisual
Search GitHub

oav-p5 reference · Loading options

debug#

optionoav-p5
?oav_debug=1 | 0

Prints [oav-p5 debug] lines in the console about clicks, the 🎹 button and loading, for finding out why the 🎹 does not respond.

Two seconds after the 🎹 is placed, a line says whether the 🎹 in the page is oav-p5's own copy and where oav-p5 loads the rest of OAV from. Every click then adds a line with the pointer position, what was clicked, and what is on top at that spot, which is how you find a page element sitting over the 🎹. It also says when the panel opens, when the page replaced the 🎹 and which name asked for the microphone.

Type
String
Values
1 | 0
default
'' (off)

Any value except an empty one and 0 turns it on.

Notes

  • Set it before oav-p5 loads. window.OAV_P5 = { debug: … }; above the loader line wins, then ?oav_debug=… on the page address, then ?debug=… on the script's own URL. Values in window.OAV_P5 are turned into text, so write 'off', not false. On OpenProcessing the page address takes ?sketch_oav_debug=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { debug: 1 };

function setup() {
  createCanvas(400, 300);
}

function draw() {
  background(20);
  fill(255);
  text('open the console, then click the canvas', 20, 30);   // [oav-p5 debug] lines appear
}
Open the console: two seconds after load a debug line talks about the 🎹, and every click on the canvas adds one saying what was under the pointer.

Related

  • hints Whether oav-p5 shows its explaining cards beside the 🎹 (blocked microphone, no Web MIDI, an error in your callback): on or off.
  • panel Whether the 🎹 panel starts shut, open, or does not exist: closed, open or off.
  • 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.

p5/oav-p5.js, line 158

↑ Back to top · All names