Author Topic: Musings on Music and the .amb file  (Read 3052 times)

0 Members and 1 Guest are viewing this topic.

Offline Ford_Prefect

Musings on Music and the .amb file
« 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.

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49291
  • €592
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Musings on Music and the .amb file
« Reply #1 on: March 24, 2014, 12:41:37 AM »
There's definitely interest.  Modders are always interested in what can be customized.

Offline gwillybj

Re: Musings on Music and the .amb file
« Reply #2 on: March 24, 2014, 02:02:50 AM »
That would be cool, writing our own musics.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49291
  • €592
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Musings on Music and the .amb file
« Reply #3 on: March 24, 2014, 02:09:22 AM »
We need to get started on an AC2 theme...

Offline Geo

Re: Musings on Music and the .amb file
« Reply #4 on: March 24, 2014, 05:27:00 PM »
We need to get started on an AC2 theme...

Staaarrr.Trrekking... ;lalala

 ;lol

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49291
  • €592
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Musings on Music and the .amb file
« Reply #5 on: March 24, 2014, 05:29:39 PM »
No.

Offline Ford_Prefect

Re: Musings on Music and the .amb file
« Reply #6 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. 

Offline Geo

Re: Musings on Music and the .amb file
« Reply #7 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. ;)

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49291
  • €592
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Musings on Music and the .amb file
« Reply #8 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...

Offline Ford_Prefect

Re: Musings on Music and the .amb file
« Reply #9 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?



Offline Ford_Prefect

Re: Musings on Music and the .amb file
« Reply #10 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.

Offline Ford_Prefect

Re: Musings on Music and the .amb file
« Reply #11 on: April 04, 2014, 11:14:39 PM »
http://forums.civfanatics.com/showthread.php?t=326218

Yes....... Someone else has done some work.....

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Superior training and superior weaponry have, when taken together, a geometric effect on overall military strength. Well-trained, well-equipped troops can stand up to many more times their lesser brethren than linear arithmetic would seem to indicate.
~ Spartan Battle Manual

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 47 - 1280KB. (show)
Queries used: 43.

[Show Queries]