Skip to content

Logging

spessasus edited this page Aug 6, 2024 · 3 revisions

Logging

By default, SpessaSynth prints out a lot of stuff to console. Here's how you can disable it:

Main thread

SpessaSynthLogging

// normal install
import SpessaSynthLogging from "./spessasynth_lib/utils/loggin.js";
// npm package
import SpessaSynthLogging from "spessasynth_lib";

SpessaSynthLogging(enableInfo, enableWarning, enableGroup, enableTable);

All the input variables are booleans corresponding to the things SpessaSynth logs.

  • Info - all general info such as parsing soundfonts, midi files, RPN changes, etc.
  • Warnings - all messages unrecognized by the synthesizer, other warnings
  • group - the groups for parsing the soundfont and midi files.
  • table - the debug table when enableDebugging is set to true for synth.noteOn

Synthetizer

synth.setLogLevel(enableInfo, enableWarning, enableGroup, enableTable);

Same arguments as above.