pcm encoder
Moderators: scallenger, Rebel, madppiper, TresCom Support Team
- Rebel
- -=TresCom Developer=-
- Posts: 6124
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
pcm encoder
Mainly, this is a test utility and it can only encode mono (single channel), 16bit 22050 pcm waves. As said, it's a test to create a trespasser compatible ima/dvi adpcm wav, import it and have it play all the way through in-game. I tested a few of the longer voice overs and 1 music clip that I converted to single channel (22050 sample rate) using cool-edit. They all played satisfactory but the encoding isn't 100% accurate as of yet.
For more info, see the read_me file. Also, beyond trying to figure out how to utilize this class and writing out the wav file, I take no credit for this. That belongs to a J.D. Medhurst (aka tixy) who wrote and made the class available. You can visit his website here.
See temp_page (on sig) for download
For more info, see the read_me file. Also, beyond trying to figure out how to utilize this class and writing out the wav file, I take no credit for this. That belongs to a J.D. Medhurst (aka tixy) who wrote and made the class available. You can visit his website here.
See temp_page (on sig) for download
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
- RexHunter99
- Albertosaurus
- Posts: 2197
- Joined: Mon Apr 24, 2006 12:12 pm
- Location: Australia
- Contact:
Re: pcm encoder
When this is perfected we could use it as a default import option for Audio unless we need quality over storage
~ They told me humans weren't real... I proved them wrong.
Anthropology ~ A beautiful tale.
EpicZen
Carnivores Hub ~ Need the full games without all the hassle of torrents or viruses? Run on over to EpicZen's Carnivores Hub!
Anthropology ~ A beautiful tale.
EpicZen
Carnivores Hub ~ Need the full games without all the hassle of torrents or viruses? Run on over to EpicZen's Carnivores Hub!
-
- Compsognathus
- Posts: 1070
- Joined: Fri Jan 04, 2008 12:14 am
- Location: Switzerland
- Contact:
Re: pcm encoder
Uhm... why not just use "Audacity" and be happy?
Re: pcm encoder
Hmmm... has anyone tried IMA ADPCM files saved with Audacity and imported into a TPA file? I remember someone tried using IMA ADPCM WAV files in the past (can't remember what program was used), but they wouldn't play well once imported...
Rebel wrote:it's a test to create a trespasser compatible ima/dvi adpcm wav, import it and have it play all the way through in-game.
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
-
- Compsognathus
- Posts: 1070
- Joined: Fri Jan 04, 2008 12:14 am
- Location: Switzerland
- Contact:
Re: pcm encoder
I would be astonished if this is a problem. If though it is one simply use SoX. There's nothing SoX can't do and it's command line so you can embed it into scripts to automatize your production pipeline.
- Rebel
- -=TresCom Developer=-
- Posts: 6124
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
Re: pcm encoder
Sox, eh? Never tried it, though I know cool_edit created ima/dvi wavs don't work. They play a second or two & then cut off, just as I expected they would. The devil is in the details, as the saying goes. True audio programs can handle a wide range of audio formats and variations. Tres isn't an audio program though, it's a game and as such has strict requirements for its audio loader to work. It was never designed nor intended to accommodate any other audio formatting, block alignments or sampling rates other than what it was designed for and the Devs really had no reason to make allowances for it to do that.
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
-
- Compsognathus
- Posts: 1070
- Joined: Fri Jan 04, 2008 12:14 am
- Location: Switzerland
- Contact:
Re: pcm encoder
I'm rather sure it should work. Just tell me what exact format parameters the WAV has to be like and I'll see if Audacity or SoX can do it.
- Rebel
- -=TresCom Developer=-
- Posts: 6124
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
Re: pcm encoder
if mono;
22050, 16bit, 1024 block alignment
stereo;
41000, 16bit, 2048 block alignment
22050, 16bit, 1024 block alignment
stereo;
41000, 16bit, 2048 block alignment
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Re: pcm encoder
Here's a test with Audacity:
- Attachments
-
- 269.zip
- (4.31 KiB) Downloaded 3380 times
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
-
- Compsognathus
- Posts: 1070
- Joined: Fri Jan 04, 2008 12:14 am
- Location: Switzerland
- Contact:
Re: pcm encoder
Should be no problem for Audacity. Save as "Other Uncompressed Format" and use "IMA ADPCM" as format. Before exporting set the track to "Mono", "22050" and "16 Bit" and the project to "22050". Then the produced file should be correct. What exactly you mean with block size I don't get as I can not recall this format having any "block size" restrictions or requirements of any kind. It's a 4-bit format hence 1024 or 2048 "block size" (whatever this is supposed to be) is automatically given since both 1024 and 2048 are divisible by 4.
- Rebel
- -=TresCom Developer=-
- Posts: 6124
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
Re: pcm encoder
Yea, need a bigger wave sample than that to test out. Block alignment is how many samples there are inbetween headers (before the next sample blocks begin).
Take a voiceover wav from trespasser, encode that and upload. Something at least a few words long.
Take a voiceover wav from trespasser, encode that and upload. Something at least a few words long.
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
-
- Compsognathus
- Posts: 1070
- Joined: Fri Jan 04, 2008 12:14 am
- Location: Switzerland
- Contact:
Re: pcm encoder
In between headers? There is only one header and the rest is a continuous stream of nibbles. Ah wait... yeah... the M$-fuck-me-up variation of IMA ADPCM has an abomination like "block size". I think I see now where you come from. From my test Audacity uses "512" as the block size on a mono file with static noise. You don't want to say they did "not" read the block header but assume 1024 all the time in Trespasser? That would be very short stupid even for games of that time.
- Rebel
- -=TresCom Developer=-
- Posts: 6124
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
Re: pcm encoder
Yes, I believe that's what the audio loader does indeed do.You don't want to say they did "not" read the block header but assume 1024 all the time in Trespasser? That would be very short stupid even for games of that time.
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
-
- Compsognathus
- Posts: 1070
- Joined: Fri Jan 04, 2008 12:14 am
- Location: Switzerland
- Contact:
Re: pcm encoder
That actually is "very" stupid. Way to make themselves (the developers and artists) extra work. I don't know right now if SoX has an option to alter the block size. Such an assumption about the block size is quite an exotic requirement.
- Rebel
- -=TresCom Developer=-
- Posts: 6124
- Joined: Sun Nov 10, 2002 10:26 pm
- Location: That country nobody likes (you know the one)
- Contact:
Re: pcm encoder
Well, the encoder I posted does the job, but the created adpcms are not optimum quality. On a scale of 1 - 10, I'd give most waves encoded a 7 or 8 in quality. Acceptable in most cases -Dragonlord wrote:That actually is "very" stupid. Way to make themselves (the developers and artists) extra work. I don't know right now if SoX has an option to alter the block size. Such an assumption about the block size is quite an exotic requirement.
Castaway Final Release Link: https://www.mediafire.com/file/ro5qzl88 ... l.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file
Final Walkthru (Updated): https://www.mediafire.com/file/skkxy7b0 ... u.zip/file
Castaway Final (optional update): https://www.mediafire.com/file/2bh23l30 ... e.zip/file