Put a ring on it: a lock-free MPMC ring buffer
#HackerNews #lockfree #MPMC #ringbuffer #concurrency #data #structures #performance
I've created & uploaded video previews of a few more #LinearMemory variations & recommend the download versions for best quality (HD720p @ 60fps)... The actual piece is a realtime (browser based), endless and non-repeating animation. The only things left now are further optimizations and making it dynamically adaptive to different screen/print sizes...
https://drive.google.com/drive/folders/1y1WWZmQjIsbD5lmlPg0jpQmrLLCv2yCB?usp=sharing
Enjoy!
#Generative #Art #GenerativeArt #Color #Pixel #Glitch #Texture #RingBuffer #ThingUmbrella #NoAI #Animation
As expected, my new generative art piece #LinearMemory really seems to be video encoding's enemy no.1 and if you want to enjoy a decent preview, you can dowload a 30 seconds, 1280x720 MP4 (file size ~115MB) from here:
https://drive.google.com/file/d/18-8l2PtnypPXGJjBpsui-0i9yCbrHK5p/view?usp=sharing
At least I learned how to create Rec.2020 videos for reproducing the HDR colors of the original footage, but the complex aesthetics of this piece are _really_ just not suitable (nor intended) for video and will serve as a great benchmark for another project I'm involved with...
#Generative #Art #GenerativeArt #Color #Pixel #Glitch #Texture #RingBuffer #ThingUmbrella #NoAI #Animation
More #LinearMemory WIP selections, best enjoyed in a browser/app supporting wide gamut Display-P3 color space[1]...
#ThingUmbrella #GenerativeArt #Pixel #Color #Abstract #Pattern #Texture #Glitch #RingBuffer #MemoryMapping #Animation #TypeScript
[1] https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/
More progress on my #LinearMemory piece and more fun with ring buffers... (incl. fun with https://thi.ng/color, https://thi.ng/pixel & https://thi.ng/fibers as main ingredients...) It's actually all smoothly animated too now, but I still have to figure out video codec settings to make it acceptable for uplodading previews...
In the meantime, here're some new/current variations. I love defining & exploring generative systems relying on super simple setups (often just exploiting a simple data structure or algorithm), yet produce such complexity...
#ThingUmbrella #Generative #Art #Pixel #Color #Abstract #Pattern #Texture #Glitch #RingBuffer #MemoryMapping #Animation #TypeScript
Linear Memory. More WIP, more params & mapping out the terrain...
#LinearMemory #RingBuffer #GenerativeArt #Art #Color #Texture #Pixel #MemoryMapping #Complexity #Emergence #NoAI
Looking for a nice circular/ring buffer for Linux, arbitrarily sized and self-managing, and invisible in terms of required invested effort (because life is too short for reinventing wheels)?
This nifty project employs filesystem and fuse to do just that. Works (as expected) in conjunction with ram disk so it's plenty fast for many purposes.
For me it avoided a lot of mess. It works a treat.
In 2010 I made an #AudioVisual piece using #Haskell, #OpenGL, and #SC3:
https://mathr.co.uk/blog/2010-03-12_bowntz.html
This weekend I ported it from Haskell to #C, using #SDL2 as framework including #audio in the same program (SC3 was overkill for the simple sounds, and maintaining Haskell code to keep working with changes to the ecosystem is too much busy-work).
I changed the colours (suggested by @netzzz), moved the #physics #simulation from the #video thread to the #audio thread for tighter timing (the SC3 version scheduled events with bundles), and added a #RingBuffer to send the visualisation data back to the video thread (for smoother animation with good a/v sync).
I also did various optimisations, using tables instead of trigonometric functions, using (client-side) vertex arrays instead of glBegin().
License changed from #GPL v3 or later to #AGPL v3 only, in anticipation of compiling it to run in the browser using Emscripten.
Code at:
https://code.mathr.co.uk/bowntz
There's still (at least) one bug: after some time the program freezes and uses 100% CPU, I think it happens when the ball count limit is reached. Takes a long time so will be hard to figure out what is going on...
Ring Buffers
{ by @yt_tr1x@twitter.com } from @hashnode@twitter.com
#java #latency #bytes #ringbuffer #ipc https://tr1x.hashnode.dev/ring-buffers
- #ringbuffer allows efficient synchronization between producers and consumers with no locking at all.