open-audiovisual
Search GitHub

oav-p5 reference · MIDI: knobs, faders, pads, keys

OAVp5.panel#

objectoav-p5
OAVp5.panel

The 🎹 panel as an object: open(), close() and toggle() show and hide it from code.

The panel behind the 🎹 button holds the on-screen controller and the buttons for 🎤, 🔊, 🥁, ⏺, 📷, 📱 and 🩺. OAVp5.panel.open(), close() and toggle() do what pressing 🎹 does, from your code: open it on a key, or open it at the start for a workshop (?oav_panel=open does the same at load).

Notes

  • With ?oav_panel=off there is no 🎹 and these do nothing.

Examples

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

function keyPressed() {
  if (key === 'p') OAVp5.panel.toggle();
}

function draw() {
  background(20);
  fill(255);
  text('press p to show or hide the 🎹 panel', 20, 30);
}
Press p: the 🎹 panel opens and, pressed again, closes.

Related

  • OAVp5.panel.open() Opens the 🎹 panel (open()), closes it (close()) or flips it (toggle()).
  • panel Whether the 🎹 panel starts shut, open, or does not exist: closed, open or off.
  • compact Shows the 🎹 panel as a small box in the corner, a third of the window high, instead of a full-width bar: on or off.
  • OAVp5.phone() Shows the 📱 card: a QR code that sends a phone to the remote page, whose MIDI tab then plays this sketch. Returns the room name.

p5/oav-p5.js, line 275

↑ Back to top · All names