Hack up quick preset exporter for web demo

Hack up quick preset exporter for web demo

task id: quick-preset-export

2024-06-09 20:27: Coding up a quick exporter for singer demo #quick-preset-export

Textarea with a button that says export/import. Export fills the textarea with the current vocal tract state. Import loads the stuff from the textarea.

2024-06-09 20:40: Let's see if I can have one function update the pitch and UI releated to it #quick-preset-export

Probably not going to be an ideal design pattern. I can already see why an architecture like react would be helpful.

2024-06-09 20:47: Nevermind, let's just try and dump data? #quick-preset-export

2024-06-09 21:15: Uploaded something with just "export", import still a WIP. #quick-preset-export

Good enough for tonight.

2024-06-10 14:14: scope out preset importing functionality #quick-preset-export

The thing that makes this difficult is that I want the UI elements to update with the internal state. I'd need to build something out to do this.

What's a quick way to get this done?

2024-06-10 14:20: setting up some boilerplate, which is as far as I can see right now #quick-preset-export

2024-06-10 14:32: Looks like I can simulate events. #quick-preset-export

https://stackoverflow.com/questions/35659430/how-do-i-programmatically-trigger-an-input-event-without-jquery

2024-06-10 14:52: Okay, grokking this better. #quick-preset-export

I need to set the slider from JS, then fire off an input event to set the rest of the parameters.

2024-06-10 15:03: Glottal controls work, now regions #quick-preset-export

A little bit more challenging, since those sliders are made an older way. Hopefully I an refactor this so all the sliders are made the same way.

2024-06-10 15:32: Okay it works #quick-preset-export

I suddenly ran into some weird issues with the textarea textContent value, so I changed it to be value instead.

2024-06-10 15:34: so textContent is not a textarea property but a DOM node property? #quick-preset-export

See: <<webdev/textcontent_mdn>>. I am not sure how it was working all this time then suddenly not working.

2024-06-10 15:43: Uploaded to website #quick-preset-export