calebj0seph / spectro Goto Github PK
View Code? Open in Web Editor NEW๐ถ Real-time audio spectrogram generator for the web
Home Page: https://calebj0seph.github.io/spectro
License: MIT License
๐ถ Real-time audio spectrogram generator for the web
Home Page: https://calebj0seph.github.io/spectro
License: MIT License
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?
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'
});
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
Hi,
Sorry for opening an issue, but there is no contact info on your profile. I found your awesome project on HN https://news.ycombinator.com/item?id=22505269 and I want to integrate it with https://github.com/alexadam/img-encode. I have a couple of questions, my email is on my profile. Thanks!
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.