xenharmonic-devs / scale-workshop

Design and visualize microtonal scales and play them in your web browser. Export your scales for use with VST instruments. Convert Scala files to various tuning formats.
MIT License
81 stars 12 forks source link

Custom Waveforms #436

Open frostburn opened 1 year ago

frostburn commented 1 year ago

luphoria — Today at 9:20 AM

is it ever planned to allow users to import waveforms? keyboard alone is fun to work with

frostburn commented 1 year ago

Not sure about importing files, but custom waveforms could be drawn and converted to the format used by Web Audio API with an inverse Fourier transform.

frostburn commented 1 year ago

One issue with custom stuff is URL encoding. Small hand-drawn waveforms might still fit, but importing samples is pushing it. I suggest not including custom waveforms in the URL and alerting the user that the waveform will not be saved. Due to the way the app works we probably still need treat the custom waveform as as part of the built-in family so it's not forgotten when switching tabs.

frostburn commented 10 months ago

With the formal grammar coming up in SW3 it would certainly be possible to create a parser for math expressions that evaluate to waveforms and spectra. Inharmonic spectra would require a new synth though.

Hand-drawing in linear and log domains could also be possible. A simple waveform fits into a database while proper samples might take up too much space.

frostburn commented 1 month ago

Time estimate: 8 hours