Aller au contenu

Photo

Questions About All Things Music


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Challseus

Challseus
  • Members
  • 1 032 messages
Okay, I have been having one hell of a time wrapping my head around the concept of how the game references music. I guess I'll just start at the top:

1) In the area editor, under the properties section, there are properties called Music Preset & Reverb Preset. Coming from the NWN module way of things, I just assumed that selecting a track from the drop down list would play it when testing my area. That does not work at all. Here's an example of some options from the drop down:

ARL_Eamon
ARL_Eamon_blacksmith
Epilogue

2) Now, if you look under the Sounds section of the palette, there is a music folder. In this folder are folders with names that are exactly the same as the options I had in the aforementioned drop down list. Within each folder are sound files like so:

main
combat
Death

Okay, getting somewhere. If I am understanding correctly, depending on the Preset I select for the area, it should play the appropriate track depending on the situation?  Makes sense... Well, why don't they play in any area I create in the toolset?

3)  Now, there is a function called PlayMusic(string sMusicName). In a thread in the scripting section (that I didn't want to hijack more than I have), it was stated that the variable, sMusicName, is a path to the track. Well, after some digging around, I found the following code snippet in area_core.nss:

// Play music
string sMusic = GetM2DAString(TABLE_AREA_MUSIC, GetTag(OBJECT_SELF), 1);
if(sMusic == "")
    sMusic = GetM2DAString(TABLE_AREA_MUSIC, "default", 1);
PlayMusic(sMusic);

This is called whenever you enter an area (unless of course you override the appropriate event in another script). So, it appears that perhaps some paths are kept in a 2DA? I figured out the value of TABLE_AREA_MUSIC, and tracked it down to a 2DA named music_projects. But, the only thing in there is 1 row with a value of music, which assumingly is the name of the music project that fills up the Music Preset dropdown.

So, I guess this code block is just not used?

-------------------------------------------------------------------------------

Has anyone made any meaningful progress with music? Please tell me I'm just missing something really stupid. If not, Bioware, some help please? Image IPB

#2
avantoreon

avantoreon
  • Members
  • 115 messages
I ran into this problem too---the trick is, you have to create a music volume for the area and put in the right numbers for the presets.

For example, if you want an eery mage-style dungeon, you set your music preset (in the "Music Volumes" properties) to "Random_mage", and then you right-click on the area and select "Insert Music Volume". Make this music volume polygon cover all of the parts of the area where you want the music to play, and then double-click to close the polygon.



After that, you just click on the music volume element you've created (it will be underneath the Music Volumes) and you'll see some stuff like "Enter State" and "Exit State" under the audio category. To get the music to play, you'll need Enter State and Exit State to each be 1 (by default, they're 0).



I've played around a little bit with numbers other than 1 in these boxes, but the music doesn't play for those, at least for the music presets I've tried (namely, the random_whatever ones).



Hope that helps.

#3
Challseus

Challseus
  • Members
  • 1 032 messages
Thanks!

Okay, now I have music playing in areas. Now I have to figure out how to get my custom music in. I'm thinking I have to create it so that if adheres to the current structure. So, the folder structure will be as follows:

music/roe_test/main

Here's hoping.

#4
Challseus

Challseus
  • Members
  • 1 032 messages
Well, I was able to create custom music events using FMOD. By adhering to the correct folder structure, I was able to see my music in the sounds section of the palette. It even showed up in the Music Preset combo box of my area's properties. The one downside is that it overwrote all the other core campaign music. It's not a big deal for me, because I won't be using any of it anyway, but I still have to look into the whole music_projects.XLS thing just to know how to do it the right way.

Anyway, the custom music I did create won't play like the others, and when I compared its properties to those of the core campaign music, it seems the only difference was that mine was 2D music, while the latter was 3D music. When I changed that property in FMOD, and re-imported my music, and crashed the toolset everytime :(

Any ideas?

#5
AmstradHero

AmstradHero
  • Members
  • 1 239 messages
A friendly bump for this thread. Some guidance on this topic would be greatly appreciated.

#6
Cuvieronius

Cuvieronius
  • Members
  • 91 messages
I would also like to hear from developers on this topic. Now that the FDP's have been released, I have been trying to integrate our mods custom music with dismal failure.



All I am trying to do is replace the main_theme, end credit and chargen music with our own for BG2Redux. My tests have yielded only empty sound or severe game crashes.



I tried to simply rebuild the music.fdp back into the fsb's without changing anything in FMOD. Left all presets intact. The files produced crash the game. There is also quite a bit of file-size discrepancy between the ones produced and the Core fsb's. Nearly 6MB difference between music_bank_strm_new.fsb in Core, and the one that the FDP produces. Everything looks correct in the FEV and H file... but causes the game to crash.



So my current thinking is that the WAV specifications for FMOD import on these sounds must be to blame somehow... but I am only guessing at this point.



I have tried various HZ - 24000, 41100, 48000

kbps - 128, 192, 228



All these fail in either the Documents\\Dragon Age\\Addins or in the main C:Program Files\\Dragon Age\\Packages\\Core, just to name two places I have tried. I still have a few more things to test, but running out of options, and have had no success yet. Have to ask if the 'music.fdp' is the correct one?