missing argument context error (RNBO + JavaScript)
Hello,
My current code works, but when I try to change the name of the variable "context" in the following code:
const rnboSetup = async () => {
// create audio context
let WAContext = window.AudioContext || window.webkitAudioContext;
let context = new WAContext();
// load patch
let rawPatcher = await fetch("patch.export.json");
let patcher = await rawPatcher.json();
// device setup
let device = await RNBO.createDevice({ context, patcher });
device.node.connect(context.destination);
};I'm getting an error from RNBO.createDevice({ context, patcher }):
Uncaught (in promise) Error: Missing argument context
at Module.<anonymous> (rnbo.min.js:37:178333)
at Generator.next (<anonymous>)
at rnbo.min.js:37:64648
at new Promise (<anonymous>)
at n (rnbo.min.js:37:64393)
at Module.x (rnbo.min.js:37:177232)
at rnboSetup (sketch_230223b.js:14:27)The name of the variable for audio context must be "context"?
Or am I missing something?