Closed guidobouman closed 4 years ago
Thanks and good catch! Totally forgot the typo was elsewhere too... Guess that means you're testing out SyncData w/ midi?? How's the experience been? Great to know what's working well and not so well.
We've been co-coding in hosted (offline) mode with a MIDI controller on my machine for a hackathon. Amazing work with P5LIVE, can't thank you enough! This is the least I could do.
We're making live visuals with simpele pattern-based ellipse animations with a self-written CRT shader. (Which is expensive in the browser, apparently. 😅 )
Getting DataSync to work was a little hard with the bug.
Looks awesome + CRT shader sounds really interesting! Is the shader available anywhere for testing? A pending update to P5LIVE will also include some shader demo examples (after a former student spent their thesis working in that domain). Do you have these experiments documented anywhere for checking out? Feel free to spam with linkage.
The code is available at https://github.com/Q42/av-bonanza
Interesting parts
It uses midi from one machine to control the effects with a KORG nanoKONTROL & midi from another machine to react to the music notes being played from Max for Live.
As extra bonus we've made a session cache to restore dynamic variables between compiles.
PS: The CRT shader looks a bit better now.
Looks wild! And the session cache is great. As you've noticed, frameCount among a handful of other vars are persistant on recompiles – I was going to build a small transporter object/var that would always be grabbed/sent on the recompile for persistance... but then I created softCompile
, which creates seemless recompiles for any code/functions changed within the draw()
– maybe it could still use something along these lines.. then potentially your stored vars could just have a pre-fix like 'p5c.
(or whatever) in front of them? Ah, but I see you were storing them in the URL.. maybe localStorage overwriting is also a good place? will have another look at this after pending update.
Really great to see your passing of shader textures within textures – (very) slowly getting into shaders, so lots to learn from here. Let me know when you have docu footage of the jam w/ visuals to share.
Actually, I switch between keyed localStorage & generic sessionsStorage based on if you're in a co-coding session or not. With a co-coding session, we can use the session key (from the URL) as the storage key. Otherwise we need to use the session storage (which will clean on tab close) as you can switch between different sketches.
Edit: A bit over engineered for a hackathon, I know. 😅
Forgot to make footage during most of the jam session, of course. We did do a live stream on Twitch, though.
Here's a short clip I recorded: https://we.tl/t-TvCUQmoll0
Bug #47 was present in the SyncData sample as well. This PR fixes the typo.