spessasynth_lib 3.24.28 → 3.24.35

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 (74) hide show
  1. package/README.md +1 -1
  2. package/external_midi/web_midi_link.js +1 -1
  3. package/index.js +8 -52
  4. package/midi_parser/basic_midi.js +15 -30
  5. package/midi_parser/midi_builder.js +6 -6
  6. package/midi_parser/midi_data.js +2 -2
  7. package/midi_parser/midi_editor.js +15 -15
  8. package/midi_parser/midi_loader.js +3 -3
  9. package/midi_parser/midi_message.js +2 -2
  10. package/midi_parser/midi_sequence.js +32 -4
  11. package/midi_parser/midi_writer.js +8 -8
  12. package/midi_parser/rmidi_writer.js +20 -21
  13. package/midi_parser/used_keys_loaded.js +8 -6
  14. package/package.json +1 -1
  15. package/sequencer/sequencer.js +6 -6
  16. package/sequencer/worklet_sequencer/events.js +2 -1
  17. package/sequencer/worklet_sequencer/play.js +2 -3
  18. package/sequencer/worklet_sequencer/process_event.js +1 -1
  19. package/sequencer/worklet_sequencer/process_tick.js +1 -1
  20. package/sequencer/worklet_sequencer/sequencer_message.js +1 -1
  21. package/sequencer/worklet_sequencer/song_control.js +6 -7
  22. package/sequencer/worklet_sequencer/worklet_sequencer.js +2 -1
  23. package/soundfont/basic_soundfont/basic_soundfont.js +197 -13
  24. package/soundfont/basic_soundfont/generator.js +18 -16
  25. package/soundfont/basic_soundfont/modulator.js +3 -0
  26. package/soundfont/basic_soundfont/riff_chunk.js +2 -2
  27. package/soundfont/basic_soundfont/write_dls/art2.js +1 -1
  28. package/soundfont/basic_soundfont/write_dls/combine_zones.js +12 -10
  29. package/soundfont/basic_soundfont/write_dls/ins.js +2 -2
  30. package/soundfont/basic_soundfont/write_dls/lins.js +1 -1
  31. package/soundfont/basic_soundfont/write_dls/modulator_converter.js +9 -9
  32. package/soundfont/basic_soundfont/write_dls/rgn2.js +5 -5
  33. package/soundfont/basic_soundfont/write_dls/wave.js +2 -1
  34. package/soundfont/basic_soundfont/write_dls/write_dls.js +1 -1
  35. package/soundfont/basic_soundfont/write_dls/wsmp.js +2 -2
  36. package/soundfont/basic_soundfont/write_dls/wvpl.js +1 -1
  37. package/soundfont/basic_soundfont/write_sf2/ibag.js +2 -2
  38. package/soundfont/basic_soundfont/write_sf2/igen.js +20 -17
  39. package/soundfont/basic_soundfont/write_sf2/imod.js +3 -3
  40. package/soundfont/basic_soundfont/write_sf2/inst.js +2 -2
  41. package/soundfont/basic_soundfont/write_sf2/pbag.js +2 -2
  42. package/soundfont/basic_soundfont/write_sf2/pgen.js +21 -18
  43. package/soundfont/basic_soundfont/write_sf2/phdr.js +2 -2
  44. package/soundfont/basic_soundfont/write_sf2/pmod.js +2 -2
  45. package/soundfont/basic_soundfont/write_sf2/sdta.js +1 -1
  46. package/soundfont/basic_soundfont/write_sf2/shdr.js +1 -1
  47. package/soundfont/basic_soundfont/write_sf2/write.js +7 -6
  48. package/soundfont/dls/articulator_converter.js +1 -0
  49. package/soundfont/dls/dls_destinations.js +3 -3
  50. package/soundfont/dls/dls_preset.js +1 -1
  51. package/soundfont/dls/dls_soundfont.js +7 -7
  52. package/soundfont/dls/read_instrument.js +1 -1
  53. package/soundfont/dls/read_region.js +1 -0
  54. package/soundfont/dls/read_samples.js +4 -5
  55. package/soundfont/load_soundfont.js +1 -1
  56. package/soundfont/read_sf2/presets.js +1 -1
  57. package/soundfont/read_sf2/soundfont.js +5 -5
  58. package/synthetizer/audio_effects/effects_config.js +3 -3
  59. package/synthetizer/audio_effects/fancy_chorus.js +7 -7
  60. package/synthetizer/audio_effects/reverb.js +5 -5
  61. package/synthetizer/audio_effects/reverb_as_binary.js +15 -0
  62. package/synthetizer/audio_effects/reverb_buffer.min.js +1 -0
  63. package/synthetizer/synth_constants.js +14 -0
  64. package/synthetizer/synthetizer.js +1 -17
  65. package/synthetizer/worklet_processor.min.js +14 -12
  66. package/synthetizer/worklet_system/main_processor.js +2 -2
  67. package/synthetizer/worklet_system/worklet_methods/controller_control/controller_change.js +1 -1
  68. package/synthetizer/worklet_system/worklet_methods/controller_control/reset_controllers.js +1 -1
  69. package/synthetizer/worklet_system/worklet_methods/create_worklet_channel.js +2 -1
  70. package/synthetizer/worklet_system/worklet_methods/worklet_soundfont_manager/worklet_soundfont_manager.js +2 -2
  71. package/synthetizer/worklet_system/worklet_processor.js +1 -1
  72. package/soundfont/basic_soundfont/write_sf2/soundfont_trimmer.js +0 -185
  73. package/synthetizer/audio_effects/impulse_response_2.flac +0 -0
  74. package/synthetizer/worklet_system/minify_processor.sh +0 -4
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @typedef {Object} StartRenderingDataConfig
3
+ * @property {BasicMIDI} parsedMIDI - the MIDI to render
4
+ * @property {SynthesizerSnapshot} snapshot - the snapshot to apply
5
+ * @property {boolean|undefined} oneOutput - if synth should use one output with 32 channels (2 audio channels for each midi channel).
6
+ * this disabled chorus and reverb.
7
+ * @property {number|undefined} loopCount - the times to loop the song
8
+ */
9
+
10
+ export const WORKLET_PROCESSOR_NAME = "spessasynth-worklet-system";
11
+ export const VOICE_CAP = 350;
12
+ export const DEFAULT_PERCUSSION = 9;
13
+ export const MIDI_CHANNEL_COUNT = 16;
14
+ export const DEFAULT_SYNTH_MODE = "gs";
@@ -15,6 +15,7 @@ import { DEFAULT_SYNTH_CONFIG } from "./audio_effects/effects_config.js";
15
15
  import { SoundfontManager } from "./synth_soundfont_manager.js";
16
16
  import { KeyModifierManager } from "./key_modifier_manager.js";
17
17
  import { channelConfiguration } from "./worklet_system/worklet_utilities/controller_tables.js";
18
+ import { DEFAULT_PERCUSSION, MIDI_CHANNEL_COUNT, VOICE_CAP, WORKLET_PROCESSOR_NAME } from "./synth_constants.js";
18
19
 
19
20
 
20
21
  /**
@@ -22,23 +23,6 @@ import { channelConfiguration } from "./worklet_system/worklet_utilities/control
22
23
  * purpose: responds to midi messages and called functions, managing the channels and passing the messages to them
23
24
  */
24
25
 
25
- /**
26
- * @typedef {Object} StartRenderingDataConfig
27
- * @property {BasicMIDI} parsedMIDI - the MIDI to render
28
- * @property {SynthesizerSnapshot} snapshot - the snapshot to apply
29
- * @property {boolean|undefined} oneOutput - if synth should use one output with 32 channels (2 audio channels for each midi channel).
30
- * this disabled chorus and reverb.
31
- * @property {number|undefined} loopCount - the times to loop the song
32
- */
33
-
34
- export const WORKLET_PROCESSOR_NAME = "spessasynth-worklet-system";
35
-
36
- export const VOICE_CAP = 350;
37
-
38
- export const DEFAULT_PERCUSSION = 9;
39
- export const MIDI_CHANNEL_COUNT = 16;
40
- export const DEFAULT_SYNTH_MODE = "gs";
41
-
42
26
 
43
27
  export class Synthetizer
44
28
  {