Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Ford_Prefect on March 24, 2014, 12:39:08 am

Title: Musings on Music and the .amb file
Post by: Ford_Prefect on March 24, 2014, 12:39:08 am
I just took a look, out of curiosity, at the .amb file in the fx folder.  I think it is the music file.
The first part looks like a list of instruments and the second part probably contains instructions on when to play them.

Anyone interested in knowing how they work?  I'm mildly curious, but I'm unlikely to try to reverse it if there isn't any interest.
Title: Re: Musings on Music and the .amb file
Post by: Buster's Uncle on March 24, 2014, 12:41:37 am
There's definitely interest.  Modders are always interested in what can be customized.
Title: Re: Musings on Music and the .amb file
Post by: gwillybj on March 24, 2014, 02:02:50 am
That would be cool, writing our own musics.
Title: Re: Musings on Music and the .amb file
Post by: Buster's Uncle on March 24, 2014, 02:09:22 am
We need to get started on an AC2 theme...
Title: Re: Musings on Music and the .amb file
Post by: Geo on March 24, 2014, 05:27:00 pm
We need to get started on an AC2 theme...

Staaarrr.Trrekking... ;lalala

 ;lol
Title: Re: Musings on Music and the .amb file
Post by: Buster's Uncle on March 24, 2014, 05:29:39 pm
No.
Title: Re: Musings on Music and the .amb file
Post by: Ford_Prefect on March 24, 2014, 07:06:58 pm
Did a little test.  I replaced big strings g1.wav with a clip of numa numa.
The file was played back in game, but it had been slowed down allot.  So unless I encoded the file wrong (quite possible, I am a noob with audio formats), it means the format can shift the pitch of the files. Also, I noticed that it can play 2 instruments at the same time.  So the amb files have to have a way for playing stuff concurrently. 
Title: Re: Musings on Music and the .amb file
Post by: Geo on March 24, 2014, 09:37:36 pm
Also, I noticed that it can play 2 instruments at the same time.  So the amb files have to have a way for playing stuff concurrently.

Yes, I believe that kind of ambience was quite a revelation back then. ;)
Title: Re: Musings on Music and the .amb file
Post by: Buster's Uncle on April 03, 2014, 05:39:49 am
I'm trying to remember if Davyboy looked into the sound files, or just the movies.   That would be worth a search...
Title: Re: Musings on Music and the .amb file
Post by: Ford_Prefect on April 04, 2014, 10:59:40 pm
Well, since pset was the smallest .amb file I decided to see what happened when I replaced the other .amb files with it.


First part of the file
Code: [Select]
pset1
70 72 67 6D 34 progm4
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FA 00 00 00
70 65 61 63 65 20 64 72 6F 6E 65 00 70 65 61 63 65 20 64 72 6F 6E 65 00 6B 6D 61 70 68 peace drone.peace drone.kmaph
00 00 00 02 00 00 00 00 00 00 00 00 00 00 00
70 65 61 63 65 20 64 72 6F 6E 65 peace drone
00 02 00 00 00 0C 00 00 00 47 00 00 00 00 00 00 00 01 00 00 00
66 78 5C 70 65 61 63 65 20 64 72 6F 6E 65 20 63 34 2E 77 61 76 fx\peace drone c4.wav
00 7F 00 00 00 48 00 00 00 01 00 00 00
66 78 5C 70 65 61 63 65 20 64 72 6F 6E 65 20 63 35 2E 77 61 76 fx\peace drone c5.wav

It only references two sound files.
peace drone c4.wav and peace drone c5.wav
I replaced "peace drone c5.wav" with a a different file so that I could tell which one was playing.
In the game they alternated playing the files, and I pretty sure they changed pitches.  Usually playing a note right after an end turn.

Next part of the file.
Code: [Select]
00 FA 00 00 00
67 6C 62 6C 50 glblP
00 00 00 0C 00 00 00 20 00 00 00 02 00 00 00 02 00 00
00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00
00 02 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00
4D 54 68 64 MThd
00 00 00 06 00 01 00 03 00
78 4D 54 72 6B xMtrk
00 00 00 58 00 FF 03 08
75 6E 74 69 74 6C 65 64 untitled
00 FF 02 1F
43 6F 70 79 72 69 67 68 74 Copyright
20 A9 20
31 39 39 38 20 62 79 20 44 61 76 69 64 20 45 76 61 6E 73 1998 by David Evans
00 FF 01 0C
44 61 76 69 64 20 45 76 61 6E 73 David Evans
0A 00 FF 58 04 04 02 18 08 00 FF 59 02 00 00 00 FF 51 03 09 27 C0 00 FF 2F 00
4D 54 72 6B MTrk
00 00 00 27 00 FF 21 01 00 00 FF 03 0B
70 65 61 63 65 20 64 72 6F 6E 65 peace drone
00 C0 00 00 B0 07 32 00 90 3C 64 92 60 3C 00 00 FF 2F 00
4D 54 72 6B MTrk
00 00 00 27 00 FF 21 01 00 00 FF 03 0B
70 65 61 63 65 20 64 72 6F 6E 65 peace drone
00 C0 00 00 B0 07 32 00 90 48 64 8B 20 48 00 00 FF 2F 00

Anyone spot anything interesting?


Title: Re: Musings on Music and the .amb file
Post by: Ford_Prefect on April 04, 2014, 11:04:47 pm
 .ambs were used for Civ III apparently.... I just did a google for .amb and civ and came up with people trying to mod the unit sounds.
Title: Re: Musings on Music and the .amb file
Post by: Ford_Prefect on April 04, 2014, 11:14:39 pm
http://forums.civfanatics.com/showthread.php?t=326218 (http://forums.civfanatics.com/showthread.php?t=326218)

Yes....... Someone else has done some work.....
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 14.

[Show Queries]