How to use the meyda.fftSize function in meyda

To help you get started, we’ve selected a few meyda examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github miselaytes-anton / web-audio-experiments / packages / visualizer-app / src / index.js View on Github external
analyser.getAudioFeatures = () => {
    analyser.getByteFrequencyData(freqDataArray);
    analyser.getFloatTimeDomainData(timeDataFloatArray);
    const frequencyData = Array.from(freqDataArray);
    Meyda.fftSize = fftSize;
    Meyda.bufferSize = fftSize;
    const {mfcc, spectralCentroid, rms, loudness} = Meyda.extract([
        'mfcc',
        'spectralCentroid',
        'rms',
        'loudness',
      ],
      timeDataFloatArray
    );
    return {frequencyData, rms, mfcc, spectralCentroid, loudness: loudness.total};
  };
  return analyser;

meyda

Real-time feature extraction for the web audio api

MIT
Latest version published 7 months ago

Package Health Score

67 / 100
Full package analysis