spessasynth_core 1.0.4 → 1.0.5

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.
Files changed (3) hide show
  1. package/README.md +15 -1
  2. package/index.js +2 -1
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -59,6 +59,7 @@ import("spessasynth_core").then(core => {
59
59
  - [Sequencer](#sequencer)
60
60
  - [MIDI](#midi)
61
61
  - [SoundFont2](#soundfont2)
62
+ - [How to disable console output](#logging)
62
63
 
63
64
  ### Importing the library
64
65
  spessasynth_core is an es6 package.
@@ -373,4 +374,17 @@ console.log(`The track lasts for ${sequencer.duration} seconds!`);
373
374
  See [MIDI on SpessaSynth wiki](https://github.com/spessasus/SpessaSynth/wiki/MIDI-Class)
374
375
 
375
376
  ## SoundFont2
376
- See [SoundFont2 on SpessaSynth wiki](https://github.com/spessasus/SpessaSynth/wiki/SoundFont2-Class)
377
+ See [SoundFont2 on SpessaSynth wiki](https://github.com/spessasus/SpessaSynth/wiki/SoundFont2-Class)
378
+
379
+ ## Logging
380
+ By default, SpessaSynth prints out a lot of stuff to console.
381
+ Here's how you can disable it:
382
+ ```js
383
+ // import (or require) here
384
+ SpessaSynthLogging(enableInfo, enableWarning, enableGroup, enableTable);
385
+ ```
386
+ All the input variables are booleans corresponding to the things SpessaSynth logs.
387
+ - Info - all general info such as parsing soundfonts, midi files, RPN changes, etc.
388
+ - Warnings - all messages unrecognized by the synthesizer, other warnings
389
+ - group - the groups for parsing the soundfont and midi files.
390
+ - table - the debug table `when enableDebugging` is set to `true` for `synth.noteOn`
package/index.js CHANGED
@@ -3,5 +3,6 @@ import {Sequencer} from "./spessasynth_core/sequencer/sequencer.js";
3
3
  import {MIDI} from "./spessasynth_core/midi_parser/midi_loader.js";
4
4
  import {rawDataToWav} from "./spessasynth_core/utils/buffer_to_wav.js";
5
5
  import {SoundFont2} from "./spessasynth_core/soundfont/soundfont_parser.js";
6
+ import {SpessaSynthLogging} from "./spessasynth_core/utils/loggin.js";
6
7
 
7
- export { Synthesizer, Sequencer, MIDI, SoundFont2, rawDataToWav };
8
+ export { Synthesizer, Sequencer, MIDI, SoundFont2, rawDataToWav, SpessaSynthLogging };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_core",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "SoundFont2 synthesizer library for node.js",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/spessasus/spessasynth_core.git"
12
+ "url": "git+https://github.com/spessasus/spessasynth_core.git"
13
13
  },
14
14
  "keywords": [
15
15
  "sf2",