soundfont-player
soundfont-player copied to clipboard
Loading soundfont with Angular
I tried getting soundfont using Angular. I get this error:
Argument of type 'AudioContext' is not assignable to parameter of type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.
Property 'prototype' is missing in type 'AudioContext' but required in type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.
This is my code:
const newPlayer = SoundFont.instrument(new AudioContext(), 'assets/soundfonts/acoustic_grand_piano-mp3.js');
error is in new AudioContext()
part