1
AGI Development Tools / Re: Sierra had keys to control sound volume in Tandy
« on: April 05, 2021, 10:51:02 PM »
Cool, thx. I'll include this in the next update of the help file.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
' IIgs MIDI sounds:
' this function extracts the raw MIDI data from the IIgs sound
' and creates a new MIDI stream that is compatible with modern
' MIDI player format
' length value gets calculated by counting total number of ticks
' assumption is 60 ticks per second; nothing to indicate that is
' not correct; all sounds 'sound' right, so we go with it
' the raw midi data embedded in the sound seems to play OK
' when using 'high-end' players (WinAmp as an example) but not
' Windows Media Player, or the midi API functions; even in
' WinAmp, the total sound length (ticks and seconds) doesn't
' calculate correctly, even though it plays;
' this seems to be due to the presence of 0FCh commands
' it looks like every sound resource has them; sometimes
' one 0FCh ends the file; other times there are a series of
' them that are followed by a set of 0Dyh and 0Byh commands
' that appear to reset all 16 channels
' eliminating the 0FCh command and everything that follows
' plays the sound correctly (I think)
' a common 'null' file is one with just four 0FCh codes, and
' nothing else, so ANY file starting with 0FCh is considered empty
' time values are supposed to be a 'delta' value
' but it appears that AGI used an absolute value; so if time
' is greater than 07Fh, it will cause a hiccup in modern midi
' players (we need to convert them to a valid delta time value)
' treat 0FCh as an end mark, even if found in time position
' 0F8h also appears to cause an end
' IIgs PCM (wav file) sounds:
' this function extracts the raw PCM data from a IIgs sound and
' adds a properly formatted WAV file header to it
' AGI header is 54 bytes for pcm, but its purpose is still mostly
' unknown; the total size is a word value at positon 08h; the rest of
' the header appears identical across resources, with exception of
' position 02h- it seems to vary from low thirties to upper 60s,
' maybe it's a volume thing?
' at position 06h is a word value of 02Ch = 44; this might be size
' of an internal header; there are 44 bytes of data, followed
' by 00-00 before the raw pcm data starts? (probably not - because at
' position 02Ah, there are six word values; 0C07Fh, 0236h, 0000h,
' 0C07Fh, 0236h, 0000h; this has the feel of two channel info,
' where both channels use the same data; 0C07Fh=49279; 0236h=566;
' 0C0h=192; 07F=127; 036h=54 not sure if any of these values
' are significant)
' at position 022h, there is a word value of 0203h = 8195; this
' might be the actual sample rate? it's close to 8000 (which was my
' original assumption) and it's really hard to tell the difference when either
' value is used for the exported sound
' all resources appear to end with a byte value of 0; not sure
' if it's necessary for wav files, but we keep it anyway
"C:\Program Files (x86)\WinAGI GDS\WinAGI.exe" /d C:\Zvika\Games\AGI\PQ1.wag
SMF 2.0.14 |
SMF © 2017, Simple Machines
Simple Audio Video Embedder
Page created in 0.09 seconds with 21 queries.