Turn on your subwoofer!
This is a 512 byte intro I made for inercia 2022, a demoparty that took place in Lisbon over the weekend. It's the first time that I put the no longer secret 0x808 audio channel to use, with around 200 bytes of the (compressed) code spent on generating the music.
I was pleased to find that techniques used for golfing down visual effects' code size transfer quite well to audio. There are a lot of expressions in there that change meaning over time in a way that produces some kind of structured progression -- some planned, some not so planned. The whole thing is really a single effect, with a lot of janky math to roll out different audio and gfx layers at different times. I can't completely explain how it works in places, but feel free to ask about anything if you like!
This version has commented code in tab 0, but it is probably not a good example to get started with audio synthesis. For anyone game to try using 0x808, here is a simpler example that generates a sine wave at middle C (256Hz)
x=0 function _update() -- write one more byte while there -- is still space in the audio buffer while(stat(108) < stat(109)) do v = sin(x)*32 -- max vol:128 x += 256 / 5512 -- middle c poke(0,mid(0,v+128,255)) serial(0x808,0,1) end end
NICE ! Very nice, @zep. Gold star work.
I think we can think of ourselves as wizards. Some are very good with chemicals (math). Others are good at casting spells and summoning (coding). And still others rely on enchanted objects and verbal commands (game design).
All of us. You, me, and the entire Piconian community. All of us are magicians, wizards, sorcerers, and sorceresses, busy away - toiling at our work, hoping to awe and woo our visitors with our feats of magic ...
May it never end. :)
[Please log in to post a comment]