You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: library/webaudioapi/modules/Instrument.mjs
+20-5Lines changed: 20 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,18 +15,19 @@ import * as WebAudioApiErrors from './Errors.mjs';
15
15
/**
16
16
* Loads an existing {@link Instrument} object capable of mapping audio data to musical output.
17
17
*
18
-
* If the `url` parameter is set to `null`, a sine-wave oscillator will be used to generate
18
+
* If the `url_or_data` parameter is set to `null`, a sine-wave oscillator will be used to generate
19
19
* all audio output.
20
20
*
21
21
* @param {AudioContext} audioContext - Reference to the global browser {@link https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext}
22
22
* @param {string} name - Name of the instrument to load
23
-
* @param {string|null} url - URL pointing to the instrument data to load or `null`
23
+
* @param {string|[Uint8Array]|null} url_or_data - URL pointing to the instrument data to load,
thrownewWebAudioApiErrors.WebAudioInstrumentError(`The specified note (${note}) is unplayable on this instrument. Valid notes are [${metadata.minValidNote}, ${metadata.maxValidNote}]`);
0 commit comments