kopia lustrzana https://github.com/backface/turtlestitch
tweaked pitch detection to smoothen low audio signals
rodzic
c566b91f84
commit
a6439559e5
|
@ -51,6 +51,7 @@
|
||||||
* Objects, Blocks, Threads: added microphone note and pitch detection
|
* Objects, Blocks, Threads: added microphone note and pitch detection
|
||||||
* Tweaked note detection to only change when the audio signal is strong enough
|
* Tweaked note detection to only change when the audio signal is strong enough
|
||||||
* updated German translation for pitch-detection
|
* updated German translation for pitch-detection
|
||||||
|
* tweaked pitch detection to smoothen low audio signals
|
||||||
|
|
||||||
### 2019-03-07
|
### 2019-03-07
|
||||||
* AudioComp lib: added block to set the microphone's buffer and fft sizes
|
* AudioComp lib: added block to set the microphone's buffer and fft sizes
|
||||||
|
|
|
@ -9065,7 +9065,7 @@ Microphone.prototype.detectPitch = function (buf, sampleRate) {
|
||||||
}
|
}
|
||||||
rms = Math.sqrt(rms/SIZE);
|
rms = Math.sqrt(rms/SIZE);
|
||||||
if (rms < 0.01)
|
if (rms < 0.01)
|
||||||
return -1;
|
return this.pitch; // -1;
|
||||||
|
|
||||||
lastCorrelation = 1;
|
lastCorrelation = 1;
|
||||||
for (offset = this.MIN_SAMPLES; offset < MAX_SAMPLES; offset += 1) {
|
for (offset = this.MIN_SAMPLES; offset < MAX_SAMPLES; offset += 1) {
|
||||||
|
@ -9095,7 +9095,7 @@ Microphone.prototype.detectPitch = function (buf, sampleRate) {
|
||||||
if (best_correlation > 0.01) {
|
if (best_correlation > 0.01) {
|
||||||
return sampleRate / best_offset;
|
return sampleRate / best_offset;
|
||||||
}
|
}
|
||||||
return -1;
|
return this.pitch; // -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
// CellMorph //////////////////////////////////////////////////////////
|
// CellMorph //////////////////////////////////////////////////////////
|
||||||
|
|
Ładowanie…
Reference in New Issue