spessasynth_lib 3.20.20 → 3.20.22
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/utils/buffer_to_wav.d.ts +5 -1
- package/README.md +9 -1
- package/package.json +1 -1
- package/synthetizer/worklet_processor.min.js +9 -9
- package/synthetizer/worklet_system/message_protocol/handle_message.js +1 -0
- package/synthetizer/worklet_system/worklet_methods/note_on.js +1 -0
- package/synthetizer/worklet_system/worklet_utilities/volume_envelope.js +63 -41
- package/utils/buffer_to_wav.js +43 -12
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
* @param normalizeAudio {boolean} find the max sample point and set it to 1, and scale others with it
|
|
5
5
|
* @param channelOffset {number} channel offset and channel offset + 1 get saved
|
|
6
6
|
* @param metadata {WaveMetadata}
|
|
7
|
+
* @param loop {{start: number, end: number}} loop start and end points in seconds. Undefined if no loop
|
|
7
8
|
* @returns {Blob}
|
|
8
9
|
*/
|
|
9
|
-
export function audioBufferToWav(audioBuffer: AudioBuffer, normalizeAudio?: boolean, channelOffset?: number, metadata?: WaveMetadata
|
|
10
|
+
export function audioBufferToWav(audioBuffer: AudioBuffer, normalizeAudio?: boolean, channelOffset?: number, metadata?: WaveMetadata, loop?: {
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
}): Blob;
|
|
10
14
|
export type WaveMetadata = {
|
|
11
15
|
/**
|
|
12
16
|
* - the song's title
|
package/README.md
CHANGED
|
@@ -109,5 +109,13 @@ document.getElementById("button").onclick = async () => {
|
|
|
109
109
|
- **Correct volume:** *looking at you, Viena and gm.sf2!*
|
|
110
110
|
- Support built right into the synthesizer!
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
### Export MIDI as WAV
|
|
113
|
+
- Save the MIDI file as WAV audio!
|
|
114
|
+
- **Metadata support:** *Embed metadata such as title, artist, album and more!*
|
|
115
|
+
- **Cue points:** *Write MIDI loop points as cue points!*
|
|
116
|
+
- **Loop multiple times:** *Render two (or more) loops into the file for seamless transitions!*
|
|
117
|
+
- *That's right, saving as WAV is also [just one function!](https://github.com/spessasus/SpessaSynth/wiki/Writing-Wave-Files#audiobuffertowav)*
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# License
|
|
113
121
|
MIT License, except for the stbvorbis_sync.js in the `externals` folder which is licensed under the Apache-2.0 license.
|