doxas / twigl

twigl.app is an online editor for One tweet shader, with gif generator and sound shader, and broadcast live coding.
https://twigl.app/
MIT License
803 stars 50 forks source link

Live coding suggestions #21

Open totalgee opened 2 years ago

totalgee commented 2 years ago

Thanks again for this project! Last night I used Twigl to to perform visuals, live coding from-scratch to accompany music in eight different mini-sessions (nine minutes each)... I usually use my own live coding environment, but it was a pleasure to work within the minimalism of Twigl. The only thing I really missed was some audio reactivity.

I think it's good if Twigl stays quite minimal (though of course, this is up to you). But I can think of a few things that might be interesting, to use it in a live coding (visuals) context:

I'm not saying these should be implemented, but I thought I'd mention these as things that would make it more useful for live coding visuals (for performance). But as I say, a big part of Twigl's attraction to me is its minimalism, so maybe adding too much would ruin that, and make things unnecessarily complicated. Sometimes simpler tools are better. And having constraints is good for creativity... (-;

doxas commented 2 years ago

@totalgee

Thanks for the great suggestions! How much to support is a difficult question.

At the very least, twigl currently has a simple function to select any mp3 from the local environment to play, and accept its volume as a uniform variable.

image image

It's not listed in readme.md because it's only optional, but you can take it as sound in classic mode, or s in GEEKEST mode, etc. This is a single floating point value.

The feature you're looking for seems like a more flexible and powerful feature, but may be a bit excessive for twigl. Nevertheless, I would like to give it some consideration.

totalgee commented 2 years ago

I noticed the sound file playback feature, nice! If it's "simple" it would be nice to have a variation that instead took the sound from the mic input (after giving permission to the browser to access it), and expose that volume as the sound (or s) uniform. This is similar to what things like Hydra (https://hydra.ojack.xyz/) do.

digitalsignalperson commented 2 years ago

Cool to see the sound feature. Similarily would be really cool to be able to either provide an mp4 stream URL or upload a local video file to access the frames as textures

Oh, also ability to provide a URL to an mp3 stream to make it fully sharable.