Rebuild web release, bump version (1.3.0)
This commit is contained in:
parent
b84e9cf5e9
commit
94a41f9436
@ -32,7 +32,7 @@ namespace _impl {
|
||||
|
||||
template<typename Sample=float, class RandomEngine=void>
|
||||
struct SignalsmithStretch {
|
||||
static constexpr size_t version[3] = {1, 2, 0};
|
||||
static constexpr size_t version[3] = {1, 3, 0};
|
||||
|
||||
SignalsmithStretch() : randomEngine(std::random_device{}()) {}
|
||||
SignalsmithStretch(long seed) : randomEngine(seed) {}
|
||||
|
||||
@ -109,6 +109,12 @@
|
||||
<label>tonality limit</label>
|
||||
<input type="range" min="2000" max="20000" step="100" data-key="tonalityHz" class="diagram-red">
|
||||
<input type="number" min="2000" max="20000" step="1" data-key="tonalityHz" class="diagram-red">
|
||||
<label>formant</label>
|
||||
<div>
|
||||
<input type="checkbox" data-key="formantCompensation" class="diagram-yellow">
|
||||
<input type="range" min="50" max="500" step="1" data-key="formantBaseHz" class="diagram-brown">
|
||||
</div>
|
||||
<input type="number" min="50" max="500" step="1" data-key="formantBaseHz" class="diagram-brown">
|
||||
<label>block (ms)</label>
|
||||
<input type="range" min="50" max="180" step="1" data-key="blockMs" class="diagram-green">
|
||||
<input type="number" min="50" max="180" step="1" data-key="blockMs" class="diagram-green">
|
||||
@ -131,6 +137,9 @@
|
||||
active: false,
|
||||
rate: 1,
|
||||
semitones: 0,
|
||||
formantSemitones: 0,
|
||||
formantCompensation: false,
|
||||
formantBaseHz: 200,
|
||||
loopStart: 0,
|
||||
loopEnd: 0 // disabled (<= start), but this gets set when we load an audio file
|
||||
};
|
||||
|
||||
@ -2,6 +2,11 @@
|
||||
|
||||
export SCRIPT_DIR=`dirname "$0"`
|
||||
|
||||
if [ ! -z "$EMSDK" ]
|
||||
then
|
||||
export EMSDK_DIR="$EMSDK"
|
||||
fi
|
||||
|
||||
if [ -z "$EMSDK_DIR" ]
|
||||
then
|
||||
export EMSDK_DIR="${SCRIPT_DIR}/emsdk"
|
||||
|
||||
@ -55,6 +55,15 @@ extern "C" {
|
||||
void EMSCRIPTEN_KEEPALIVE setTransposeSemitones(Sample semitones, Sample tonalityLimit) {
|
||||
stretch.setTransposeSemitones(semitones, tonalityLimit);
|
||||
}
|
||||
void EMSCRIPTEN_KEEPALIVE setFormantFactor(Sample multiplier, bool compensate) {
|
||||
stretch.setFormantFactor(multiplier, compensate);
|
||||
}
|
||||
void EMSCRIPTEN_KEEPALIVE setFormantSemitones(Sample semitones, bool compensate) {
|
||||
stretch.setFormantSemitones(semitones, compensate);
|
||||
}
|
||||
void EMSCRIPTEN_KEEPALIVE setFormantBase(Sample freq) {
|
||||
stretch.setFormantBase(freq);
|
||||
}
|
||||
// We can't do setFreqMap()
|
||||
void EMSCRIPTEN_KEEPALIVE seek(int inputSamples, double playbackRate) {
|
||||
stretch.seek(buffersIn, inputSamples, playbackRate);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "signalsmith-stretch",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"description": "JS/WASM release of the Signalsmith Stretch library",
|
||||
"main": "SignalsmithStretch.mjs",
|
||||
"exports": {
|
||||
|
||||
@ -21,6 +21,9 @@ function registerWorkletProcessor(Module, audioNodeKey) {
|
||||
output: 0,
|
||||
rate: 1,
|
||||
semitones: 0,
|
||||
formantSemitones: 0,
|
||||
formantCompensation: false,
|
||||
formantBaseHz: 0, /* 0 = attempt to detect */
|
||||
loopStart: 0,
|
||||
loopEnd: 0
|
||||
}];
|
||||
@ -230,7 +233,9 @@ function registerWorkletProcessor(Module, audioNodeKey) {
|
||||
let currentMapSegment = this.timeMap[0];
|
||||
|
||||
let wasmModule = this.wasmModule;
|
||||
wasmModule._setTransposeSemitones(currentMapSegment.semitones, this.config.tonalityHz/sampleRate)
|
||||
wasmModule._setTransposeSemitones(currentMapSegment.semitones, this.config.tonalityHz/sampleRate);
|
||||
wasmModule._setFormantSemitones(currentMapSegment.formantSemitones, currentMapSegment.formantCompensation);
|
||||
wasmModule._setFormantBase(currentMapSegment.formantBaseHz/sampleRate);
|
||||
|
||||
// Check the input/output channel counts
|
||||
if (outputList[0].length != this.channels) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user