This cart is a few things:
It’s a branching music demo featuring music from Robby Duguay’s excellent “Nine Songs in PICO-8” cart.
It’s a proof of concept for my PICO-8 dynamic music engine, which I have dubbed “Zero-Track”.
And finally, this cart is an invitation:
If you write music and would like to try out writing something non-linear for the PICO-8, feel free to drop me a line; it would be awesome to work with music written explicitly for this sort of use.
If you are working on a game and would like to include music dynamically tied to what's happening in the game, I'd love to see if my music engine could be a good fit for your game, as well.
Zero-Track
For those interested in using the Zero-Track engine, I'm happy to chat about it, but here's some light documentation as well:
First, you should include a call to ZERO:UPDATE() from your _UPDATE() or _UPDATE60() function.
Then, ZERO:PLAY() functions like MUSIC(), except that instead of a pattern number, it takes a special track object.
The track object needs to implement two functions:
- TRACK:PATTERN() : for now, your track object should return a four byte number where each byte is the ID of one SFX (basically the format used for storing patterns in memory, minus the special flag bits which will be ignored if included in the return value). Nothing is stopping you at this point from building and poking the SFX you desire into memory, but helper functions for that aren’t included yet.
- TRACK:NEXT() : return the track object that will provide the next pattern after the one provided by this track. Your track can return an independent object, or for flexibility can at this point just return itself and update its internal state so that the next call to PATTERN() will return a different value. This function is called “just in time” as the music engine needs the next pattern, so the returned track can be based on realtime game stats.
For now that's it! I'll add more functionality as it looks like I need it.
Thanks and enjoy!
–Mark
[Please log in to post a comment]