spessasynth_core 3.26.13 → 3.26.14

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/README.md CHANGED
@@ -5,6 +5,12 @@
5
5
 
6
6
  **A powerful SF2/DLS/MIDI JavaScript library. It works with any modern JS environment that supports WebAssembly.**
7
7
 
8
+ It allows you to:
9
+ - Play MIDI files using SF2/SF3/DLS files
10
+ - Write MIDI files
11
+ - Write SF2/SF3 files
12
+ - Convert DLS to SF2 (and back!)
13
+ - [and more!](https://github.com/spessasus/spessasynth_core?tab=readme-ov-file#current-features)
8
14
  > **TIP:**
9
15
  > Looking for an easy-to-use WebAudioAPI browser wrapper? Try [spessasynth_lib](https://github.com/spessasus/spessasynth_lib)!
10
16
 
package/index.js CHANGED
@@ -23,8 +23,8 @@ import { BasicSample } from "./src/soundfont/basic_soundfont/basic_sample.js";
23
23
  import { BasicInstrumentZone, BasicPresetZone } from "./src/soundfont/basic_soundfont/basic_zones.js";
24
24
  import { BasicInstrument } from "./src/soundfont/basic_soundfont/basic_instrument.js";
25
25
  import { BasicPreset } from "./src/soundfont/basic_soundfont/basic_preset.js";
26
- import { Generator } from "./src/soundfont/basic_soundfont/generator.js";
27
- import { Modulator, modulatorSources } from "./src/soundfont/basic_soundfont/modulator.js";
26
+ import { Generator, generatorTypes } from "./src/soundfont/basic_soundfont/generator.js";
27
+ import { Modulator, modulatorCurveTypes, modulatorSources } from "./src/soundfont/basic_soundfont/modulator.js";
28
28
  import { loadSoundFont } from "./src/soundfont/load_soundfont.js";
29
29
 
30
30
  import { MIDI } from "./src/midi/midi_loader.js";
@@ -49,7 +49,8 @@ import { readBytesAsString } from "./src/utils/byte_functions/string.js";
49
49
  import { readVariableLengthQuantity } from "./src/utils/byte_functions/variable_length_quantity.js";
50
50
  import { consoleColors } from "./src/utils/other.js";
51
51
  import { inflateSync } from "./src/externals/fflate/fflate.min.js";
52
-
52
+ import { DLSDestinations } from "./src/soundfont/dls/dls_destinations.js";
53
+ import { DLSSources } from "./src/soundfont/dls/dls_sources.js";
53
54
  // you shouldn't use these...
54
55
  const SpessaSynthCoreUtils = {
55
56
  consoleColors,
@@ -64,6 +65,7 @@ const SpessaSynthCoreUtils = {
64
65
  inflateSync
65
66
  };
66
67
 
68
+ // see All-NPN-Exports.md in the wiki
67
69
  export {
68
70
  // synth and seq
69
71
  SpessaSynthSequencer,
@@ -71,6 +73,7 @@ export {
71
73
  SynthesizerSnapshot,
72
74
  ChannelSnapshot,
73
75
  KeyModifier,
76
+
74
77
  masterParameterType,
75
78
  channelConfiguration,
76
79
  interpolationTypes,
@@ -92,7 +95,13 @@ export {
92
95
  BasicPresetZone,
93
96
  Generator,
94
97
  Modulator,
98
+
95
99
  modulatorSources,
100
+ modulatorCurveTypes,
101
+ generatorTypes,
102
+ DLSSources,
103
+ DLSDestinations,
104
+
96
105
 
97
106
  // MIDI
98
107
  MIDI,
@@ -100,13 +109,14 @@ export {
100
109
  BasicMIDI,
101
110
  MIDIBuilder,
102
111
  MIDIMessage,
112
+
103
113
  RMIDINFOChunks,
114
+ midiControllers,
115
+ messageTypes,
104
116
 
105
117
  // utils
106
118
  IndexedByteArray,
107
119
  audioToWav,
108
120
  SpessaSynthLogging,
109
- midiControllers,
110
- messageTypes,
111
121
  SpessaSynthCoreUtils
112
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_core",
3
- "version": "3.26.13",
3
+ "version": "3.26.14",
4
4
  "description": "MIDI and SoundFont2/DLS library with no compromises",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -75,7 +75,7 @@ export const MAX_GENERATOR = Math.max(...Object.values(generatorTypes));
75
75
  /**
76
76
  * @type {{min: number, max: number, def: number}[]}
77
77
  */
78
- export const generatorLimits = [];
78
+ const generatorLimits = [];
79
79
  // offsets
80
80
  generatorLimits[generatorTypes.startAddrsOffset] = { min: 0, max: 32768, def: 0 };
81
81
  generatorLimits[generatorTypes.endAddrOffset] = { min: -32768, max: 32768, def: 0 };
@@ -149,6 +149,8 @@ generatorLimits[generatorTypes.exclusiveClass] = { min: 0, max: 99999, def: 0 };
149
149
  generatorLimits[generatorTypes.overridingRootKey] = { min: 0 - 1, max: 127, def: -1 };
150
150
  generatorLimits[generatorTypes.sampleModes] = { min: 0, max: 3, def: 0 };
151
151
 
152
+ export { generatorLimits };
153
+
152
154
  export class Generator
153
155
  {
154
156
  /**
@@ -4,8 +4,8 @@ import { DLSSoundFont } from "./dls/dls_soundfont.js";
4
4
  import { SoundFont2 } from "./read_sf2/soundfont.js";
5
5
 
6
6
  /**
7
- * Loads a soundfont file
8
- * @param buffer {ArrayBuffer}
7
+ * Loads a soundfont or dls file
8
+ * @param buffer {ArrayBuffer} the binary file to load
9
9
  * @returns {BasicSoundBank}
10
10
  */
11
11
  export function loadSoundFont(buffer)