Giter VIP home page Giter VIP logo

spectro's People

Contributors

calebj0seph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spectro's Issues

support static graph

it's excellent that spectro already supports dynamic graph scrolling from right to left. Can it support static graph, demonstrating the entire frequency data of the whole audio?

Turn Spectro into a library

At the moment Spectro just builds to a demo. It should be turned into a library, with the existing demo being moved into a demo or examples folder.

I imagine the API looking something like this:

// Creates a spectrogram attached to the given canvas, provides automatic handling
// of when the canvas is resized
const canvas = document.getElementById('spectrogram-canvas');
const spectrogram = new Spectrogram(canvas);

// Change display parameters of the spectrogram
spectrogram.updateRenderSettings({
    zoom: 1.5,
    minFrequencyHz: 0,
    maxFrequencyHz: 12000,
    scale: 'mel',
    color: /* object representing a color gradient */
});

// Start recording from mic, will prompt for permissions and return a promise once
// recording has started
await spectrogram.recordFromMic();

// Play audio file, can take URL or File object with option to mute output
await spectrogram.playAudioFile(file, mute = true);

// Manual API where audio data is streamed to the spectrogram
const renderAudioBuffer = await spectrogram.streamAudio();
// Call renderAudioBuffer() each time there is an audio buffer to render, returns a
// promise
// Calling renderAudioBuffer() after a call to stop() is an error

// Stop recording from mic or playing audio file
await spectrogram.stop();

// Add event listener to handle state changes
spectrogram.addStateChangeEventListener((state) => {
    // state can be one of 'stopped', 'playing-mic', 'playing-file', or
    // 'playing-custom'
});

adjust the bandwidth of spectrogram

As there is a difference between narraow-bandwidth spectrogram and wide-bandwidth spectrogram, is there any way to support adjust the bandwidth?

It seems now only suppoerts wide-bandwidth spectrogram

Add support for WebGL 2.0

Some devices don't support OES_texture_float but support WebGL 2.0. Support for WebGL 2.0 should be added to support such devices, falling back to WebGL when WebGL 2.0 is not supported.

Settings panel does not appear on mobile Safari

Hi, the settings panel does not seem to appear when loading Spectrogram on mobile Safari. This may be a known issue, but since I saw this commit (a6805b7), I wanted to check if it's not working as intended.

Thank you for the great project,
Ben

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.