OAVp5.panel#
objectoav-p5OAVp5.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=offthere is no 🎹 and these do nothing.
Examples
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);
}Related
OAVp5.panel.open()Opens the 🎹 panel (open()), closes it (close()) or flips it (toggle()).panelWhether the 🎹 panel starts shut, open, or does not exist:closed,openoroff.compactShows the 🎹 panel as a small box in the corner, a third of the window high, instead of a full-width bar:onoroff.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.