spessasynth_lib 3.21.7 → 3.21.9
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/@types/index.d.ts +1 -2
- package/@types/soundfont/basic_soundfont/modulator.d.ts +12 -0
- package/externals/NOTICE +1 -5
- package/index.js +1 -3
- package/package.json +1 -1
- package/sequencer/sequencer.js +0 -0
- package/sequencer/worklet_sequencer/worklet_sequencer.js +0 -0
- package/soundfont/basic_soundfont/modulator.js +23 -3
- package/synthetizer/audio_effects/impulse_response_2.flac +0 -0
- package/synthetizer/worklet_processor.min.js +11 -11
- package/synthetizer/worklet_system/worklet_utilities/stereo_panner.js +1 -1
- package/synthetizer/worklet_system/worklet_utilities/worklet_modulator.js +10 -1
- package/@types/externals/libvorbis/OggVorbisEncoder.min.d.ts +0 -3
- package/@types/utils/encode_vorbis.d.ts +0 -10
- package/externals/libvorbis/@types/OggVorbisEncoder.d.ts +0 -34
- package/externals/libvorbis/OggVorbisEncoder.min.js +0 -1
- package/utils/encode_vorbis.js +0 -30
package/@types/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { BasicSoundFont } from "./soundfont/basic_soundfont/basic_soundfont.js";
|
|
|
6
6
|
import { loadSoundFont } from "./soundfont/load_soundfont.js";
|
|
7
7
|
import { trimSoundfont } from "./soundfont/basic_soundfont/write_sf2/soundfont_trimmer.js";
|
|
8
8
|
import { modulatorSources } from "./soundfont/basic_soundfont/modulator.js";
|
|
9
|
-
import { encodeVorbis } from "./utils/encode_vorbis.js";
|
|
10
9
|
import { MIDI } from './midi_parser/midi_loader.js';
|
|
11
10
|
import { MIDIBuilder } from "./midi_parser/midi_builder.js";
|
|
12
11
|
import { IndexedByteArray } from './utils/indexed_array.js';
|
|
@@ -35,4 +34,4 @@ import { readBytesAsUintBigEndian } from './utils/byte_functions/big_endian.js';
|
|
|
35
34
|
import { NON_CC_INDEX_OFFSET } from "./synthetizer/worklet_system/worklet_utilities/controller_tables.js";
|
|
36
35
|
import { ALL_CHANNELS_OR_DIFFERENT_ACTION } from './synthetizer/worklet_system/message_protocol/worklet_message.js';
|
|
37
36
|
import { WORKLET_URL_ABSOLUTE } from './synthetizer/worklet_url.js';
|
|
38
|
-
export { Sequencer, Synthetizer, DEFAULT_PERCUSSION, VOICE_CAP, BasicSoundFont, loadSoundFont, trimSoundfont, modulatorSources,
|
|
37
|
+
export { Sequencer, Synthetizer, DEFAULT_PERCUSSION, VOICE_CAP, BasicSoundFont, loadSoundFont, trimSoundfont, modulatorSources, MIDI, MIDIBuilder, IndexedByteArray, writeMIDIFile, writeRMIDI, applySnapshotToMIDI, modifyMIDI, MIDIticksToSeconds, audioBufferToWav, SpessaSynthLogging, SpessaSynthGroup, SpessaSynthTable, SpessaSynthGroupEnd, SpessaSynthInfo, SpessaSynthWarn, SpessaSynthGroupCollapsed, midiControllers, messageTypes, MIDIDeviceHandler, WebMidiLinkHandler, arrayToHexString, consoleColors, formatTitle, formatTime, readBytesAsUintBigEndian, NON_CC_INDEX_OFFSET, ALL_CHANNELS_OR_DIFFERENT_ACTION, WORKLET_URL_ABSOLUTE };
|
|
@@ -62,6 +62,18 @@ export class Modulator {
|
|
|
62
62
|
secSrcUsesCC: number;
|
|
63
63
|
secSrcIndex: number;
|
|
64
64
|
secSrcCurveType: number;
|
|
65
|
+
/**
|
|
66
|
+
* Indicates if the given modulator is chorus or reverb effects modulator.
|
|
67
|
+
* This is done to simulate BASSMIDI effects behavior:
|
|
68
|
+
* - defaults to 1000 transform amount rather than 200
|
|
69
|
+
* - values can be changed, but anything above 200 is 1000
|
|
70
|
+
* (except for values above 1000, they are copied directly)
|
|
71
|
+
* - all values below are multiplied by 5 (200 * 5 = 1000)
|
|
72
|
+
* - still can be disabled if the soundfont has its own modulator curve
|
|
73
|
+
* - this fixes the very low amount of reverb by default and doesn't break soundfonts
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
*/
|
|
76
|
+
isEffectModulator: boolean;
|
|
65
77
|
/**
|
|
66
78
|
* Sums transform and creates a NEW modulator
|
|
67
79
|
* @param modulator {Modulator}
|
package/externals/NOTICE
CHANGED
|
@@ -2,8 +2,4 @@ LICENSE is for stbvorbis_sync.js which is licensed under Apache-2.0
|
|
|
2
2
|
|
|
3
3
|
Modifications made to stbvorbis_sync.js
|
|
4
4
|
1. minified the code
|
|
5
|
-
2. added types declaration
|
|
6
|
-
|
|
7
|
-
OggVorbisEncoder (https://github.com/higuma/ogg-vorbis-encoder-js)
|
|
8
|
-
is licensed under MIT.
|
|
9
|
-
The file provided is a slight modification to work with es6.
|
|
5
|
+
2. added types declaration
|
package/index.js
CHANGED
|
@@ -29,8 +29,7 @@ import { modulatorSources } from "./soundfont/basic_soundfont/modulator.js";
|
|
|
29
29
|
import { NON_CC_INDEX_OFFSET } from "./synthetizer/worklet_system/worklet_utilities/controller_tables.js";
|
|
30
30
|
import { ALL_CHANNELS_OR_DIFFERENT_ACTION } from './synthetizer/worklet_system/message_protocol/worklet_message.js';
|
|
31
31
|
import { trimSoundfont} from "./soundfont/basic_soundfont/write_sf2/soundfont_trimmer.js";
|
|
32
|
-
import { WORKLET_URL_ABSOLUTE } from './synthetizer/worklet_url.js'
|
|
33
|
-
import { encodeVorbis} from "./utils/encode_vorbis.js";
|
|
32
|
+
import { WORKLET_URL_ABSOLUTE } from './synthetizer/worklet_url.js';
|
|
34
33
|
|
|
35
34
|
// Export modules
|
|
36
35
|
export {
|
|
@@ -45,7 +44,6 @@ export {
|
|
|
45
44
|
loadSoundFont,
|
|
46
45
|
trimSoundfont,
|
|
47
46
|
modulatorSources,
|
|
48
|
-
encodeVorbis,
|
|
49
47
|
|
|
50
48
|
// MIDI
|
|
51
49
|
MIDI,
|
package/package.json
CHANGED
package/sequencer/sequencer.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -67,7 +67,27 @@ export class Modulator
|
|
|
67
67
|
this.secSrcIndex = this.secondarySourceEnum & 127;
|
|
68
68
|
this.secSrcCurveType = this.secondarySourceEnum >> 10 & 3;
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Indicates if the given modulator is chorus or reverb effects modulator.
|
|
72
|
+
* This is done to simulate BASSMIDI effects behavior:
|
|
73
|
+
* - defaults to 1000 transform amount rather than 200
|
|
74
|
+
* - values can be changed, but anything above 200 is 1000
|
|
75
|
+
* (except for values above 1000, they are copied directly)
|
|
76
|
+
* - all values below are multiplied by 5 (200 * 5 = 1000)
|
|
77
|
+
* - still can be disabled if the soundfont has its own modulator curve
|
|
78
|
+
* - this fixes the very low amount of reverb by default and doesn't break soundfonts
|
|
79
|
+
* @type {boolean}
|
|
80
|
+
*/
|
|
81
|
+
this.isEffectModulator =
|
|
82
|
+
(
|
|
83
|
+
this.sourceEnum === 0x00DB
|
|
84
|
+
|| this.sourceEnum === 0x00DD
|
|
85
|
+
)
|
|
86
|
+
&& this.secondarySourceEnum === 0x0
|
|
87
|
+
&& (
|
|
88
|
+
this.modulatorDestination === generatorTypes.reverbEffectsSend
|
|
89
|
+
|| this.modulatorDestination === generatorTypes.chorusEffectsSend
|
|
90
|
+
);
|
|
71
91
|
}
|
|
72
92
|
|
|
73
93
|
/**
|
|
@@ -225,10 +245,10 @@ export const defaultModulators = [
|
|
|
225
245
|
}),
|
|
226
246
|
|
|
227
247
|
// reverb effects to send
|
|
228
|
-
new Modulator({ srcEnum: 0x00DB, dest: generatorTypes.reverbEffectsSend, amt:
|
|
248
|
+
new Modulator({ srcEnum: 0x00DB, dest: generatorTypes.reverbEffectsSend, amt: 200, secSrcEnum: 0x0, transform: 0 }),
|
|
229
249
|
|
|
230
250
|
// chorus effects to send
|
|
231
|
-
new Modulator({ srcEnum: 0x00DD, dest: generatorTypes.chorusEffectsSend, amt:
|
|
251
|
+
new Modulator({ srcEnum: 0x00DD, dest: generatorTypes.chorusEffectsSend, amt: 200, secSrcEnum: 0x0, transform: 0 }),
|
|
232
252
|
|
|
233
253
|
// custom modulators heck yeah
|
|
234
254
|
// poly pressure to vibrato
|
|
Binary file
|