XNA Creators Club Online
Page 1 of 1 (6 items)
Sort Posts: Previous Next

Music Layering issue with Custom Soundtracks

Last post 6/11/2009 10:03 PM by anx. 5 replies.
  • 6/1/2009 10:57 AM

    Music Layering issue with Custom Soundtracks

    Hey,

    I have created a dynamic music layering system using XACT, the way it works is that there are 6 music layers each with thier own volume. These volumes are tweaked to blend the correct music tracks together for the current game state. However, using XACT i have had to create a group for each of these tracks to be able to adjust the volumes individually.

    Because of the seperate groups i now have the issue with custom soundtracks where if the user is listening to music through the guide, it will only mute one of the layers and not all of them.

    Is there an easy way to fix this? If possible i would like to keep it as automatic as possible since XACT usually handles custom soundtracks audomatically.

    Thanks
    Annihilator of Annihilated Games
    http://www.annihilatedgames.com/

  • 6/2/2009 6:49 PM In reply to

    Re: Music Layering issue with Custom Soundtracks

    By groups do you mean you had to create different cagegories to adjust the volumes? I think you can solve the problem by using RPCs and Variables.

    1. Add all the sounds for your background music to the "Music" category, which ensure that the tracks get muted for the dash playback correctly.
    2. Create a new variable (I think either Global or a Cue Instance variable should work).
    3. Create an RPC Preset which will open the RPC editor.
    4. In the RPC editor add some curves that control the volume for your tracks for the specific variable values.

    This should allow you to control the volumes by setting the variable value based on the game state. You may have to tweak the curves or have multiple curves per track etc. But I think this approach should basically work.
    Ashu Tatake
    XNA Framework Developer
  • 6/3/2009 9:27 AM In reply to

    Re: Music Layering issue with Custom Soundtracks

    Excellent,
    That sounds like it should work quite nicely. I will let you know how it goes :)

    Thanks
    Annihilator of Annihilated Games
    http://www.annihilatedgames.com/

  • 6/6/2009 9:36 PM In reply to
    • (0)
    • premium membership
    • Posts 9

    Re: Music Layering issue with Custom Soundtracks

    Hi,

    I was going to put a new forum post but noticed this thread...

    I've gone for this solution and I'm layering about 4 tracks on top of each other depending on game play conditions. This works perfectly on PC but on XBOX I find that tracks get out of synch and as they are differnt instruments of the same music it sounds quite off. They usually get out of synch from the start and stay that way...

    I should also mention that I have a pitch RPC based on variable as well that affects all 4 tracks - with the same curves of course. Again all this works ok on PC as far as I've tested.

    Is that a bug or is there something I can do to enforce the same position in all wav tracks regardless of pitch modification, which is the same anyway?

    Any help is greatly appreciated :)

    Thanks,
    Anx
  • 6/9/2009 7:40 AM In reply to

    Re: Music Layering issue with Custom Soundtracks

    I think the pitch RPC is probably the culprit here. The RPC doesn't not set the pitch atomically across multiple tracks in a sound which means the sounds can go out of synch over time. Also if you're using a mix of streaming + in-memory waves or compressed + non-compressed waves you might want to change that to be consistent across all the waves and see if it helps. And if its possible it would be great if you could open a Connect issue with your content so we can take a look.
    Ashu Tatake
    XNA Framework Developer
  • 6/11/2009 10:03 PM In reply to
    • (0)
    • premium membership
    • Posts 9

    Re: Music Layering issue with Custom Soundtracks

    I've noticed the issue seems to occur when the framework is being stressed - like loading contect or GC collections.

    I've openned a Connect issue now. But I'll have to trim the audio project down for a repro.

    Thanks
Page 1 of 1 (6 items) Previous Next