strss
A 512-byte intro for Lovebyte 2024. Given that it has no effects, it might have been a good fit for the 512 byte executable music competition, but I had already squeezed out so many bytes to set up the display… :)
Edit: No, wait… the tiny executable music compo was 256 bytes max – that would have been hard.
Update: It got a place on the podium, winning 2nd place in the compo!
I wanted to do something with sizecode-compatible sample generation again, and include some algorithmic musical elements. This was inspired by last year’s exquisite Amiga entry Throwing Shapes by gigabates, worthy winner of the oldschool 512 byte compo.
So much space
Also, this was a welcome opportunity to enjoy the huge amount of extra space you get with a “half-bootblock” of 512 bytes instead of a proper Amiga executable file (like hypotrain or Arrr512) – 502* usable bytes instead of 476! Especially interesting when used in conjunction with the Salvador/ZX0 packer, which seems to be the sweet spot for payloads under 1 KB.
* That is, when using the root block trick:
; ============================================================ ; Normal boot block header (at the very start of the disk) ; ============================================================ dc.b 'DOS',0 ; 4 bytes: DOS header dc.l 0 ; 4 bytes: checksum dc.l 880 ; 4 bytes: root block start: ; ; Start of your code -- 12 bytes gone ; ; ============================================================ ; But if we abuse the root block field instead... ; ============================================================ dc.b 'DOS',0 dc.l 0 root: dc.l $dff000 ; or some other constant start: move.l root(pc),a6 ; ; Now you have 4 bytes of data in a register of your ; choice using only 4 bytes! ; ; move.l root(pc),a6 == 2c 7a ff fa ; ; Normally, this would take up 6 bytes: ; ; move.l #$dff000,a6 == 2c 7c 00 df f0 00 ; ; This works because the disk header is present in ; memory when your code is started, just as it is ; stored on disk. ;
In total, I was able to use 736 “payload” bytes for the intro. In particular:
What | Size |
---|---|
Boot header and decruncher | 108 bytes |
Code and data, uncompressed | 736 bytes |
Code and data, after ZX0 compression | 403 bytes |
Total size | 511 bytes |
Samples
Nothing wild going on here: A snare drum, a hi-hat, two square waves. Using a sine wave as the base for the snare drum seems like overkill, but it sounds great. Originally I also had a bass drum, but I ditched that in favor of having two square wave voices.
But the samples are not really static: During playback, the widths of the square waves are constantly modified at different speeds, resulting in a nifty effect that sounds like a filter being opened and closed. Observe:
What stress?
I started about a week before the deadline to code some bits here and there to see how far I would come. I always wanted try the “update waveforms during playback” idea, and it turned out nice. Technically, the intro also does some kind of algorithmic music generation, even if it’s only turning single notes off and on at random.
I chose to name it “strss” during night-time development when I experimented with different notes and percussion arrangements to make it sound more interesting. At that point, it looked and sounded like this:
Ugh. I like the final version better now. And I think it’s funny to still it call it “strss”, with its calm, meditative soundscape and all.
I’m not even mad about having no proper visual effect. There should™ have been some wiggle room for something nicer, given enough time and inspiration, but with this production, that was what I was trying to avoid: strss
Links
Demo Scene
- hrrngh!
- B.S.I. – Byte Scene Investigation
- Shall we play a game?
- Worms VBI
- strss
- rotz
- wchrmas pattern
- Bitte hier das mit den…
- Halle-MOO-jah
- More…
Blog
- VC³ 2024, an early present
- Fun with Worms DC custom levels
- Modding the Windows boot hand
- Unit Arrr
- I just favican’t
- I consider myself more of a Renaissance man
- Zerosphere on Analogue Pocket
- Amiga Topaz 1.4, part 2
- Masto-DDoS
- Elementary, dear Teletext
- More…