spessasynth_core 4.3.7 → 4.3.8
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/dist/index.d.ts +9 -0
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3389,6 +3389,14 @@ declare class BasicSoundBank {
|
|
|
3389
3389
|
* Indicates if the SF3/SF2Pack decoder is ready.
|
|
3390
3390
|
*/
|
|
3391
3391
|
static isSF3DecoderReady: Promise<boolean>;
|
|
3392
|
+
/**
|
|
3393
|
+
* The type of the sound bank that was loaded.
|
|
3394
|
+
* Either `sf2` for SoundFont2/SoundFont3 or `dls` for DownLoadable Sounds.
|
|
3395
|
+
*
|
|
3396
|
+
* Please note that SF3 or SFOGG files are parsed as `sf2` files, but with compressed samples.
|
|
3397
|
+
* The type is still `sf2`.
|
|
3398
|
+
*/
|
|
3399
|
+
readonly type: "sf2" | "dls";
|
|
3392
3400
|
/**
|
|
3393
3401
|
* Sound bank's info.
|
|
3394
3402
|
*/
|
|
@@ -3413,6 +3421,7 @@ declare class BasicSoundBank {
|
|
|
3413
3421
|
* If the sound bank has custom default modulators (DMOD).
|
|
3414
3422
|
*/
|
|
3415
3423
|
customDefaultModulators: boolean;
|
|
3424
|
+
constructor(type?: "sf2" | "dls");
|
|
3416
3425
|
private _isXGBank;
|
|
3417
3426
|
/**
|
|
3418
3427
|
* Checks for XG drum sets and considers if this sound bank is XG.
|
package/dist/index.js
CHANGED
|
@@ -11272,7 +11272,7 @@ var DownloadableSounds = class DownloadableSounds extends DLSVerifier {
|
|
|
11272
11272
|
*/
|
|
11273
11273
|
toSF() {
|
|
11274
11274
|
SpessaLog.group("%cConverting DLS to SF2...", ConsoleColors.info);
|
|
11275
|
-
const soundBank = new BasicSoundBank();
|
|
11275
|
+
const soundBank = new BasicSoundBank("dls");
|
|
11276
11276
|
soundBank.soundBankInfo.version.minor = 4;
|
|
11277
11277
|
soundBank.soundBankInfo.version.major = 2;
|
|
11278
11278
|
soundBank.soundBankInfo = { ...this.soundBankInfo };
|
|
@@ -11295,6 +11295,14 @@ var BasicSoundBank = class BasicSoundBank {
|
|
|
11295
11295
|
*/
|
|
11296
11296
|
static isSF3DecoderReady = stb.isInitialized;
|
|
11297
11297
|
/**
|
|
11298
|
+
* The type of the sound bank that was loaded.
|
|
11299
|
+
* Either `sf2` for SoundFont2/SoundFont3 or `dls` for DownLoadable Sounds.
|
|
11300
|
+
*
|
|
11301
|
+
* Please note that SF3 or SFOGG files are parsed as `sf2` files, but with compressed samples.
|
|
11302
|
+
* The type is still `sf2`.
|
|
11303
|
+
*/
|
|
11304
|
+
type;
|
|
11305
|
+
/**
|
|
11298
11306
|
* Sound bank's info.
|
|
11299
11307
|
*/
|
|
11300
11308
|
soundBankInfo = {
|
|
@@ -11327,6 +11335,9 @@ var BasicSoundBank = class BasicSoundBank {
|
|
|
11327
11335
|
* If the sound bank has custom default modulators (DMOD).
|
|
11328
11336
|
*/
|
|
11329
11337
|
customDefaultModulators = false;
|
|
11338
|
+
constructor(type = "sf2") {
|
|
11339
|
+
this.type = type;
|
|
11340
|
+
}
|
|
11330
11341
|
_isXGBank = false;
|
|
11331
11342
|
/**
|
|
11332
11343
|
* Checks for XG drum sets and considers if this sound bank is XG.
|
|
@@ -11916,7 +11927,7 @@ var SoundFont2 = class extends BasicSoundBank {
|
|
|
11916
11927
|
* Initializes a new SoundFont2 Parser and parses the given data array
|
|
11917
11928
|
*/
|
|
11918
11929
|
constructor(arrayBuffer, warnDeprecated = true) {
|
|
11919
|
-
super();
|
|
11930
|
+
super("sf2");
|
|
11920
11931
|
if (warnDeprecated) throw new Error("Using the constructor directly is deprecated. Use SoundBankLoader.fromArrayBuffer() instead.");
|
|
11921
11932
|
const mainFileArray = new IndexedByteArray(arrayBuffer);
|
|
11922
11933
|
SpessaLog.group("%cParsing a SoundFont2 file...", ConsoleColors.info);
|