spessasynth_core 3.27.7 → 3.27.8

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/README.md CHANGED
@@ -6,146 +6,184 @@
6
6
  **A powerful SF2/DLS/MIDI JavaScript library. It works with any modern JS environment that supports WebAssembly.**
7
7
 
8
8
  It allows you to:
9
+
9
10
  - Play MIDI files using SF2/SF3/DLS files!
10
11
  - Read and write MIDI files!
11
12
  - Write SF2/SF3 files!
12
13
  - Convert DLS to SF2! (and back!)
13
- - [and more!](https://github.com/spessasus/spessasynth_core?tab=readme-ov-file#current-features)
14
- > **TIP:**
15
- > Looking for an easy-to-use WebAudioAPI browser wrapper? Try [spessasynth_lib](https://github.com/spessasus/spessasynth_lib)!
14
+ - [and more!](#current-features)
15
+
16
+ ### Install
16
17
 
17
18
  ```shell
18
19
  npm install --save spessasynth_core
19
20
  ```
20
21
 
22
+ > **Tip:**
23
+ > Looking for an easy-to-use WebAudioAPI browser wrapper?
24
+ > Try [spessasynth_lib](https://github.com/spessasus/spessasynth_lib)!
25
+
21
26
  ### [Project site (consider giving it a star!)](https://github.com/spessasus/spessasynth_core)
22
27
 
23
28
  ### Made with spessasynth_core
29
+
24
30
  - [SpessaSynth Online SF2/DLS MIDI Player](https://spessasus.github.io/SpessaSynth)
25
31
  - [SpessaFont Online SoundFont/DLS Editor](https://spessasus.github.io/SpessaFont)
26
32
 
27
- ### [Documentation (in progress!)](https://github.com/spessasus/spessasynth_core/wiki/Home)
28
-
29
-
30
- > Note: This is the new heart of the SpessaSynth library, after the repository has been split.
33
+ ### [Documentation](https://spessasus.github.io/spessasynth_core)
31
34
 
32
35
  **SpessaSynth Project index**
33
36
 
34
37
  - [spessasynth_core](https://github.com/spessasus/spessasynth_core) (you are here) - SF2/DLS/MIDI library
35
- - [spessasynth_lib](https://github.com/spessasus/spessasynth_lib) - spessasynth_core wrapper optimized for browsers and WebAudioAPI
38
+ - [spessasynth_lib](https://github.com/spessasus/spessasynth_lib) - spessasynth_core wrapper optimized for browsers and
39
+ WebAudioAPI
36
40
  - [SpessaSynth](https://github.com/spessasus/SpessaSynth) - online/local MIDI player/editor application
37
41
  - [SpessaFont](https://github.com/spessasus/SpessaFont) - online SF2/DLS editor
38
42
 
39
43
  ## Current Features
40
44
 
41
45
  ### Easy Integration
46
+
42
47
  - **Modular design:** *Easy integration into other projects (load what you need)*
43
48
  - **Flexible:** *It's not just a MIDI player!*
44
- - **Easy to Use:** *Basic setup is just [two lines of code!](https://github.com/spessasus/spessasynth_core/wiki/Getting-Started#minimal-setup)*
49
+ - **Easy to Use:** *Basic setup is
50
+ just [two lines of code!](https://spessasus.github.io/spessasynth_core/Getting-Started#minimal-setup)*
45
51
  - **No dependencies:** *Batteries included!*
46
52
 
47
53
  ### Powerful MIDI Synthesizer
54
+
48
55
  - Suitable for both **real-time** and **offline** synthesis
49
56
  - **Excellent SoundFont support:**
50
- - **Full Generator Support**
51
- - **Full Modulator Support:** *First (to my knowledge) JavaScript SoundFont synth with that feature!*
52
- - **GeneralUserGS Compatible:** *[See more here!](https://github.com/mrbumpy409/GeneralUser-GS/blob/main/documentation/README.md)*
53
- - **SoundFont3 Support:** Play compressed SoundFonts!
54
- - **Experimental SF2Pack Support:** Play soundfonts compressed with BASSMIDI! (*Note: only works with vorbis compression*)
55
- - **Can load very large SoundFonts:** up to 4GB! *Note: Only Firefox handles this well; Chromium has a hard-coded memory limit*
57
+ - **Full Generator Support**
58
+ - **Full Modulator Support:** *First (to my knowledge) JavaScript SoundFont synth with that feature!*
59
+ - **GeneralUserGS Compatible:**
60
+ *[See more here!](https://github.com/mrbumpy409/GeneralUser-GS/blob/main/documentation/README.md)*
61
+ - **SoundFont3 Support:** Play compressed SoundFonts!
62
+ - **Experimental SF2Pack Support:** Play soundfonts compressed with BASSMIDI! (*Note: only works with vorbis
63
+ compression*)
64
+ - **Can load very large SoundFonts:** up to 4GB! *Note: Only Firefox handles this well; Chromium has a hard-coded
65
+ memory limit*
56
66
  - **Great DLS Support:**
57
- - **DLS Level 1 Support**
58
- - **DLS Level 2 Support**
59
- - **Mobile DLS Support**
60
- - **Correct articulator support:** *Converts articulators to both modulators and generators!*
61
- - **Tested and working with gm.dls!**
62
- - **Correct volume:** *Properly translated to SoundFont volume!*
63
- - **A-Law encoding support**
64
- - **Both unsigned 8-bit and signed 16-bit sample support (24-bit theoretically supported as well!)**
65
- - **Detects special articulator combinations:** *Such as vibratoLfoToPitch*
67
+ - **DLS Level 1 Support**
68
+ - **DLS Level 2 Support**
69
+ - **Mobile DLS Support**
70
+ - **Correct articulator support:** *Converts articulators to both modulators and generators!*
71
+ - **Tested and working with gm.dls!**
72
+ - **Correct volume:** *Properly translated to SoundFont volume!*
73
+ - **A-Law encoding support**
74
+ - **Both unsigned 8-bit and signed 16-bit sample support (24-bit theoretically supported as well!)**
75
+ - **Detects special articulator combinations:** *Such as vibratoLfoToPitch*
66
76
  - **Soundfont manager:** Stack multiple soundfonts!
67
77
  - **Unlimited channel count:** Your CPU is the limit!
68
78
  - **Excellent MIDI Standards Support:**
69
- - **MIDI Controller Support:** Default supported controllers [here](https://github.com/spessasus/spessasynth_core/wiki/MIDI-Implementation#default-supported-controllers)
70
- - **Portamento Support:** Glide the notes!
71
- - **Sound Controllers:** Real-time filter and envelope control!
72
- - **MIDI Tuning Standard Support:** [more info here](https://github.com/spessasus/spessasynth_core/wiki/MIDI-Implementation#midi-tuning-standard)
73
- - [Full **RPN** and limited **NRPN** support](https://github.com/spessasus/spessasynth_core/wiki/MIDI-Implementation#supported-registered-parameters)
74
- - **SoundFont2 NRPN Support**
75
- - [**AWE32** NRPN Compatibility Layer](https://github.com/spessasus/spessasynth_core/wiki/MIDI-Implementation#awe32-nrpn-compatibility-layer)
76
- - Supports some [**Roland GS** and **Yamaha XG** system exclusives](https://github.com/spessasus/spessasynth_core/wiki/MIDI-Implementation#supported-system-exclusives)
79
+ - **MIDI Controller Support:** Default supported
80
+ controllers [here](https://spessasus.github.io/spessasynth_core/MIDI-Implementation#default-supported-controllers)
81
+ - **Portamento Support:** *Smooth note gliding!*
82
+ - **Sound Controllers:** *Real-time filter and envelope control!*
83
+ - **MIDI Tuning Standard Support:**
84
+ *[more info here](https://spessasus.github.io/spessasynth_core/MIDI-Implementation#midi-tuning-standard)*
85
+ - [Full **RPN** and limited **NRPN**
86
+ support](https://spessasus.github.io/spessasynth_core/MIDI-Implementation#supported-registered-parameters)
87
+ - **SoundFont2 NRPN Support**
88
+ - [**AWE32**
89
+ NRPN Compatibility Layer](https://spessasus.github.io/spessasynth_core/MIDI-Implementation#awe32-nrpn-compatibility-layer)
90
+ - Supports some [**Roland GS** and **Yamaha XG**
91
+ system exclusives](https://spessasus.github.io/spessasynth_core/MIDI-Implementation#supported-system-exclusives)
77
92
 
78
93
  ### Powerful and Fast MIDI Sequencer
94
+
79
95
  - **Supports MIDI formats 0, 1, and 2:** *note: format 2 support is experimental as it's very, very rare.*
80
- - **[Multi-Port MIDI](https://github.com/spessasus/spessasynth_core/wiki/About-Multi-Port) support:** More than 16 channels!
81
- - **Smart preloading:** Only preloads the samples used in the MIDI file for smooth playback *(down to key and velocity!)*
82
- - **Lyrics support:** Add karaoke to your program!
96
+ - **[Multi-Port MIDI](https://spessasus.github.io/spessasynth_core/About-Multi-Port) support:** *More than 16 channels!*
97
+ - **Smart preloading:** Only preloads the samples used in the MIDI file for smooth playback *(down to key and
98
+ velocity!)*
99
+ - **Lyrics support:** *Add karaoke to your program!*
83
100
  - **Raw lyrics available:** Decode in any encoding! *(Kanji? No problem!)*
84
- - **Loop points support:** Ensures seamless loops
101
+ - **Loop points support:** *Ensures seamless loops!*
85
102
 
86
103
  ### Read and Write SoundFont and MIDI Files with Ease
104
+
87
105
  #### Read and write MIDI files
88
- - **Smart name detection:** Handles incorrectly formatted and non-standard track names
89
- - **Raw name available:** Decode in any encoding! *(Kanji? No problem!)*
90
- - **Port detection during load time:** Manage ports and channels easily!
91
- - **Used channels on track:** Quickly determine which channels are used
92
- - **Key range detection:** Detect the key range of the MIDI
93
- - **Easy MIDI editing:** Use [helper functions](https://github.com/spessasus/spessasynth_core/wiki/Writing-MIDI-Files#modifymidi) to modify the song to your needs!
94
- - **Loop detection:** Automatically detects loops in MIDIs (e.g., from *Touhou Project*)
95
- - **First note detection:** Skip unnecessary silence at the start by jumping to the first note!
96
- - **Lyrics support:** Both regular MIDI and .kar files!
97
- - **[Write MIDI files from scratch](https://github.com/spessasus/spessasynth_core/wiki/Creating-MIDI-Files)**
98
- - **Easy saving:** Save with just [one function!](https://github.com/spessasus/spessasynth_core/wiki/Writing-MIDI-Files#writemidi)
99
-
100
- #### Read and write [RMID files with embedded SF2 soundfonts](https://github.com/spessasus/sf2-rmidi-specification#readme)
101
- - **[Level 4](https://github.com/spessasus/sf2-rmidi-specification#level-4) compliance:** Reads and writes *everything!*
102
- - **Compression and trimming support:** Reduce a MIDI file with a 1GB soundfont to **as small as 5MB**!
103
- - **DLS Version support:** The original legacy format with bank offset detection!
104
- - **Automatic bank shifting and validation:** Every soundfont *just works!*
105
- - **Metadata support:** Add title, artist, album name and cover and more! And of course, read them too! *(In any encoding!)*
106
- - **Compatible with [Falcosoft Midi Player 6!](https://falcosoft.hu/softwares.html#midiplayer)**
107
- - **Easy saving:** [As simple as saving a MIDI file!](https://github.com/spessasus/spessasynth_core/wiki/Writing-MIDI-Files#writermidi)
106
+
107
+ - **Smart name detection:** *Handles incorrectly formatted and non-standard track names!*
108
+ - **Raw name available:** Decode in any encoding! *(Kanji? No problem!)*
109
+ - **Port detection during load time:** *Manage ports and channels easily!*
110
+ - **Used channels on track:** *Quickly determine which channels are used!*
111
+ - **Key range detection:** *Detect the key range of the MIDI!*
112
+ - **Easy MIDI editing:**
113
+ Use [helper functions](https://spessasus.github.io/spessasynth_core/Writing-MIDI-Files#modifymidi) to modify the
114
+ song to your needs!
115
+ - **Loop detection:** *Automatically detects loops in MIDIs (e.g., from **Touhou Project**)*
116
+ - **First note detection:** *Skip unnecessary silence at the start by jumping to the first note!*
117
+ - **Lyrics support:** *Both regular MIDI and .kar files!*
118
+ - **[Write MIDI files from scratch](https://spessasus.github.io/spessasynth_core/Creating-MIDI-Files)**
119
+ - **Easy saving:** *Save with
120
+ just [one function!](https://spessasus.github.io/spessasynth_core/Writing-MIDI-Files#writemidi)*
121
+
122
+ #### Read and write [RMID files with embedded SF2 soundfonts](https://github.com/spessasus/sf2-rmidi-specification#readme)*
123
+
124
+ - **[Level 4](https://github.com/spessasus/sf2-rmidi-specification#level-4) compliance:** Reads and writes *everything!*
125
+ - **Compression and trimming support:** *Reduce a MIDI file with a 1GB sound bank to **as small as 5MB**!*
126
+ - **DLS Version support:** *The original legacy format with bank offset detection!*
127
+ - **Automatic bank shifting and validation:** Every sound bank *just works!*
128
+ - **Metadata support:** Add title, artist, album name and cover and more! And of course, read them too! *(In any
129
+ encoding!)*
130
+ - **Compatible with [Falcosoft Midi Player 6!](https://falcosoft.hu/softwares.html#midiplayer)**
131
+ - **Easy saving:**
132
+ *[As simple as saving a MIDI file!](https://spessasus.github.io/spessasynth_core/Writing-MIDI-Files#writermidi)*
108
133
 
109
134
  #### Read and write SoundFont2 files
110
- - **Easy info access:** Just an [object of strings!](https://github.com/spessasus/spessasynth_core/wiki/SoundFont2-Class#soundfontinfo)
111
- - **Smart trimming:** Trim the SoundFont to only include samples used in the MIDI *(down to key and velocity!)*
112
- - **sf3 conversion:** Compress SoundFont2 files to SoundFont3 with variable quality!
113
- - **Easy saving:** Also just [one function!](https://github.com/spessasus/spessasynth_core/wiki/Sound-Bank-Parser#write)
135
+
136
+ - **Easy info access:** *Just
137
+ an [object of strings!](https://spessasus.github.io/spessasynth_core/Sound-Bank#soundfontinfo)*
138
+ - **Smart trimming:** Trim the sound bank to only include samples used in the MIDI *(down to key and velocity!)*
139
+ - **SF3 conversion:** *Compress SoundFont2 files to SoundFont3 with variable quality!*
140
+ - **Easy saving:** *Also just [one function!](https://spessasus.github.io/spessasynth_core/Sound-Bank#write)*
114
141
 
115
142
  #### Read and write SoundFont3 files
116
- - Same features as SoundFont2 but with now with **Ogg Vorbis compression!**
117
- - **Variable compression quality:** You choose between file size and quality!
118
- - **Compression preserving:** Avoid decompressing and recompressing uncompressed samples for minimal quality loss!
143
+
144
+ - Same features as SoundFont2 but with now with **Ogg Vorbis compression!**
145
+ - **Variable compression quality:** *You choose between file size and quality!*
146
+ - **Compression preserving:** *Avoid decompressing and recompressing uncompressed samples for minimal quality loss!*
147
+ - **Custom compression function:** *Want a different format than Vorbis? No problem!*
119
148
 
120
149
  #### Read and write DLS Level One or Two files
121
- - Read DLS (DownLoadable Sounds) files as SF2 files!
122
- - **Works like a normal soundfont:** *Saving it as sf2 is still [just one function!](https://github.com/spessasus/spessasynth_core/wiki/Sound-Bank-Parser#write)*
123
- - *That's right, saving as DLS is also [just one function!](https://github.com/spessasus/spessasynth_core/wiki/Sound-Bank-Parser#writedls)*
124
- - Converts articulators to both **modulators** and **generators**!
125
- - Works with both unsigned 8-bit samples and signed 16-bit samples!
126
- - A-Law encoding support
127
- - **Covers special generator cases:** *such as modLfoToPitch*!
128
- - **Correct volume:** *looking at you, Viena and gm.sf2!*
129
- - Support built right into the synthesizer!
130
- - **Convert SF2 to DLS:** [with limitations](https://github.com/spessasus/spessasynth_core/wiki/DLS-Conversion-Problem)
150
+
151
+ - Read DLS (DownLoadable Sounds) files like SF2 files!
152
+ - **Native support:** *Saving it as sf2 is
153
+ still [just one function!](https://spessasus.github.io/spessasynth_core/Sound-Bank#write)*
154
+ - *That's right, saving as DLS is
155
+ also [just one function!](https://spessasus.github.io/spessasynth_core/Sound-Bank#writedls)*
156
+ - Converts articulators to both **modulators** and **generators**!
157
+ - Works with both unsigned 8-bit samples and signed 16-bit samples!
158
+ - **A-Law encoding support:** *Sure, why not?*
159
+ - **Covers special generator cases:** *such as modLfoToPitch*!
160
+ - **Correct volume:** *looking at you, Viena and gm.sf2!*
161
+ - Support built right into the synthesizer!
162
+ - **Convert SF2 to DLS:** [limited support](https://spessasus.github.io/spessasynth_core/DLS-Conversion-Problem)
131
163
 
132
164
  ### Export MIDI as WAV
133
- - Save the MIDI file as WAV audio!
134
- - **Metadata support:** *Embed metadata such as title, artist, album and more!*
135
- - **Cue points:** *Write MIDI loop points as cue points!*
136
- - **Loop multiple times:** *Render two (or more) loops into the file for seamless transitions!*
137
- - *That's right, saving as WAV is also [just one function!](https://github.com/spessasus/spessasynth_core/wiki/Writing-Wave-Files#audiobuffertowav)*
165
+
166
+ - Save the MIDI file as WAV audio!
167
+ - **Metadata support:** *Embed metadata such as title, artist, album and more!*
168
+ - **Cue points:** *Write MIDI loop points as cue points!*
169
+ - **Loop multiple times:** *Render two (or more) loops into the file for seamless transitions!*
170
+ - *That's right, saving as WAV is
171
+ also [just one function!](https://spessasus.github.io/spessasynth_core/Writing-Wave-Files#audiobuffertowav)*
138
172
 
139
173
  ### Limitations
174
+
140
175
  - Synth's performance may be questionable sometimes
141
176
  - [SF2 to DLS Conversion limits](https://github.com/spessasus/SpessaSynth/wiki/DLS-Conversion-Problem)
142
177
 
143
178
  #### TODO
179
+
144
180
  - Improve the performance of the engine
145
181
  - Potentially port the system to Emscripten
146
182
 
147
183
  ### Special Thanks
148
- - [FluidSynth](https://github.com/FluidSynth/fluidsynth) - for the source code that helped implement functionality and fixes
184
+
185
+ - [FluidSynth](https://github.com/FluidSynth/fluidsynth) - for the source code that helped implement functionality and
186
+ fixes
149
187
  - [Polyphone](https://www.polyphone-soundfonts.com/) - for the soundfont testing and editing tool
150
188
  - [Meltysynth](https://github.com/sinshu/meltysynth) - for the initial low-pass filter implementation
151
189
  - [RecordingBlogs](https://www.recordingblogs.com/) - for detailed explanations on MIDI messages
@@ -159,14 +197,14 @@ npm install --save spessasynth_core
159
197
  **If you like this project, consider giving it a star. It really helps out!**
160
198
 
161
199
  ### Short example: MIDI to wav converter
200
+
162
201
  ```js
163
202
  import * as fs from "node:fs";
164
- import { MIDI, SpessaSynthProcessor, SpessaSynthSequencer, audioToWav, loadSoundFont } from "spessasynth_core";
203
+ import {MIDI, SpessaSynthProcessor, SpessaSynthSequencer, audioToWav, loadSoundFont} from "spessasynth_core";
165
204
 
166
205
  // process arguments
167
206
  const args = process.argv.slice(2);
168
- if (args.length !== 3)
169
- {
207
+ if (args.length !== 3) {
170
208
  console.log("Usage: node index.js <soundfont path> <midi path> <wav output path>");
171
209
  process.exit();
172
210
  }
@@ -191,8 +229,7 @@ let filledSamples = 0;
191
229
  // note: buffer size is recommended to be very small, as this is the interval between modulator updates and LFO updates
192
230
  const bufSize = 128;
193
231
  let i = 0;
194
- while (filledSamples + bufSize < sampleCount)
195
- {
232
+ while (filledSamples + bufSize < sampleCount) {
196
233
  const bufLeft = new Float32Array(bufSize);
197
234
  const bufRight = new Float32Array(bufSize);
198
235
  // process sequencer
@@ -206,8 +243,7 @@ while (filledSamples + bufSize < sampleCount)
206
243
  filledSamples += bufSize;
207
244
  i++;
208
245
  // log progress
209
- if (i % 100 === 0)
210
- {
246
+ if (i % 100 === 0) {
211
247
  console.log("Rendered", seq.currentTime, "/", midi.duration);
212
248
  }
213
249
  }
@@ -222,10 +258,12 @@ process.exit();
222
258
  ```
223
259
 
224
260
  # License
261
+
225
262
  Copyright © 2025 Spessasus
226
263
  Licensed under the Apache-2.0 License.
227
264
 
228
265
  #### Legal
266
+
229
267
  This project is in no way endorsed or otherwise affiliated with the MIDI Manufacturers Association,
230
268
  Creative Technology Ltd. or E-mu Systems, Inc., or any other organization mentioned.
231
269
  SoundFont® is a registered trademark of Creative Technology Ltd.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_core",
3
- "version": "3.27.7",
3
+ "version": "3.27.8",
4
4
  "description": "MIDI and SoundFont2/DLS library with no compromises",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -8,7 +8,8 @@ export const masterParameterType = {
8
8
  masterPan: 1,
9
9
  voicesCap: 2,
10
10
  interpolationType: 3,
11
- midiSystem: 4
11
+ midiSystem: 4,
12
+ monophonicRetriggerMode: 5
12
13
  };
13
14
 
14
15
  /**
@@ -31,7 +32,6 @@ export function setMasterParameter(type, value)
31
32
 
32
33
  case masterParameterType.mainVolume:
33
34
  this.masterGain = value * SYNTHESIZER_GAIN;
34
- this.setMasterParameter(masterParameterType.masterPan, this.pan);
35
35
  break;
36
36
 
37
37
  case masterParameterType.voicesCap:
@@ -44,5 +44,10 @@ export function setMasterParameter(type, value)
44
44
 
45
45
  case masterParameterType.midiSystem:
46
46
  this.setSystem(value);
47
+ break;
48
+
49
+ case masterParameterType.monophonicRetriggerMode:
50
+ this._monophonicRetriggerMode = true;
51
+ break;
47
52
  }
48
53
  }
@@ -56,6 +56,12 @@ export function noteOn(midiNote, velocity)
56
56
  velocity = this.velocityOverride;
57
57
  }
58
58
 
59
+ // monophonic retrigger
60
+ if (this.synth._monophonicRetriggerMode)
61
+ {
62
+ this.killNote(midiNote, -7200);
63
+ }
64
+
59
65
  // key velocity override
60
66
  const keyVel = this.synth.keyModifierManager.getVelocity(this.channelNumber, realKey);
61
67
  if (keyVel > -1)
@@ -1,13 +1,12 @@
1
- import { SpessaSynthInfo } from "../../../../utils/loggin.js";
2
- import { consoleColors } from "../../../../utils/other.js";
3
- import { customControllers } from "../../engine_components/controller_tables.js";
1
+ import {SpessaSynthInfo} from "../../../../utils/loggin.js";
2
+ import {consoleColors} from "../../../../utils/other.js";
3
+ import {customControllers} from "../../engine_components/controller_tables.js";
4
4
 
5
5
  /**
6
6
  * @this {MidiAudioChannel}
7
7
  * @param cents {number}
8
8
  */
9
- export function setModulationDepth(cents)
10
- {
9
+ export function setModulationDepth(cents) {
11
10
  cents = Math.round(cents);
12
11
  SpessaSynthInfo(
13
12
  `%cChannel ${this.channelNumber} modulation depth. Cents: %c${cents}`,
@@ -15,7 +14,7 @@ export function setModulationDepth(cents)
15
14
  consoleColors.value
16
15
  );
17
16
  /* ==============
18
- IMPORTANT
17
+ Important
19
18
  here we convert cents into a multiplier.
20
19
  midi spec assumes the default is 50 cents,
21
20
  but it might be different for the soundfont,
@@ -342,7 +342,12 @@ class SpessaSynthProcessor
342
342
  * are the chorus and reverb effects enabled?
343
343
  * @type {boolean}
344
344
  */
345
- effectsEnabled;
345
+ effectsEnabled = true;
346
+
347
+ /**
348
+ * one voice per note and track (issue #7)
349
+ */
350
+ _monophonicRetriggerMode = false;
346
351
 
347
352
 
348
353
  /**
@@ -751,7 +756,6 @@ class SpessaSynthProcessor
751
756
  // GM2 specification, section 4.1: volume is squared.
752
757
  // though, according to my own testing, Math.E seems like a better choice
753
758
  this.midiVolume = Math.pow(volume, Math.E);
754
- this.setMasterParameter(masterParameterType.masterPan, this.pan);
755
759
  }
756
760
 
757
761
  /**
@@ -67,7 +67,7 @@ export class SynthesizerSnapshot
67
67
  // key mappings
68
68
  snapshot.keyMappings = spessaSynthProcessor.keyModifierManager.getMappings();
69
69
  // pan and volume
70
- snapshot.mainVolume = spessaSynthProcessor.midiVolume;
70
+ snapshot.mainVolume = spessaSynthProcessor.masterGain;
71
71
  snapshot.pan = spessaSynthProcessor.pan;
72
72
 
73
73
  // others