spessasynth_lib 3.27.3 → 3.27.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_lib",
3
- "version": "3.27.3",
3
+ "version": "3.27.5",
4
4
  "description": "MIDI and SoundFont2/DLS library for the browsers with no compromises",
5
5
  "browser": "index.js",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
1
  ## This is the MIDI handling folder.
2
2
 
3
- The code here is respnsible for dealing with MIDI Inputs and outputs
3
+ The code here is responsible for dealing with MIDI Inputs and outputs
4
4
  and also for the WebMidiLink functionality.
@@ -16,7 +16,7 @@
16
16
  * @property {number?} nodesAmount - the amount of delay nodes (for each channel) and the corresponding oscillators
17
17
  * @property {number?} defaultDelay - the initial delay, in seconds
18
18
  * @property {number?} delayVariation - the difference between delays in the delay nodes
19
- * @property {number?} stereoDifference - the difference of delays between two channels (added to the left channel and subtracted from the right)
19
+ * @property {number?} stereoDifference - the difference of delays between two channels (added to the right channel)
20
20
  * @property {number?} oscillatorFrequency - the initial delay time oscillator frequency, in Hz.
21
21
  * @property {number?} oscillatorFrequencyVariation - the difference between frequencies of oscillators, in Hz
22
22
  * @property {number?} oscillatorGain - how much will oscillator alter the delay in delay nodes, in seconds
@@ -24,12 +24,12 @@
24
24
 
25
25
  const NODES_AMOUNT = 4;
26
26
  const DEFAULT_DELAY = 0.03;
27
- const DELAY_VARIATION = 0.01;
28
- const STEREO_DIFF = 0.02;
27
+ const DELAY_VARIATION = 0.015;
28
+ const STEREO_DIFF = 0.03;
29
29
 
30
30
  const OSC_FREQ = 0.2;
31
31
  const OSC_FREQ_VARIATION = 0.05;
32
- const OSC_GAIN = 0.003;
32
+ const OSC_GAIN = 0.005;
33
33
 
34
34
  export const DEFAULT_CHORUS_CONFIG = {
35
35
  nodesAmount: NODES_AMOUNT,
@@ -71,7 +71,7 @@ export class FancyChorus
71
71
  // left node
72
72
  this._createChorusNode(
73
73
  freq,
74
- delay - config.stereoDifference,
74
+ delay,
75
75
  chorusNodesLeft,
76
76
  0,
77
77
  merger,
@@ -204,7 +204,8 @@ class WorkletSpessaProcessor extends AudioWorkletProcessor
204
204
  // autoplay is ignored
205
205
  try
206
206
  {
207
- this.sequencer.loadNewSongList([startRenderingData.parsedMIDI]);
207
+ // cloned objects don't have methods
208
+ this.sequencer.loadNewSongList([BasicMIDI.copyFrom(startRenderingData.parsedMIDI)]);
208
209
  }
209
210
  catch (e)
210
211
  {
@@ -387,7 +388,8 @@ class WorkletSpessaProcessor extends AudioWorkletProcessor
387
388
  {
388
389
  if (s.duration)
389
390
  {
390
- return s;
391
+ // cloned objects don't have methods
392
+ return BasicMIDI.copyFrom(s);
391
393
  }
392
394
  return new MIDI(s.binary, s.altName);
393
395
  });