So, I’ve been trying to use blorbtool.py to package multiple .AIFF files for use in a z5 game - specifically, using ZIL. I don’t know if that’s important.
I created the .blb out of 2 .AIFF files, the first time just by simply IMPORTing the files in and then I SAVEd it as a file with the same name as the .z5 file which I was playing the sounds using. I made a routine where I could decide which audio piece I could use by entering a number. Only 1 and 2 worked, which isn’t surprising. But none of the others worked. I tried renaming the Lurking Horror blorb file to the game name, and playing the sound numbers - they all worked accordingly. I think. The first few sounded glitched, though apparently they’re meant to be like that?
Later, I tried recreating the blorb file but using import Exec 1 (filename). Tried playing. It didn’t work.
Does anyone know how to make it work, and why the Lurking Horror blorb is working but the others aren’t?
I know nothing about what audio file formats, bit depths or sample rates you can use with ZIL, or even if it’s really ZIL that is handling the audio side of the equation. But the copy of the Lurking Horror’s audio I have is of 8-bit AIFs, probably sampled at 11khz on average, which nobody would generate these days and the average DAW cannot even open.
I point this out in case ZIL can’t handle a more typical AIF (e.g. 16bit/44hkz), given that such AIFs were never shipped with games in the time of z5 for space, datarate and other tech reasons.
I’m not sure but I don’t really think it’s to do with ZIL and more the Z-machine, since my game follows the same standards as Inform games released as a .Z5 file.
I notice it says AIFC. That is a compressed (in terms of size, not audio quality) version of an AIF, proprietary to Apple. So that’s not actually a straight AIFF file.
Now I’m not sure if the tool is returning the wrong file type, or if you are actually using AIFC files, but I doubt AIFC would be something you could use.
EDIT - In which case, you would want to convert to or use straight AIFF and try that.
Oh, huh. When I tried entering something else, it gave me:
>import aifs NewLockNew_Alert.aiff
This IFF file has form type 'b'AIFC'', not 'b'aifs''.
So I just followed that. But it wouldn’t make sense that it’s an AIFC, now that you mention it. (Although when I try to play the AIFF file on my Windows laptop, I am given this:
Laugh, we’re getting down a rabbit hole here. When it says ‘This IFF file…’, we finally hit a file type I don’t know. I looked it up and wikipedia says " Interchange File Format (IFF ) is a generic digital container file format originally introduced by Electronic Arts (in cooperation with Commodore) in 1985 to facilitate transfer of data between software produced by different companies.
So that’s pretty vintage. I know a lot about audio files, but hadn’t heard of IFF, and I don’t know much about blorbtool’s abilities/limitations, or z5’s ability to play back various audio files. At the byte level, it’s easy for old tools and engines to read the wrong file format on newer formats they’re not aware of.
Are any of the audio files you’re trying to use very small? If you could PM me one as an attachment, or go to wadeclarkeDOTcom, use the email me form and attach one, I could look at it and at least identify the qualities of the file you’re trying to use, if you like. That would remove one set of variables from the equation.
Oh, huh. I just used a converter to change from AIFF to AIFF and now they can all be played normally on the media player. I suspect you were right about AIFC not being right. Just a sec - let me try uploading these to a blorb and if it doesn’t work, then I’ll send you one…
IFF is what blorb files themselves are! It’s an old standard for how to put a bunch of chunks of binary data into a single file, and used to be everywhere, though it’s less common now.
IFFs themselves have a four-byte tag at the beginning called the “form type”. Blorbs themselves use the tag IFRS (“Interactive Fiction ReSource”). But AIFFs are also IFFs, and use the tag AIFF for uncompressed audio (“Audio IFF”) and AIFC for compressed audio (“Audio IFF, Compressed”); the blorb standard allows AIFF, but not AIFC.