spessasynth_core 4.0.1 → 4.0.3

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 CHANGED
@@ -336,7 +336,7 @@ declare class BasicZone {
336
336
  /**
337
337
  * Sets a generator to a given value if preset, otherwise adds a new one.
338
338
  */
339
- setGenerator(type: GeneratorType, value: number | undefined, validate?: boolean): void;
339
+ setGenerator(type: GeneratorType, value: number | null, validate?: boolean): void;
340
340
  /**
341
341
  * Adds generators to the zone.
342
342
  * @param generators
package/dist/index.js CHANGED
@@ -7078,7 +7078,7 @@ var BasicZone = class {
7078
7078
  case generatorTypes.keyRange:
7079
7079
  throw new Error("Set the range manually");
7080
7080
  }
7081
- if (value === void 0) {
7081
+ if (value === null) {
7082
7082
  this.generators = this.generators.filter(
7083
7083
  (g) => g.generatorType !== type
7084
7084
  );
@@ -7087,7 +7087,7 @@ var BasicZone = class {
7087
7087
  const index = this.generators.findIndex(
7088
7088
  (g) => g.generatorType === type
7089
7089
  );
7090
- if (index > 0) {
7090
+ if (index >= 0) {
7091
7091
  this.generators[index] = new Generator(type, value, validate);
7092
7092
  } else {
7093
7093
  this.addGenerators(new Generator(type, value, validate));
@@ -7506,7 +7506,7 @@ var BasicInstrument = class {
7506
7506
  const genValue = z.getGenerator(checkedType, void 0);
7507
7507
  if (genValue !== void 0) {
7508
7508
  if (genValue === targetValue) {
7509
- z.setGenerator(checkedType, void 0);
7509
+ z.setGenerator(checkedType, null);
7510
7510
  }
7511
7511
  } else {
7512
7512
  if (targetValue !== defaultForChecked) {
@@ -14553,7 +14553,11 @@ var DownloadableSoundsArticulation = class _DownloadableSoundsArticulation exten
14553
14553
  this.mode = "dls1";
14554
14554
  while (lart.data.currentIndex < lart.data.length) {
14555
14555
  const art1 = readRIFFChunk(lart.data);
14556
- _DownloadableSoundsArticulation.verifyHeader(art1, "art1");
14556
+ _DownloadableSoundsArticulation.verifyHeader(
14557
+ art1,
14558
+ "art1",
14559
+ "art2"
14560
+ );
14557
14561
  const artData = art1.data;
14558
14562
  const cbSize = readLittleEndianIndexed(artData, 4);
14559
14563
  if (cbSize !== 8) {
@@ -14570,7 +14574,11 @@ var DownloadableSoundsArticulation = class _DownloadableSoundsArticulation exten
14570
14574
  this.mode = "dls2";
14571
14575
  while (lar2.data.currentIndex < lar2.data.length) {
14572
14576
  const art2 = readRIFFChunk(lar2.data);
14573
- _DownloadableSoundsArticulation.verifyHeader(art2, "art2");
14577
+ _DownloadableSoundsArticulation.verifyHeader(
14578
+ art2,
14579
+ "art2",
14580
+ "art1"
14581
+ );
14574
14582
  const artData = art2.data;
14575
14583
  const cbSize = readLittleEndianIndexed(artData, 4);
14576
14584
  if (cbSize !== 8) {