You know, this actually brings to mind a thing they used on the old Commodore Amiga platform for in-game music. It was called a MOD, as in music MODule. Since most games of the time ran directly from floppy disk, there wasn’t room for things like MP3 files (which I’m not sure even existed yet when these came along). A MOD was a file containing some sounds (usually musical-instrument sounds like flutes and drum sounds) and then a sequence of motes to play, telling it what pitch to play this or that sound, and so on. And then the song would be divvied up into little equal chunks, numbered progressively. A lot of people “ripped” these mods (that is, plucked them OUT of the executable to make them separate files) and then placed them into a player called a Tracker (because a mod was a series of tracks), and typically, as it played, you’d watch it go from 1 to 2 to 3 out of, say, 5 chunks making up the song. You could also go directly to a particular chunk in the song to play it from there instead of starting it from the beginning. Usually, MOD files were meant to play as a sort of endless loop, so when they hit, say, chunk 5 it would take it back to chunk 1 again. Or sometimes it would take it back to chunk 2 instead, so you only heard chunk 1 when the particular song first started playing. Remember, this was originally meant to be game music, so it was meant to play for as long as the gamer remained in a particular level, which could be hours or could be seconds. But it also let the game-writers instantly hop from one mod to another, or even from one PART of the mod to another, instantly on the fly, based on what was going on in the game.
What’s particularly interesting about these music modules is… one mod file could actually have more than one separate song in it. Remember, they’ve broken them down into numbered chunks, each one of which tells the computer which other chunk of it to go to next after that chunk plays, but you could have a mod that’s 15 chunks, where 7 of them are the song that plays if you simply load it into a music tracker and hit play, and where the rest of it consists two other songs that are 4 chunks each and play as a loop unto themselves, but that you’d never know about, or hear. unless you manually selected one of those other chunks with the tracker.
I suppose we could do something like that with our scripted objects, produce something like a music-tracker file, but with bigger and better quality sounds (because we’re long since not limited to floppy-disk sized storage) and more sophistication to it, and stick that inside the object along with the scripts.