[directmusic] Re: wav tracks, a pain... solutions?

  • From: "Scott Morgan" <scott@xxxxxxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Thu, 9 Jan 2003 05:37:03 -0600

If you have very little midi going on its probably not a big deal for you.
I have seen it more in DMP but it happens outside of it too.  You should
keep in mind I have put DMusic through some pretty tough scenarios (having
been a tester at MS).....maybe I'm a little jaded : )  If a person is runing
a lightning fast computer they probably won't have any issues.  Its just I
have seen the issue so many times I don't feel safe any more.

I don't know about disk defrag and sreen resolution changes not happening
during game, saving the game causes glitches in a lot of games I've played.
That's accessing the disk like defrag, just not as bad.  Screen resolution
changes often happen when going to a menu screen.  I've seen that glitch in
many many games as well.

Maybe it isn't something that I should be overly concerned about in
game....even so i come back to the old problem of how to stop one wav one
and go into the next at a any given time.  It's such a pain to get it to not
cut off instantly.

Oh,  I forgot to mention:  When you have a compressed wav, it is
uncompressed in memory before it is played.  For a streaming wave that means
the part of the wav that is in the sound buffer is uncompressed.  For DLS it
means the entire wav is uncompressed.  For DLS it means there a larger CPU
when loading the instruments, but with wavs it means higher CPU while
playing.  I typically haven't used much compression in the past so I'd say
that wasn't a major factor, lthough it wouldn't suprise me if it did turn
out to be at some point.

I don't meant to freak anyone out.  If you are worried about your project, I
suggest you find a computer at the bottom end of your game's system
requirements and try it out.  Don't lose hope just cause I'm a wimp and gave
up on that one : )  Wave tracks are a feature with a lot of potential, it
frustrated me to no end when my own project fell to pieces back when.

-Scott Morgan
http://Morganstudios.com


----- Original Message -----
From: "Ciaran Walsh" <ciaran@xxxxxxxxxxxxxx>
To: <directmusic@xxxxxxxxxxxxx>
Sent: Thursday, January 09, 2003 5:23 AM
Subject: [directmusic] Re: wav tracks, a pain... solutions?


>
> I've been watching this thread with some alarm as I'm also going down the
> streaming wavs route for a current project. So far I haven't noticed any
> problems like this but it's definitely a worrying possibility.
>
> Could I just clarify - have people experienced this kind of problem when
> running their wav tracks in the game or app, or only in DMP? Is there any
> reason to expect that there might be a difference between the two
scenarios?
> (Other than the obvious one that disk defrags and screen resolution
changes
> wouldn't be happening in the game...).
>
> So far I have simply demoed my content using DMDemo, and have also run
this
> alongside a version of the game for context purposes. I've noticed no sync
> problems, although at this stage my tracks are only about 1 minute long
and
> there is very little MIDI embellishment.
>
> By the way, I'm not using any compression at this stage - does this have
> anything to do with it?
>
> My final question is whether the same issue applies to Xbox? Given the
> dedicated audio hardware, can we expect a more robust performance? My
> current and next titles are for both PC and Xbox so I need to know whether
a
> common solution based on streaming wavs is actually viable...
>
> Seems to me like this is a major issue for a lot of us - I hope MS is
> listening!!
>
> Cheers,
> Ciaran
>
> -----Original Message-----
> From: directmusic-bounce@xxxxxxxxxxxxx
> [mailto:directmusic-bounce@xxxxxxxxxxxxx]On Behalf Of Scott Morgan
> Sent: 08 January 2003 20:17
> To: directmusic@xxxxxxxxxxxxx
> Subject: [directmusic] Re: wav tracks, a pain... solutions?
>
>
>
> It depends on whether you have preroll selected or not.  I'm not sure of
all
> the details, but prerolling can cause a lot of of memory to be used.  Make
> sure your waves are set to stream too.
>
> I'm afraid the wavs can get out of sync too, but am not sure.  Causing a
> glitch shouldn't be all that hard.  Launch something intense while playing
> your music, like disk defrag, change screen resoltions.
>
> Oh, another sure fire way to mess up things is to stop the app in a
debugger
> for a moment.
>
> You can get a process' ID # from Task manager and then launch ntsd on that
> app from a command window (run/cmd). If you don't see PIDs go to
view/select
> columns.
>
> So basically:
>
> C:\ntsd -p 1528
>
> (use your own process ID)
>
> after ntsd stops your program type g in the ntsd window and press enter to
> continue.  If it is going to stay in sync it will, if not you should hear
> the resulting mess.
>
> -Scott Morgan
> http://Morganstudios.com
>
>
> ----- Original Message -----
> From: "Jason Booth" <jason@xxxxxxxxxxxxxxxx>
> To: <directmusic@xxxxxxxxxxxxx>
> Sent: Wednesday, January 08, 2003 2:15 PM
> Subject: [directmusic] Re: wav tracks, a pain... solutions?
>
>
> >
> > Actually, one question Scott - in #2 you mention the midi and
> > wavs getting out of sync - how do wav's and wav's hold up? Right now,
> > the plan is to have a 16 bar primary segment playing based on some
> > choices in the game, and a one or two bar secondary wav loop triggered
> > on top of it based on groove level (the danger groove). The long wavs
> > are compressed (about 580k) and the short ones uncompressed (about
> > 600k).=20
> > To make them sound good, the wav is slightly longer than the
> > actual section (and set to not cut off), so reverb has time to fade,
> > etc. I include a tempo track, and set the measure length rather than
> > using clocktime, so that everything loops and re-triggers correctly. It
> > seems to hold sync when playing in DMP. The entire project is about
> > 600megs of memory in DMP, yet 30 on disk when compressed.=20
> >
> > So this leads to a couple of questions you (or someone else?)
> > might be able to answer:
> >
> > Is it likely my wav files will come out of sync when a glicth
> > happens? Or will they likely glitch the same?
> >
> > Does DM handle streaming and memory management correctly when I
> > have 20 wav tracks as pattern variation? If I set this to not stream,
> > will it only really be loading about 1.2megs into memory at any given
> > time (actually double because of potential overlap)? How much will it
> > take by streaming, and how often will it need to access the disk? I'd
> > prefer more memory usage with less access times, just in case things are
> > glitching when it's trying to get data. How far ahead will Direct Music
> > prefetch this info? And what if scripting is controling this, will it be
> > loaded on the .play command, or at the moment of .play?=20
> >
> > Anyway, thanks for the info..
> >
> > =09
> >
> >
> >
> >
> > -----Original Message-----
> > From: Scott Morgan [mailto:scott@xxxxxxxxxxxxxxxxx]=20
> > Sent: Wednesday, January 08, 2003 11:06 AM
> > To: directmusic@xxxxxxxxxxxxx
> > Subject: [directmusic] Re: wav tracks, a pain... solutions?
> >
> >
> >
> >
> > Those bugs should be fixed in DX9.  I dont think I can talk about them
> > too much.
> >
> > I only listed that because it was definitely a source of much blood and
> > many tears back when I was working on that project.  I lost many many
> > hours/days over them and finally gave up.
> >
> > Reasons 1 and 2 are the real reasons I steer clear of wav tracks these
> > days.
> >
> > -Scott Morgan
> > http://Morganstudios.com
> >
> >
> > ----- Original Message -----
> > From: "Jason Booth" <jason@xxxxxxxxxxxxxxxx>
> > To: <directmusic@xxxxxxxxxxxxx>
> > Sent: Wednesday, January 08, 2003 11:26 AM
> > Subject: [directmusic] Re: wav tracks, a pain... solutions?
> >
> >
> > >
> > > I second this motion - I'd like to know if going with DM is a dead end
> >
> > > before I spend the time trying to get it all working. I will certainly
> >
> > > kill the recomposition and DLS advantages for the sound of being
able=20
> > > to play tracks in live.
> > >
> > >
> > > -----Original Message-----
> > > From: Paul Stroud [mailto:paul@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]=3D20
> > > Sent: Wednesday, January 08, 2003 7:46 AM
> > > To: directmusic@xxxxxxxxxxxxx
> > > Subject: [directmusic] wav tracks, a pain... solutions?
> > >
> > >
> > >
> > > Scott, I'd sure like to know what those bugs and their causes are
> > >
> > > I'm working on a wav based project at the minute, but the wavs are not
> >
> > > long enough to cause any sync probs.  I may still put these in a
DLS=20
> > > instrument though, if it means it will be less problematic.
> > >
> > > I have suffered the problems of wavs not playing and thought that I=20
> > > was just being dumb, even though, logically I could not explain the=20
> > > lack of sound.
> > >
> > > Paul
> > >
> > > > -----Original Message-----
> > > > From: directmusic-bounce@xxxxxxxxxxxxx=3D20
> > > > [mailto:directmusic-bounce@xxxxxxxxxxxxx]On Behalf Of Scott Morgan
> > > > Sent: 07 January 2003 17:59
> > > > To: directmusic@xxxxxxxxxxxxx
> > > > Subject: [directmusic] Re: MP3 encoded wav tracks, a pain in =
> > the=3D20=20
> > > > neck..
> > > >
> > > >
> > > >
> > > > btw- I once tried to do a very wav track oriented project=20
> > > > (beginning=3D20 of 2001).  I came to the conclusion that wave tracks
=
> >
> > > > are too buggy and
> > >
> > > > problematic to use in any way that makes the music dependant on=20
> > > > the=3D20 wavs working.
> > > >
> > > > Here are some of the things that kill it for me:
> > > >
> > > > 1. The lack of an easy way to implement crossfading.
> > > > 2. The fact that if there is any tiny glitch, midi and wav get
out=20
> > > > of=3D20 sync until a new wave is triggered.  This can mean the music
=
> >
> > > > sounds=3D20 horrible for a long time. 3. There were bugs in DX8 that
=
> >
> > > > made waves simply not play in certain situations.  It wasn't until I
> >
> > > > started working at MS that I finally figured
> > > > these bugs out...
> > > > 4. The wavs take up too much disk space.  I'm using ADPCM since
> > > > MP3 doesn't
> > > > have as much support in DX8.
> > > >
> > > > So in the game I am working on now, the only time I use a wav is for
> >
> > > > a
> > >
> > > > very rhythmically free flute melody that doesn't really need to=20
> > > > be=3D20 there at all times.  If it gets out of sync I don't care=20
> > > > because the=3D20 nature of the music is more timbre based and works
=
> > at
> >
> > > > any point you place it at.
> > > >
> > > > Ice_Planet (my first DMDemo) replaced the originl wave project I=20
> > > > tried
> > >
> > > > to create.  IcePlanet has one wave track with a single guitar
chord=20
> > > > in
> > >
> > > > it.
> > > >
> > > > -Scott Morgan
> > > > http://Morganstudios.com
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Jason Booth" <jason@xxxxxxxxxxxxxxxx>
> > > > To: <directmusic@xxxxxxxxxxxxx>
> > > > Sent: Tuesday, January 07, 2003 1:40 PM
> > > > Subject: [directmusic] Re: MP3 encoded wav tracks, a pain in =
> > the=3D20=20
> > > > neck..
> > > >
> > > >
> > > > >
> > > > > You may be right, but I don't want to give up on DMP just yet.=20
> > > > > Most=3D20 likely, if we roll our own solution, it will sit on top
=
> > of
> >
> > > > > Direct=3D20 Music, with primary segments triggering our code. This
=
> >
> > > > > is because I=3D20 eventually want to explore using DLS2 =
> > instruments=20
> > > > > on top of my wav=3D20 sections, by embeding the wav segments chord
=
> >
> > > > > changes into the=3D20 segment for reference. I also want to be =
> > able=20
> > > > > to use the player=3D20 music concept we used in AC2, which is =
> > pretty
> >
> > > > > fundimentally a DMP=3D20 type of system. Anyway, I'm only going to
=
> >
> > > > > bang my head against the=3D20 wall so long before we start rolling
=
> >
> > > > > our own. The difficulty, of=3D20 course, will be convincing our=20
> > > > > management to spend the code time=3D20 after we have our old music
=
> >
> > > > > system (the one used for AC2) finished=3D20 and (mostly)
working=20
> > > > > correctly.
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Saul Bottcher [mailto:saul.bottcher@xxxxxxxxxxxx]=3D3D20
> > > > > Sent: Tuesday, January 07, 2003 2:21 PM
> > > > > To: directmusic@xxxxxxxxxxxxx
> > > > > Subject: [directmusic] Re: MP3 encoded wav tracks, a pain in=20
> > > > > the=3D20 neck..
> > > > >
> > > > >
> > > > >
> > > > > Hi Jason,
> > > > >
> > > > >     From an outside perspective: you seem to be pretty=20
> > > > > frustrated=3D20 early in the project, and have enumerated a
long=20
> > > > > list of=3D20 difficulties that don't seem surmountable (i.e.=20
> > > > > behaviours of DMP=3D20 you have no way of changing).  Plus, DMusic
=
> >
> > > > > doesn't seem to be=3D20 saving you much work (since you'll need to
=
> >
> > > > > re-implement groove=3D20 levels in scripts), and saving work is =
> > what
> >
> > > > > a good tool does for
> > > you.
> > > > >     If you are comfortable with the concept, it sounds like=20
> > > > > creating
> > >
> > > > > your own music system might be the way to go this time.
> > > > >     (Which is not to disparage DirectMusic at all - no single=20
> > > > > tool=3D20 is the right solution for every job, even within its=20
> > > > > intended=3D20 scope).
> > > > >
> > > > >     Saul.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Other related posts: