Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sourceSampleRate: sampleRate,
});
suite.add(`lfo:rms\t\tframeSize: ${frameSize}\t`, {
fn: function() {
for (let i = 0; i < numFrames; i++) {
const start = i * frameSize;
const end = start + frameSize;
const frame = buffer.subarray(start, end);
const res = rms.inputSignal(frame);
}
},
});
Meyda.bufferSize = frameSize;
Meyda.sampleRate = sampleRate;
// #todo - windowing function should be 'rect' to skip windowing...
// https://github.com/meyda/meyda/blob/master/src/utilities.js#L27
suite.add(`meyda:rms\tframeSize: ${frameSize}\t`, {
fn: function() {
for (let i = 0; i < numFrames; i++) {
const start = i * frameSize;
const end = start + frameSize;
const frame = buffer.subarray(start, end);
const res = Meyda.extract('rms', frame);
}
},
});
suite.on('cycle', function(event) {
log.push(String(event.target));
sourceSampleRate: sampleRate,
});
suite.add(`lfo:fft\t\tframeSize: ${frameSize}\t`, {
fn: function() {
for (let i = 0; i < numFrames; i++) {
const start = i * frameSize;
const end = start + frameSize;
const frame = buffer.subarray(start, end);
const res = fft.inputSignal(frame);
}
},
});
Meyda.bufferSize = frameSize;
Meyda.sampleRate = sampleRate;
suite.add(`meyda:fft\tframeSize: ${frameSize}\t`, {
fn: function() {
for (let i = 0; i < numFrames; i++) {
const start = i * frameSize;
const end = start + frameSize;
const frame = buffer.subarray(start, end);
const res = Meyda.extract('amplitudeSpectrum', frame);
}
},
});
suite.on('cycle', function(event) {
log.push(String(event.target));
});
sourceSampleRate: sampleRate,
});
suite.add(`lfo:mfcc\tframeSize: ${frameSize}\t`, {
fn: function() {
for (let i = 0; i < numFrames; i++) {
const start = i * frameSize;
const end = start + frameSize;
const frame = buffer.subarray(start, end);
const res = mfcc.inputSignal(frame);
}
},
});
Meyda.bufferSize = frameSize;
Meyda.sampleRate = sampleRate;
suite.add(`meyda:mfcc\tframeSize: ${frameSize}\t`, {
fn: function() {
for (let i = 0; i < numFrames; i++) {
const start = i * frameSize;
const end = start + frameSize;
const frame = buffer.subarray(start, end);
const res = Meyda.extract('mfcc', frame);
}
},
});
suite.on('cycle', function(event) {
log.push(String(event.target));
});