IMC Music Editor

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Post Reply

IMC Music Editor

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1611
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Mar 24, 2015 7:41 pm

Hello,

Here is a tool to edit .IMC music files.
XwaImcEditor.png
Download link:
https://ci.appveyor.com/project/JeremyA ... /artifacts
You do not have the required permissions to view the files attached to this post.
Last edited by JeremyaFr on Tue Jan 09, 2018 11:20 am, edited 1 time in total.

User avatar
Ramshu
Cadet 2nd Class
Posts: 69
Joined: Sat Sep 21, 2013 10:42 am
Contact:

Post by Ramshu » Wed Mar 25, 2015 3:59 pm

I think we need build a temple in jeremya honor.

Nice work!

"Nasios pa vola"

User avatar
Forceflow

Fleet Admiral (Administrator)
Posts: 5281
Joined: Wed Oct 20, 1999 11:01 pm
Contact:

Post by Forceflow » Wed Mar 25, 2015 4:20 pm

I don't think a simple temple would be sufficient
Murphy was an optimist! I am a pessimist!
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project

Bman
Lieutenant JG
Posts: 704
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Thu Mar 26, 2015 4:10 am

Woo-hoo! It's like the resurrection of the ScummRevisited2.0 and IMCGen1.0 tools, all in one. :-)

Jeremy, when replacing any .wav file inside the .IMC container, are there any limits as to the size or duration the imported .wav file can be ?
I see the default duration field "D: [500]" is editable, but it's a hit and miss to figure out what the new value should be to accommodate a larger custom wave file. What is the metric that the duration field represents? Time in seconds, file size, etc. Thanks.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1331
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Thu Mar 26, 2015 6:57 pm

Forceflow wrote:I don't think a simple temple would be sufficient
We would need a whole city in his honor
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

Rasalas
Cadet 2nd Class
Posts: 50
Joined: Fri Jan 17, 2014 8:09 pm

Post by Rasalas » Fri Mar 27, 2015 1:24 am

I think using this new tool is the best way to appreciate it. Thanks a lot again! :)
Here is a replacement for the concourse music. TIE Fighter verterans will remember this track.
https://onedrive.live.com/redir?resid=3 ... 76CC%21107
Sorry for the bad quality. I did this years ago using a demo of Fruity Loops without any real knowledge about this stuff. And this hasn't changed since. Hopefully this is some inspiration for someone with more talent. ;)

Jeremya, if I understand correctly Length = Duration * Samplerate. But the values in XwaImcEditor are a little bit off. For example FRSIMULATOR.IMC has a difference of 83 units (2662400 in the editor and 2662317 by my own calculation) Is there a reason for this?
And does "D" really mean duration as Bman said? I tried several different values on several tracks, but I couldn't notice any difference.

Hopefully I will have some time this weekend to test some new inflight music. These tracks seem to have a little more complicated setup than the menu tracks.

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1611
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 28, 2015 8:44 pm

Rasalas wrote:if I understand correctly Length = Duration * Samplerate
Length is the length in samples.
Duration is a rounded length in seconds.

Code: Select all

Duration = Length / SampleRate
The displayed value for Duration is rounded to 2 decimal digits.
Bman wrote:are there any limits as to the size or duration the imported .wav file can be ?
It need to be tested. I guess the maximum duration is around half an hour.
Bman wrote:I see the default duration field "D: [500]" is editable, but it's a hit and miss to figure out what the new value should be to accommodate a larger custom wave file. What is the metric that the duration field represents? Time in seconds, file size, etc
The unit for position and jump is the sample.
I'm not totally sure of what the D field means. I guess the unit is a ms.

User avatar
DTM
Lieutenant Commander
XWAU Member
Posts: 1312
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Mon May 25, 2015 11:56 am

I may have missed something, maybe a guide...: what is the meaning of the map? I understand how to add Text and Jump...but I don't understand their function... :?

MTD industries
WIPs: REBCP version 2

User avatar
WildstarBlue9
Lieutenant
Posts: 968
Joined: Tue Dec 14, 2004 12:01 am

Post by WildstarBlue9 » Wed May 27, 2015 8:05 am

Funny, I was often confused with the Wildstar who wrote the original IMCGen on the old X-Wing: Legacy forums. Here, I added my original callsign in the squadrons to try to avoid said confusion. :)
Wildstar, Red 2 (XO)

CRS Morning Star: Home of Red Squadron

Not the Wildstar that authored IMCGen.

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1611
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri May 29, 2015 9:07 pm

DTM wrote:I may have missed something, maybe a guide...: what is the meaning of the map? I understand how to add Text and Jump...but I don't understand their function... :?
The purpose of the map is to define how the music is played. The music can be played linearly, looping, or responding to events.
The way the game uses it is not totally known.

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1611
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Oct 09, 2017 4:57 pm

Hello,
I've found a bug in JeremyAnsel.Xwa.Imc and fixed it.
Please redownload XwaImcEditor-1.0.4 (link on the right).

User avatar
ual002
Ensign
Galactic Empire
Posts: 488
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Jun 05, 2019 2:36 am

When I try to read the music changed in the imperial install of DSUCP with the IMC player, I think its the first 9 .IMC files, I get an error.
For the glory of his majesty Emperor Palpatine! Image Image Image Image

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1611
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Jun 05, 2019 7:00 pm

UPDATE
Hello,
I've added support for wav file in imc file. This fixes the error.
Please redownload XwaImcEditor.

User avatar
ual002
Ensign
Galactic Empire
Posts: 488
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Jun 05, 2019 11:01 pm

Confirmed, Thanks!
For the glory of his majesty Emperor Palpatine! Image Image Image Image

User avatar
Will T
Lieutenant Commander
Galactic Empire
Posts: 1200
Joined: Thu Aug 19, 2004 11:01 pm

Post by Will T » Tue Aug 20, 2019 4:05 pm

Hey guys.

There's not been much done with this, so I thought I'd take a look at trying to decode what the music structure looks like in-game.

Broadly, there are three types of music file used by the game: frontend music; quick, event related tracks; and ongoing soundtracks.

These are identified by the prefix of the file. I'm guessing a little at the use of the specific letters, but I think they fit pretty well.

Fr_ is obviously frontend. This is where you find the music for the concourse, briefing room and family room etc. Most of these are fairly straightforward loops (I'll come on to that later), though there are some oddities.

Sq_ I've dubbed Sound Quick. These are the brief little musical stings you hear when certain events happen. I believe the game chooses to use these tracks based on the text line that defines them. An easy example is Sqeject1, which plays when you eject or your craft is destroyed. The track does not loop, it is simply triggered on the player's ship destruction and continues until the specific sample that is defined as its end point (using the _end text).

There are apparently some under the hood rules governing the use of these stings, I think most probably related to time. The 'arrival' stings, for example, do not play every single time a new ship fitting the description enters the area, and the 'good destroy' stings don't play every time you kill an enemy TIE. It's most likely that once a sting has played, it won't be repeated within a certain time limit (is this possibly related to duration?).

The quick sounds then use a fairly consistent seeming scheme for naming according to what triggers them. I've attempted to list these out below:

SqEject1 - as above

SqEmpLg1 - this can be played when a 'large' Imperial vessel, such as a Star Destroyer arrives from hyperspace. The naming convention is simple emp = Empire, lg = large. I'm not 100% sure how a large ship is defined, but I believe it's done by ship type. Anything that isn't a Starfighter or Droid probably counts as 'large'.

SqEmpSm2 - this can played when a 'small' Imperial vessel such as a Gunboat arrives from hyperspace. emp = Empire, sm = small.

SqFamBdLg3 - this is where things get a bit more specific. This is played when a friendly, large ship is destroyed during a family mission. For example, when the Bulk Cruiser is destroyed during the mission to rescue Aeron from Vergesso Base. I've decoded the name as follows: fam = family mission, bd = 'bad destroy', lg = large.

SqFamBdSm1 - this can be played when a friendly, small ship is destroyed during a family mission. fam = fanily mission, bd = 'bad destroy', sm = small.

SqFamGdLg4 - this can be played when the player destroys a large enemy ship during a family mission. fam = family mission, gd = 'good destroy', lg = large.

SqFamGdSm2 - this can be played when the player when the player destroys a small enemy ship during a family mission. You get the naming scheme at this point.

SqRebBdLg1, SqRebBdSm1, SqRebGdLg2 and SqRebGdSm2 are the same as above, but during Rebel missions.

SqFamLg1 and SqRebLg3 are the same as SqEmpLg1 above, but for family (purple) and Rebel ships respectively.

Interestingly, there is a SqFamLg in there as well, but I don't believe I've ever heard it in game. Either the trigger for it is very rare, related to certain ships that aren't used, or simply isn't used at all.

SqFamSm1 and SqRebSm2 are the same as SqEmpSm2 above, but for family and Rebel ships respectively.

SqHyper1 is, quite obviously, played during all hyperspace jumps.

SqPirLg appears to be as SqEmpLg1 above, but for Pirate (?) ships. I think this triggers on either Blue or Yellow IFF ships. Interestingly, SqPirLg is the same track as SqFamLg1.

SqPirSm is as above, but for small ships.

SqRampFam and SqRampReb are interesting tracks. Again, they don't loop or undercut at all. It's hard to say what their exact trigger is, but essentially they're played when the player enters a new area with hostile ships in it, but before any combat has started. I suspect the trigger might have something to do with the relative numbers of ships in a mission and/or the distance of the nearest hostile ship to the player when they enter the region. Ramp is, I assume, as in ramp up the tension. As always, the Fam version plays during Family missions, Reb for Rebels.

The last two Quick Sounds are SqRivLg and SqRivSm and I think that these are Rival Large and Rival Small, and that they play specifically for Viraxo ships. How that's defined, I'm not sure but I guess it's if their Team is set to Viraxo in the mission? This would be a good one to test more thoroughly.



The remaining files are where things get interesting. These are the St_ files, which I'm calling Soundtrack files.

This is where the maps get more complicated, and involve what I've interpreted as Loops and Interrupts. I'm still working on testing and identifying these, and it's doubtful we'll ever know the full trigger conditions, but some of this information might be useful.

The soundtrack files are mostly made up of cleverly cut together bits from the OT soundtrack that form pieces based on theme. For example, StClimReb uses music from when Luke is alone in the trench run at the end of A New Hope, transitioning into the Death Star chasm shootout (seriously, the edit here is brilliant) to give a climactic atmosphere. I don't know the exact triggers, but it usually plays towards the end of certain missions. I think it might be triggered when a certain amount of objectives have been completed and only a few remain, or only a few enemy ships remain.

The basic structure of the soundtrack file uses a loop. That is, the track will start, and if no events occur that change the music, the track will simply loop back to a certain point.

This is best exemplified in the Wait music, eg. StWaitFam. The music will start when there are no hostile ships in the area, so long as there has previously been other music played. If you destroy all enemy ships in an area, this is what the soundtrack will return to. There's a brief opening in StWaitFam the first time you hear it, and then the map defines a loop. The music will play all the way through until reaches the time represented by sample 2009472 and then uses a Jump back to sample 91264, near the beginning of the track. In the text field above this jump, sample 91264 as been defined with the text field lp, presumably for loop.

All soundtrack files have such a loop defined.

Most also have what I believe are Interrupts. These are Jumps defined with I set to a value >0. The Jumps appear to have I values that correspond with the Interrupt text (in1, for example) that work similarly to the lp start points.

The Jumps for each Interrupt are mapped to sample values, as with the Loop Jumps, but I can't figure out yet what the mapping represents. They all seem to low numbers, and I can't imagine they trigger the Jump in the same way, otherwise you'd never hear the track because it Interrupt at really early points. Some of the values are the same for different Interrupts within the same file, so I'm assuming it must mean something else. Presumably, the values used for Interrupts are related to codes for triggers from mission events, and where the number is the same the game just picks one at random?

Either way, it seems the game is able to start the ST tracks from different points, depending on what defines the Interrupt.

The ST tracks can all be broadly defined, based on the theme they're conveying, and some basic triggers can be inferred.

StChalFam and StChalReb seems to be 'Challenge', used when things aren't going the respective factions way. For example, StChalFam is used heavily in B0M6 and B4M3, the Rebel Hospital and Rescue Aeron from Vergesso missions respectively. These missions involve large numbers of enemies, and lots of allied (if not same team) ships being destroyed. Possible triggers for this ST to be used could be number of enemy ships in the mission, status of objectives, ally casualties and possibly even the type of objectives used. Neither mission has an objective requiring anything to be destroyed, and both require ships to leave the area.

StClimFam and StClimRev are, as above, 'Climax' tracks. They're used near the ends of missions when objectives are nearly complete or, in the case of some family missions, when there's a 'chase' element. Strangely, StClimFam usually plays during B5M1 when you arrive at the weapons testing range among half a dozen Star Destroyers. Enemy ship count alone can't be enough to trigger StChalFam, otherwise that's what would play. And nearly completing objectives can't be StClimFam's trigger, otherwise it wouldn't play here either. I do wonder if the ST file to be used is hardcoded to the mission somehow?

StConfFam and StConfReb seem to be 'Conflict'. I'm a little unsure about the exact use cases for this, but it seems to be bigger engagements with lots of even combat. StConfReb comes up in missions a lot, but StConfFam seems less common, I tend to associate it with missions that also use StChalFam so there might be some triggers to do with direct player involvement there.

StEmpire is an interesting one. I'd say it's one of the most commonly used soundtracks in the game. Unlike the above, it doesn't have any Interrupts. Once it starts playing, it continues in a loop until its interrupted by another track, probably due to a change in events. It's also one of the few that isn't specific to either of the respective mission types, and I think it can appear in either. Based on the name and my memory of when it's usually used, I suspect its for missions with a large Imperial presence. It's possibly triggered by the presence of a capital ship, but I'm not sure on that. Either way, if you're looking for an easy track to replace, this is probably it. If you want a campaign with a different, regular enemy (eg. the Separatists in a Clone Wars campaign) then this would be a great one to change for a nice thematic, experience. Find a version of the Droid Army march that loops well, and you'd only have to define the loop for this to integrate into missions really well. This is probably the first thing I'm going to look at doing, once I figure out a reliable way to get the ST playing.

StFailFam and StFailReb are fairly self explanatory. They're simple loops you hear when you fail a mission. I believe if you dying fails the mission that they'll continue to loop while the shuttle brings you back. I think ordinarily they'd just carry on until you end the mission, but they can be interrupted like any other track, so usually something else in the mission will happen before you get the full loop.

StIntroFam and StIntroReb are also pretty simple. They're the default music you hear when you start a mission in the respective hangars, and they'll continue playing so long as no enemies are present, even between regions. If you restart the mission, or enter combat and then defeat all hostiles, the music will revert to StWaitFam or StWaitReb, as I mentioned above. I think there are occasions when even going straight to the hangar from the briefing gets you StWait, but I might be wrong about that. If that happens, I'm not sure whether it's triggered by something or done at random.

StPanicFam and StPanicReb are more combat music. I think this is for smaller scale engagements, but I'm not sure. I know StPanicFam comes up a lot in the family missions, often when you're in the Sabra fighting yellow IFF ships. I might be really wrong about this, but I seem to think a lot of the missions where you usually get this track have Stations in them. Cargo containers too, I seem to remember StPanicReb being common for those missions where you need to inspect convoys.

StPirate and StRival are very strange. They don't have interrupts, just a loop, and therefore seem to be very similar to StEmpire I talked about above. What's strange is that I don't remember ever hearing these tracks. If I have, it's not been for very long at all. The names would seem to suggest that whatever triggers StEmpire should play these, but for Yellow/Blue and Viraxo IFFs/teams respectively. So maybe a mission with a big Viraxo capital ship should play them? I'm not sure. A bit of testing might be good to see if anyone can reliably get these to play. I'm even wondering if setting the player team to Viraxo might work.

StSuccFam and StSuccReb are also fairly self explanatory, they're the victory pieces that play when you complete a mission. StSuccReb is a bit weird, though. I don't think I've ever heard the looped section (the Throne Room music from ANH). For that matter, I'm not sure if the loop in StSuccFam plays all that much. It seems that in both cases, you get the bit up to the loop on completing a mission, and then it just reverts back to whatever was playing before (often wait music).

StWaitFam and StWaitReb are as I discussed above. They're the 'all clear' pieces when you're in an area with no hostiles after either restarting a mission or having had at least one hostile encounter in the mission.


And that's it. I don't believe the tool will let you add more pieces into the soundtrack, as it seems to me there is some dependency on the Text name for the start of the track. Unless you use an existing Text string for a new IMC file, I don't think the game will know to play it.

As soon as I've got some Wav files sorted, i'm going to experiment with replacing some of the easier loops with Prequel music. and then maybe try to figure out the Interrupt system.

Hope some of that info is useful to someone.
Formerly known as The 95 Headhunter

Justagai
Cadet 1st Class
Posts: 206
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Tue Aug 20, 2019 11:19 pm

I see you want to know more about the Imuse music. Here is the code for the Imuse music in flight. If you know how to read C, then this should give you a better idea of whats going on.
You do not have the required permissions to view the files attached to this post.

Post Reply