spessasynth_lib 3.26.13 → 3.26.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sequencer/sequencer.js +1 -1
- package/src/synthetizer/synth_soundfont_manager.js +10 -7
- package/synthetizer/worklet_processor.min.js +11 -11
- package/.idea/codeStyles/Project.xml +0 -85
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/spessasynth_lib.iml +0 -12
- package/.idea/vcs.xml +0 -7
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ import { DEFAULT_SEQUENCER_OPTIONS } from "./default_sequencer_options.js";
|
|
|
39
39
|
* @typedef {Object} SequencerOptions
|
|
40
40
|
* @property {boolean|undefined} skipToFirstNoteOn - if true, the sequencer will skip to the first note
|
|
41
41
|
* @property {boolean|undefined} autoPlay - if true, the sequencer will automatically start playing the MIDI
|
|
42
|
-
* @property {boolean|
|
|
42
|
+
* @property {boolean|undefined} preservePlaybackState - if true,
|
|
43
43
|
* the sequencer will stay paused when seeking or changing the playback rate
|
|
44
44
|
* @property {number|undefined} initialPlaybackRate - the initial playback rate, defaults to 1.0 (normal speed)
|
|
45
45
|
*/
|
|
@@ -55,16 +55,19 @@ export class SoundfontManager
|
|
|
55
55
|
*/
|
|
56
56
|
async addNewSoundFont(soundfontBuffer, id, bankOffset = 0)
|
|
57
57
|
{
|
|
58
|
+
this._sendToWorklet(WorkletSoundfontManagerMessageType.addNewSoundFont, [soundfontBuffer, id, bankOffset]);
|
|
59
|
+
await new Promise(r => this.synth._resolveWhenReady = r);
|
|
58
60
|
if (this.soundfontList.find(s => s.id === id) !== undefined)
|
|
59
61
|
{
|
|
60
|
-
|
|
62
|
+
this.soundfontList.find(s => s.id === id).bankOffset = bankOffset;
|
|
63
|
+
}
|
|
64
|
+
else
|
|
65
|
+
{
|
|
66
|
+
this.soundfontList.push({
|
|
67
|
+
id: id,
|
|
68
|
+
bankOffset: bankOffset
|
|
69
|
+
});
|
|
61
70
|
}
|
|
62
|
-
this._sendToWorklet(WorkletSoundfontManagerMessageType.addNewSoundFont, [soundfontBuffer, id, bankOffset]);
|
|
63
|
-
await new Promise(r => this.synth._resolveWhenReady = r);
|
|
64
|
-
this.soundfontList.push({
|
|
65
|
-
id: id,
|
|
66
|
-
bankOffset: bankOffset
|
|
67
|
-
});
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
// noinspection JSUnusedGlobalSymbols
|