JS API Reference createDevice() function

createDevice() function

The main entry point to @rnbo/js. Use this createDevice factory function to create Devices from your RNBO Patches. Refer to the guide on Loading a RNBO Device in the Browser for more details on how to use this function.


export declare function createDevice(parameters: ICreateDeviceParameters, prevDevice?: Device): Promise<Device>;


parametersICreateDeviceParametersThe parameters used in creating a new RNBO Device (see ICreateDeviceParameters)
prevDeviceDeviceOptional previous device. Use this parameter to create a device from an existing one including state restoration. CAUTION: This makes the previous device invalid and therefore non-functional. This functionality is only useful for specific, advanced use-cases.



a Promise returning the created Device