Vai al contenuto

Foto

Breaking the Sound Barrier


  • Effettua l'accesso per rispondere
Questa discussione ha avuto 11 risposte

#1
Sunjammer

Sunjammer
  • Members
  • 925 Messaggi:
It appears to me, as someone that's only dipped a proverbial toe, that the community has issues when it comes to getting sound and music to function correctly in Origins.

A quick browse of this forum reveals that we appear to have more questions than answers and I know from my personal experience that things aren't always as straightforward as they could be. I also recall that the cutscene designers have issues with getting sounds/music into cutscenes.

Then when I was skimming Challseus' The Rose of Eternity blog the following paragraph echoed my own opinion:

Challseus wrote...

... DAO has a built in system where any music being played gets lowered during conversations. The only problem is, I'm not adding custom music in the game via their own music system (since no one has taken oh, a few hours out of their day over the past 2 years to tell us how to do it properly), but rather, through sound objects. So, I've been tinkering with the idea of wrapping the conversation event, and when one is started, getting a reference to the music/sound playing in an area, and lowering the volume ...

Now it may be that we have all the information we need in the community, the wiki and the forums and it is simply a case of collating and clarifying that information. Or it may that we need to dig a bit deeper into the FMOD documentation, the toolset's mechanics and/or scour the internet for resources and/or tutorials.

In any event I was thinking that if we, as a community, focussed our attention on the sound and music nut we might be able to crack it. It makes sense to me to firstly identify all the sound and music related tasks and then secondly to locate/consolidate resources (documentation, tutorials, utilities) for those tasks.

I'm sure there are many more but the tasks I can think of are:
  • Adding VO to a conversation
  • Extracting VO from conversation
  • Adding sounds/music to an area
  • Adding sounds/music to a cutscene
  • Creating custom sound sets
  • Controlling sounds through scripting
  • Controlling music through scripting

Modificata da Sunjammer, 19 agosto 2011 - 11:17 .


#2
Mooglator

Mooglator
  • Members
  • 79 Messaggi:
Seems like a job for the BGRedux team. We've done the first, 3rd, 4th 5th 6th and 7th points I think, and I can probably give some way to get in touch with the guys on the team who can walk you through that, if you wanna pop me on steam

#3
Dark_Ansem

Dark_Ansem
  • Members
  • 638 Messaggi:
don't forget: add a custom soundset without overwriting a previous one.

#4
Sunjammer

Sunjammer
  • Members
  • 925 Messaggi:

Mooglator wrote...

Seems like a job for the BGRedux team. We've done the first, 3rd, 4th 5th 6th and 7th points I think, and I can probably give some way to get in touch with the guys on the team who can walk you through that, if you wanna pop me on steam

Thanks I'll do that.

Incidentally my list wasn't intended to be definitive - I simply felt I, as the OP, should get the ball rolling. I'm sure there are other tasks that I'm completely oblivious that should be on that checklist. If everyone lists their personal audio stumbling blocks then hopefully we can fix them all in a single focused, Community task-force type approach.

/me is booting Steam now ...

#5
Cuvieronius

Cuvieronius
  • Members
  • 91 Messaggi:
We haven't done any sound scripting yet at all. We meant to do it, but that is still not known or verified to work. Been meaning to do more tutorials on sound, but too busy making levels atm.

#6
Sunjammer

Sunjammer
  • Members
  • 925 Messaggi:
I've been meaning to update this thread for a week or so after having a very productive chat with Mooglator and especially Cuvieronius from the BG2R team. Both of them pointed me in the direction of Cuv's How to: Add New Music and Sounds tutorial on the BG2R wiki. And of course we have DahliaLynn's How to: Add New Music to a Cutscene.

FMOD seems to be pretty well covered by the PDF that accompanies it; the wiki's FMOD and (unhelpfully named) How To pages and the two tutorials mentioned above. Admittedly I haven't done more than scratch the surface as I think there are more basic concerns to address first.

That said Cuv has kindly donated a base FDP which should make things easier for budding sound designers. I'm planning to make this available with the next batch of Community Contests which will include a couple of contests for the audiophiles among us.

Getting back to the more basic concerns I'm was more interested in how designer actually use sounds and music in the toolset. Unfortunately the wiki seems to be lacking in this regard ...

The Information in the Toolset Wiki

Ignoring the articles mentioned above there seems to be little information about how to use existing music and sounds or how to go about designing and organising the music and sound for an area.

The Area page has a section for volume objects which has links for audio volumes, reverb volumes and music volumes. Unfortunately all of them are redirected to the Volume object page and while it has a section for each, it actually contains very little useful information.

Similarly the Sound and music portal has the links for the volume types so nothing is gained there.

The Area tutorial has a Sound section right at the end of the lesson but it simply links to the Sound page.

The Sound page provides some information on Audio Volumes and Emitters. However it glosses over Reveb Volumes and doesn't have any information on Music Volumes.

In my quest to find out how to use existing sounds and music I kept running into dead ends or only getting a sliver of information. There is, for example, nothing I could find anywhere in the wiki that talks about how to set up and use Music Volumes. This could be simply because it is blindly obvious but, while I can hazard a guess at how it might work and then go on and test it, either way I'd rather see it written down somewhere.

Queries
  • When I drop them into an area, most of my sound objects have a red frame around them (and don't appear to work) others have a yellow frame around them (and appear to work). Why do some work and others don't? What do the colours mean?
  • The sound objects that do work are very, very quite in the toolset. How can I make them louder? How do I ensure what I hear in the toolset will be what I hear in?
  • With the Sounds stats button pressed (active) on the area toolbar throws up lots of information (example below) what does it all mean? Can and do we need to use it?
emit=0 snds=2(8,1), playin snds=1, inact=0|r ch=1, v ch=0 | men=4.49MB, mempk=10.06Mb, cpu=0,54 (dsp=0.25,str=0.01,u=0.01) mpg=0
'amb_oneshots' -1,
Reverbs: '<>SYS, <>SYS,<>SYS,
P:0(1) [i=4 ia=1] r=0 v=0, 3D (a resource path) rv=<>[d=23.19(20.00)] ocl=0.00(0.00), t=0.00 aud=0.00 len=6192
P:1(1) [i=4 ia=1] r=1 v=0, 3D (a resource path) rv=<>[d=23.19(20.00)] ocl=0.00(0.00), t=0.73 aud=0.10 len=1688

Breaking it down

So taking my original list; the information Cuv provided and my own dabbling/research I've tried to refine/expand my list:
  • Overview of sound objects (exists: move/clean up/expand)
  • Overview of audio volumes (exists: move/clean up/expand)
  • Overview of music volumes
  • Overview of reverb volumes (exists: move/expand)
  • Overview of sound sets
  • Overview of voice over
  • Adding music to an area
  • Adding sounds to an area (exists?)
  • Adding music to a cutscene (Dahlia's tutorial)
  • Adding sounds to a cutscene
  • Adding both music and sounds to a cutscene
  • Creating custom sound sets (creatures/NPCs)
  • Creating custom sound sets (companions/player)
  • Adding new VO to a new conversation
  • Adding new VO to an existing conversation
  • Extracting VO from an existing conversation for reuse
  • Controlling music through scripting
  • Controlling sounds through scripting
  • FMOD events (and how they relate to the toolset/game)
  • Definition of 4.0 Ambiences
  • Definition of 3D placeable emitters
  • Definition of 3D area effect emitters
  • Adding new music and sounds (Cuv's tutorial)
  • Sound and music file naming conventions
  • Controlling sound/music volume in conversations/cutscenes
  • Setting music intensity after cutscenes (gen00cs_end_music_int_*)
  • "Sound set" conversation technique for cutscene dialogue
  • Sounds stats
  • Sounds in visual effects (VFX_base)

Modificata da Sunjammer, 05 settembre 2011 - 08:05 .


#7
Sunjammer

Sunjammer
  • Members
  • 925 Messaggi:
After Cuv and I had chatted about it yesterday, I spent a bit of time investigating music volumes this evening paying particular attention to having multiple music volumes in a single area.

The basic approach seems to be you draw a big music volume that covers the whole area, set its  Enter State and Exit State properties to 1, and select one of the options from the area's Music Preset dropdown list. When the player enters an area the music (hopefully) plays.

I suspect it won't always work and hopefully this post will show why.

To try and get a better understanding of how this worked queried the database to identify areas with more than one music volume. There are quite a few including:
  • bed100ar_forest_clearing (Forest Clearing)
  • den600ar_landsmeet_chamber (Landsmeet Chamber)
  • orz260ar_proving (Orzammar Proving)
  • orz510ar_caridins_cross (Caridin's Cross)
Of these Caridin's Cross looked the most promising because it has four music volumes so offered the best chance for getting some insight. We can see the four music volumes in the area editor (I took some small liberties with the volume shape to make so I could fit them in):

Multiple Music Volumes 1

And outlined them for easy reference:

Multiple Music Volumes 2

Examining each in turn I noticed the only things that change (other than their Position obviously) were their Enter State and Exit State properties. Two (red and blue) of the volumes have a value of 1 for these, one (green) has a value of 4 and one (purple) has a value of 5.

The area's Music Preset is Paragon_droad so I opened up the music.fdp ([install folder]\\tools\\Source\\Sound Effects\\core fdp files\\sound\\music.fdp) in FMOD and scanned the list of events groups until I found the correct one.

Opening the common events (main, combat and Death) in turn we see each of them has five sound instances straddling music states 1 to 5 respectively:

Multiple Music Volumes 3
Multiple Music Volumes 4
Multiple Music Volumes 5

Therefore it seems we can conclude that all a music volume does is starts and stops the corresponding music state in the main, combat and Death events for the event group that corresponds to the area's Music Preset. Therefore in order to get music working you first have to know what music states an event has and theonly way to do that appears to view it in FMOD. Admittedly not a huge insight but at least it's a start.

Finally, since my music.fdp reports all the files as missing, I think I need to add another point/issues/question to my previous list:
  • How to preview each of the music states in a music file

Modificata da Sunjammer, 08 settembre 2011 - 12:20 .


#8
Cuvieronius

Cuvieronius
  • Members
  • 91 Messaggi:
good work sunjammer! I noticed that all the Main sounds are flagged as One-shot/Wait for Previous. Which seems odd to me, but so much of this is still not undertood.

The combat sounds for DRoad seem correct and make sense; Immediate/Loop and Cutoff

I think we can indeed conclude that the area settings determine which music_state to play, as you say above. This is very good to know, and it makes perfect sense now that you put it all in writing.

To preview the sounds in the music fdp.. you first need to extract ALL the sounds from the Wave Banks:
music_nostream_sting.fsb
music_bank_strm_new.fsb
music_bank_strm_death.fsb

Put them all in a single folder along with your music fdp and open it again there.. it should find them. Be warned... it is a massive amount of files and quite huge in file size. Will work on a way to preview them directly from the fsb in fmod.  You also need to convert them all to wav.

*trying it now, and it isnt working.  I know that I did this before... but must be missing something.  Will keep trying and get this resolved.

Modificata da Cuvieronius, 08 settembre 2011 - 03:11 .


#9
Cuvieronius

Cuvieronius
  • Members
  • 91 Messaggi:
okay, figured it out. ignore the above instructions (but will leave them for reference) as that is only needed for rebuilding the music.

To play events sounds, open the music.fev in the FMOD Event Player. Make sure you have the appropriate fsb's in the same directory as the music.fev. You can expand the hierarchies and play individual events either specifically or randomly. I dont see any direct editing capability though, but it will let you save the setup. Will play with it a bit more and see if I can find out any more information.

Modificata da Cuvieronius, 08 settembre 2011 - 03:33 .


#10
Sunjammer

Sunjammer
  • Members
  • 925 Messaggi:
Unfortunately I get a FMOD Error (80): The vesion number of this file format is not supported when I try that (and before you ask I'm using the version that came with the toolset).

Modificata da Sunjammer, 08 settembre 2011 - 10:32 .


#11
Cuvieronius

Cuvieronius
  • Members
  • 91 Messaggi:
hmm... I had opened the redux Music.fev and it opened fine with the event player that shipped. That is all the core stuff plus our stuff. I just opened both in wordpad; core and ours... and noticed that the headers are slightly different.

Ours: FEV1 4 \\V i  music
Core: FEV1 : HN  ^  music

Not sure if that is because of the extra wave banks, or because the core one was build with a different version of FMOD than was shipped. I really dont like the inconsistencies of what we can build vs. the core resources... it's very annoying.

#12
Sunjammer

Sunjammer
  • Members
  • 925 Messaggi:
The example provided with FMOD Designer is different again (other than the FEV1) so I don't think there is too much cause for concern about anything after the first 4 bytes (at least not until someone tries to decode the file format).

I did noticed that the FDP files are XML so I'll look into parsing the music.fdp file to extract the music_state values for each of the main events in each of the event groups. Or if it would be helpful I could look at doing it for all events (though they might all be single sound instances and music state of 1).

I also started testing the SetMusicVolumeStateByTag function so I should be able to document that in due course. Passing a different value in for the nMusicState parameter should make it play a different sound instance and passing an invalid value should make it go silent. Oddly while it works really well for combat (no need to stop and start) it didn't seem to work for main (I haven't tried Death yet). It could be the actual sounds in the sound instance are the are similar for main so it hard to tell if it has changed. Either way some more testing required there and also to determine the effect o omitting the tag, changing the delay values, etc.

The other function that interests me is SetMusicIntensity as it according to its comments it relates to cues and themes which are under the Music tab in FMOD Designer. It only appears to be used in:
  • pre100pt_light_beacon
  • gen00cs_cs_end_music_int_0
  • gen00cs_cs_end_music_int_1
  • gen00cs_cs_end_music_int_2
  • gen00cs_cs_end_music_int_3
  • gen00cs_cs_end_music_int_4

Modificata da Sunjammer, 12 settembre 2011 - 11:33 .