spessoplayer 0.5.0 → 0.7.0-beta

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.
@@ -56,4 +56,5 @@ Sets path to the log file (*default: ./spesso.log*)
56
56
  Shows this help message
57
57
 
58
58
  ### --version, /version:
59
- Shows the installed version
59
+ Shows the installed version
60
+
package/LICENSE CHANGED
@@ -672,3 +672,4 @@ may consider it more useful to permit linking proprietary applications with
672
672
  the library. If this is what you want to do, use the GNU Lesser General
673
673
  Public License instead of this License. But first, please read
674
674
  <https://www.gnu.org/licenses/why-not-lgpl.html>.
675
+
package/NOTICE CHANGED
@@ -5,4 +5,5 @@ This project uses modified code from spessasynth_core,
5
5
  specifically from the function "audioToWav" for use in printing to stdout
6
6
 
7
7
  spessasynth_core is copyright of:
8
- Copyright (C) spessasus 2025
8
+ Copyright (C) spessasus 2026
9
+
package/README.md CHANGED
@@ -26,4 +26,5 @@ For writing to file:
26
26
  $ spessoplayer midi.mid soundfont.sf2 out.wav
27
27
  ```
28
28
 
29
- for a more comprehensive look at all the options go to [COMMAND-LINE-OPTIONS](./COMMAND-LINE-OPTIONS.md)
29
+ for a more comprehensive look at all the options go to [COMMAND-LINE-OPTIONS](./COMMAND-LINE-OPTIONS.md)
30
+
package/audioBuffer.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (C) 2025 unixatch
2
+ Copyright (C) 2026 unixatch
3
3
 
4
4
  it under the terms of the GNU General Public License as published by
5
5
  This program is free software: you can redistribute it and/or modify
@@ -15,6 +15,10 @@
15
15
  along with spessoplayer. If not, see <https://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
+ /**
19
+ * @module audioBuffer
20
+ */
21
+
18
22
  import {
19
23
  IndexedByteArray,
20
24
  DEFAULT_WAV_WRITE_OPTIONS
@@ -180,7 +184,7 @@ function getWavHeader({ length, numChannels }, sampleRate, options = DEFAULT_WAV
180
184
  const dataSize = length * numChannels * bytesPerSample;
181
185
  const fileSize = headerSize + dataSize + infoChunk.length + cueChunk.length - 8;
182
186
  const header = new Uint8Array(headerSize);
183
- header.set([82, 73, 70, 70], 0);
187
+ header.set([82, 73, 70, 70], 0); // "RIFF"
184
188
  header.set(
185
189
  new Uint8Array([
186
190
  fileSize & 255,
@@ -190,10 +194,10 @@ function getWavHeader({ length, numChannels }, sampleRate, options = DEFAULT_WAV
190
194
  ]),
191
195
  4
192
196
  );
193
- header.set([87, 65, 86, 69], 8);
194
- header.set([102, 109, 116, 32], 12);
195
- header.set([16, 0, 0, 0], 16);
196
- header.set([1, 0], 20);
197
+ header.set([87, 65, 86, 69], 8); // "WAVE"
198
+ header.set([102, 109, 116, 32], 12); // "fmt "
199
+ header.set([16, 0, 0, 0], 16); // BlocSize
200
+ header.set([1, 0], 20); // AudioFormat: PCM Integer
197
201
  header.set([numChannels & 255, numChannels >> 8], 22);
198
202
  header.set(
199
203
  new Uint8Array([
@@ -214,9 +218,9 @@ function getWavHeader({ length, numChannels }, sampleRate, options = DEFAULT_WAV
214
218
  ]),
215
219
  28
216
220
  );
217
- header.set([numChannels * bytesPerSample, 0], 32);
218
- header.set([16, 0], 34);
219
- header.set([100, 97, 116, 97], 36);
221
+ header.set([numChannels * bytesPerSample, 0], 32); // BytePerBloc
222
+ header.set([16, 0], 34); // BitsPerSample
223
+ header.set([100, 97, 116, 97], 36); // "data"
220
224
  header.set(
221
225
  new Uint8Array([
222
226
  dataSize & 255,
@@ -281,4 +285,5 @@ function getData(audioData, sampleRate, options = DEFAULT_WAV_WRITE_OPTIONS) {
281
285
  export {
282
286
  getWavHeader,
283
287
  getData
284
- }
288
+ }
289
+