open-audiovisual
Search GitHub

oav-p5 reference · Loading options

profile#

optionoav-p5
?oav_profile=a profile id

Which controller the on-screen 🎹 shows, by profile id such as akai-lpd8; by default it follows the one that is plugged in.

The on-screen controller of the 🎹 panel draws this device, and knob1, fader1 and pad1 mean the first knob, fader and pad printed on it. A sketch written with the LPD8 in mind, for instance, can ask for it with profile: 'akai-lpd8' so that whoever has no LPD8 still gets one on screen. The picker inside the panel changes it by hand.

If you do not set it, the panel starts as the MiniLab 3 and then follows a real controller as soon as one that OAV has a profile for is plugged in. If you do set it, that choice stays. An id that does not exist is reported in the console with the list of known ids, and the panel shows no controller.

Type
String
Values
a profile id
default
arturia-minilab3

Any id that @openav/midi has a profile for: arturia-minilab3, akai-lpd8, korg-nanokontrol2, generic-keys49 and the rest, and the controllers imported from QLC+ such as behringer-bcf2000, whose file is fetched when it is needed. When you set nothing, the panel follows the controller that is plugged in.

Notes

  • Set it before oav-p5 loads. window.OAV_P5 = { profile: … }; above the loader line wins, then ?oav_profile=… on the page address, then ?profile=… 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_profile=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { profile: 'akai-lpd8', panel: 'open' };

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

function draw() {
  background(20);
  fill(255);
  text('profile: ' + OAVp5.options.profile, 20, 30);
  circle(width / 2, height / 2, 40 + knob1 * 240);   // knob 1 of the LPD8
}
The panel opens with an Akai LPD8 on screen: eight pads and eight knobs. Turn its first knob and the circle grows.

Related

  • knob1 The position of a controller knob, from 0 to 1: knob1 is the first knob, knob2 the second, up to knob8.
  • fader1 The position of a controller fader (slider), from 0 to 1: fader1 is the first fader, up to fader8.
  • pad1 How hard a drum pad is pressed, from 0 to 1: pad1 is the first pad, up to pad16; 0 when it is let go.
  • panel Whether the 🎹 panel starts shut, open, or does not exist: closed, open or off.
  • OAVp5.input() Sends one MIDI message into oav-p5 by hand, as bytes: the whole sketch reacts as if a controller had sent it.

p5/oav-p5.js, line 126

↑ Back to top · All names