spessasynth_core 4.4.0 → 4.4.1

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
@@ -674,6 +674,11 @@ declare class BasicZone {
674
674
  * @returns The generator value or the provided fallback value.
675
675
  */
676
676
  getGenerator<K>(generatorType: GeneratorType, notFoundValue: number | K): number | K;
677
+ /**
678
+ * Copies the parameters from another zone.
679
+ * @param zone The zone to copy from.
680
+ */
681
+ copyFrom(zone: BasicZone): void;
677
682
  }
678
683
  //#endregion
679
684
  //#region src/soundbank/basic_soundbank/basic_instrument_zone.d.ts
@@ -1198,6 +1203,19 @@ declare class BasicPreset implements MIDIPatchFull {
1198
1203
  * @param preset The preset to check.
1199
1204
  */
1200
1205
  matches(preset: MIDIPatch): boolean;
1206
+ /**
1207
+ * Returns the voice synthesis data for this preset.
1208
+ *
1209
+ * > **Note**
1210
+ * >
1211
+ * > The `E-mu` attenuation correction
1212
+ * > (`initialAttenuation` generator value being multiplied by `0.4`) is already performed.
1213
+ *
1214
+ * @param midiNote The MIDI note number.
1215
+ * @param velocity The MIDI velocity.
1216
+ * @returns The returned sound data.
1217
+ */
1218
+ getVoiceParameters(midiNote: number, velocity: number): VoiceParameters[];
1201
1219
  /**
1202
1220
  * Alias for {@link MIDIPatchTools.toMIDIString}
1203
1221
  */
@@ -1261,6 +1279,11 @@ declare class BasicInstrument {
1261
1279
  * @param sample The sample to associate with the zone.
1262
1280
  */
1263
1281
  createZone(sample: BasicSample): BasicInstrumentZone;
1282
+ /**
1283
+ * Unlinks the instrument from a given preset.
1284
+ * @param preset The preset to unlink from.
1285
+ */
1286
+ unlinkFrom(preset: BasicPreset): void;
1264
1287
  /**
1265
1288
  * Deletes a given instrument zone if it has no uses.
1266
1289
  * @param index The index of the zone to delete.
@@ -1382,6 +1405,12 @@ declare class BasicSample {
1382
1405
  * How many instruments is this sample used by.
1383
1406
  */
1384
1407
  get useCount(): number;
1408
+ /**
1409
+ * Get raw data for writing the file, either a compressed bit stream or signed 16-bit little endian PCM data.
1410
+ * @param allowVorbis if vorbis file data is allowed.
1411
+ * @return either s16le or vorbis data.
1412
+ */
1413
+ getRawData(allowVorbis: boolean): Uint8Array;
1385
1414
  /**
1386
1415
  * Resamples the audio data _in-place_ to a given sample rate.
1387
1416
  * @param newSampleRate The new sample rate, in hertz.
@@ -1402,6 +1431,11 @@ declare class BasicSample {
1402
1431
  * @param type Either left, right or linked. The linked sample will be set appropriately as well.
1403
1432
  */
1404
1433
  setLinkedSample(sample: BasicSample, type: SampleType): void;
1434
+ /**
1435
+ * Unlinks the sample from a given instrument
1436
+ * @param instrument the instrument to unlink from
1437
+ */
1438
+ unlinkFrom(instrument: BasicInstrument): void;
1405
1439
  /**
1406
1440
  * Get the PCM Float32 audio data of this sample.
1407
1441
  * This either decodes the compressed data or passes the ready sampleData.
package/dist/index.js CHANGED
@@ -6977,7 +6977,6 @@ var BasicSample = class {
6977
6977
  * Get raw data for writing the file, either a compressed bit stream or signed 16-bit little endian PCM data.
6978
6978
  * @param allowVorbis if vorbis file data is allowed.
6979
6979
  * @return either s16le or vorbis data.
6980
- * @internal
6981
6980
  */
6982
6981
  getRawData(allowVorbis) {
6983
6982
  if (this.compressedData && allowVorbis && !this.dataOverridden) return this.compressedData;
@@ -7074,7 +7073,6 @@ var BasicSample = class {
7074
7073
  /**
7075
7074
  * Unlinks the sample from a given instrument
7076
7075
  * @param instrument the instrument to unlink from
7077
- * @internal
7078
7076
  */
7079
7077
  unlinkFrom(instrument) {
7080
7078
  const index = this.linkedTo.indexOf(instrument);
@@ -7845,7 +7843,6 @@ var BasicZone = class {
7845
7843
  /**
7846
7844
  * Copies the parameters from another zone.
7847
7845
  * @param zone The zone to copy from.
7848
- * @internal
7849
7846
  */
7850
7847
  copyFrom(zone) {
7851
7848
  this.generators = zone.generators.map((g) => new Generator(g.type, g.value, false));
@@ -8107,7 +8104,6 @@ var BasicPreset = class BasicPreset {
8107
8104
  * @param midiNote The MIDI note number.
8108
8105
  * @param velocity The MIDI velocity.
8109
8106
  * @returns The returned sound data.
8110
- * @internal
8111
8107
  */
8112
8108
  getVoiceParameters(midiNote, velocity) {
8113
8109
  const voiceParameters = new Array();
@@ -8366,7 +8362,6 @@ var BasicInstrument = class {
8366
8362
  /**
8367
8363
  * Unlinks the instrument from a given preset.
8368
8364
  * @param preset The preset to unlink from.
8369
- * @internal
8370
8365
  */
8371
8366
  unlinkFrom(preset) {
8372
8367
  const index = this.linkedTo.indexOf(preset);