strudel#
optionoav-p5?oav_strudel=auto | on | off
Whether oav-p5 treats the page as Strudel, the live-coding editor, and behaves politely beside it: auto, on or off.
Strudel is a live-coding editor, not a sketch, so a few things change when oav-p5 sees it: the names Strudel owns (note, velocity, beat) are left alone and one card says what to read instead, MIDI is asked for by Strudel's own midin() rather than at load (hardware becomes click), the 🎹 panel becomes the compact box, and the 🎹 sits above Strudel's side-panel buttons. oav-p5 only looks at the address and at the names on the page: nothing of Strudel is called.
on forces this behaviour on any page, off forces the plain one even on strudel.cc. Settings you give yourself (hardware, compact) still win over what Strudel mode would choose.
- Type
String- Values
auto | on | off- default
auto
auto means on strudel.cc, or on a page where Strudel's own functions (note() and s() with stack() or samples()) are already there. Anything else means auto.
Notes
- Set it before oav-p5 loads.
window.OAV_P5 = { strudel: … };above the loader line wins, then?oav_strudel=…on the page address, then?strudel=…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_strudel=…(the project's README says OpenProcessing forwards it to the sketch).
Examples
window.OAV_P5 = { strudel: 'on' };
function setup() {
createCanvas(400, 300);
}
function draw() {
background(20);
fill(255);
text('hardware: ' + OAVp5.options.hardware, 20, 30); // click: Strudel asks for MIDI itself
text('compact panel: ' + OAVp5.options.compact, 20, 60); // true
}Related
hardwareWhen oav-p5 asks the browser for Web MIDI, which a real controller needs:autoat load,clickwhen the 🎹 panel opens, oroff.compactShows the 🎹 panel as a small box in the corner, a third of the window high, instead of a full-width bar:onoroff.linkJoins a room: oav-p5 pages with the same room hear what each other's programs play, over the relay. A room name, or empty for none.clockWhether an external MIDI clock (from a DAW, Strudel or a drum machine) movesdrumPhase,drumBpmand the drum machine:followoroff.OAVp5.clockWhat oav-p5 hears of an external MIDI clock: its state, tempo and where it is in the bar. Nothing until another program or device starts sending one.