Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

same width for all mp3 json output #429

Open
nemesisKO opened this issue Dec 4, 2021 · 1 comment
Open

same width for all mp3 json output #429

nemesisKO opened this issue Dec 4, 2021 · 1 comment

Comments

@nemesisKO
Copy link

hi
how can i generate wave in exact width or array length in json for all mp3s. for example i want same array length for 2 minute mp3 as 5 minute mp3

@chrisn
Copy link
Member

chrisn commented Dec 4, 2021

You can use the waveform-data.js resample() function with the width option to give you JSON with a given array length. The algorithm it currently uses means it won't be exactly the right length, but I have a fix for that coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants