[directmusic] Avoiding secondary segments notes cutting off

  • From: "Bjorn Lynne" <bjorn@xxxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Fri, 1 Nov 2002 10:07:09 -0000

I have this scenario/problem:

When I change to a new game level, I start playing a new primary segment.
This happens on the next "Bar".

But whilst coming up to that bar, I want to play a "swish" sound as a
secondary segment, which overlaps over the primary segment change, and
smoothens out the change.

So I want to start playing the "swish" immediately, and then change primary
segment at the next bar - whilst the "swish" also continues on, across the
change in primary segment.

Am I making sense? :-)

So when the game changes level, I do a:

Sub PlayLevel2
    swish.play IsSecondary + AtImmediate
    level2.play IsPrimary + AtBar
End Sub

This *almost* works great, the only problem is that the "swish" gets cut off
when the music reaches the barline and the primary segment changes. I have
tried to set the "swish" segment to "do not cut off", but the note still
cuts off. What can I do to make this swish sound carry on across the primary
segment change?

If anybody wants to load it up to see what I'm doing, I've now put the
project at http://www.lynnemusic.com/temp/cts3c.zip (2.6 mb)




Other related posts: