Namespace: patch

MIDIController#patch

Patch management operations
Source:

Members

(static) delete

Delete a patch from localStorage
Source:
Example
const success = midi.patch.delete("Old Patch");

(static) get

Get current state as a patch object
Source:
Example
const patch = midi.patch.get("My Patch");
console.log(patch.channels);

(static) list

List all saved patches
Source:
Example
const patches = midi.patch.list();
patches.forEach(p => {
  console.log(p.name);
});

(static) load

Load a patch from localStorage
Source:
Example
const patch = midi.patch.load("My Patch");
if (patch) {
  await midi.patch.set(patch);
}

(static) save

Save a patch to localStorage
Source:
Example
midi.patch.save("My Favorite Settings");

(static) set

Apply a patch to the controller
Source:
Example
const patch = { name: "My Patch", channels: { 1: { ccs: { 7: 100 } } } };
await midi.patch.set(patch);