TimToplak / 3DprintedSound

Website that create *.stl file out of sound - 3D printing
https://3dprintedsound.netlify.app/
MIT License
8 stars 4 forks source link

support for changing frequency spectrum scale #2

Open nwolek opened 4 years ago

nwolek commented 4 years ago

@TimToplak - In the spectrogram view, this project seems to use a fixed scale for the frequency spectrum. Sometimes the most interesting bits of sound are limited to 0-6k Hertz, so it would be useful to "zoom in".

We tried feeding it files with sampling rates at 8k and 16k hoping that it would scale to a lower Nyquist, but that does not seem to work. It created a model that was completely flat in the upper end of the spectrum. That tells me that the range is static somewhere in the code. When I dug into the code:

I know audio, but very little about WebAudio API. Would it be possible to get the sampling rate from the upload file? This should be a simple way to force the model to have a more limited frequency spectrum. Users could simply down-sample th file before uploading to your project.

A more complex solution would be some additional controls to zoom into the lower end of the frequency spectrum.

Thanks for your consideration and THANKS for sharing this project! @nwolek

TimToplak commented 4 years ago

I looked intro WebAudio API and I think I can get sample rate of uploaded file or I will just add input text box so user can define custom sample rate. I will try to add this as soon as I can, but I am really busy at the moment.

nwolek commented 4 years ago

Just curious if there is any update on your expected timeline. We will continue to work around it.

TimToplak commented 4 years ago

sorry for late replay. I am juggling with uni and work. I should have some free time in about 2 weeks. I will have a look.