I have music that plays when a player enters a particular area. However, I want the music to stop when the player leaves. Does anybody know of a way to make that happen, or do I just have to use a shorter music loop?
None.
You have to use a shorter music loop, unfortunately.
There's no way to 'stop' a WAV once its started playing. You can try breaking your wav into short chunks and then using a timer to play them in sequence, that way when a player leaves the music will only have a portion of the total file to play still, instead of the whole sound.
None.
That is unfortunate... But thanks.
None.
In continuation of what Vrael said, if you want to make the music sound more fluid as you move from area to area, you can have two versions of each wav: one normal and one that fades out near the end. That way, when the player enters a new area, you can play the wav with the fade at the end so that the music fades out naturally and doesn't just abruptly stop.
I considered doing that, but I made a whole soundtrack, and the file size would be inordinately large with 2 copies of each piece.
None.
http://www.staredit.net/files/1987/I forget exactly what I did with this map, but essentially you can either use waits (more accurate) or pure death counters (only on fastest). Honestly death counters is the best idea.
Split your wav up into 2.02 second segments, have a death counter 1 count up/down for the length of the ENTIRE loop, and have a death counter 2 to turn on/off the song. When death counter 1 is a multiple of 24, play a specific wav file. The other option, and IMO better is to split it up into measures, so long as the measure is pretty close to a multiple of 84 ms. This works the best, as measures are natural places for songs to begin/end.
If you want to fade, it's possible to simulate it by making the main theme "louder" by playing the wav multiple times. You get significant quality loss if you abuse it, but 3 levels should be enough to get the point across.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
I had a theory awhile back about this. If you mute and then unmute volume (ie ctrl+s) wavs stop playing, so with eud actions or neuds you could force type ctrl+s ... Maybe?
I forget exactly what I did with this map, but essentially you can either use waits (more accurate) or pure death counters (only on fastest). Honestly death counters is the best idea.
If my understanding is correct, waits do not split more accurately than dc's. A wait of 10 ms should be the same as 0 ms. I forget the actual division. Your statement is false, assuming what I was taught is correct.
"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."
-NudeRaider
waits use real time, death counters use game time.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
waits use real time, death counters use game time.
Waits use real time, but they are only checked on trigger cycles, so it's a moot point.
Like I said, I forget the actual division, but it was something like every 64 milliseconds that a trigger cycle processed on hypertrig fastest.
This means that any time between 0-64 for a wait would occur at the same distance of time (64 miliseconds). Test it yourself. Have a trigger with 0 milisecond waits between about 20 separate actions on hyper fastest. They will occur with significant difference between the first and last action.
"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."
-NudeRaider
Sorry, I meant if you don't play on fastest waits are more accurate.
Regardless, waits are accurate to the nearest 42 ms. Whether or not the next trigger will run when the wait is over is a different story. Hypers which wait 43 ms will always fire every 3rd frame, not ever other frame.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
In continuation of what Vrael said, if you want to make the music sound more fluid as you move from area to area, you can have two versions of each wav: one normal and one that fades out near the end. That way, when the player enters a new area, you can play the wav with the fade at the end so that the music fades out naturally and doesn't just abruptly stop.
Yeah, that's what I did in Autocracy RPG, and it also allowed the music to fade out to silence if the player chose to turn it off. It sounds nice when paired with fade ins, which is easy to do since each track can always start at the same place

Although the one downside is the way it inflates the file size significantly, which unfortunately seems to be a large concern for the OP.
However, if you're going to include a whole soundtrack in your map, it's probably too large to reasonably download via bnet anyways. Personally, I'd make the wavs able to fade out, then simply upload the map to the DLDB and put the download link in one of the force names, so people can see it in the lobby and bypass bnet altogether.
I think I'll just use shorter loops and release the full soundtrack separately.
None.

Find Me On Discord (Brood War UMS Community & Staredit Network)
I have done some testing with this and unfortunately I could always hear the transition, it seems basically impossible to not have some sound artefact at each break.
Also for decreasing length of WAVs you can use a program, like wavpad sound editor, to change the properties of the sound file.
Select 16 bits and mono. Mono because SC only plays in mono anyway, and 16 bits... for some reason I can't remember, but same deal.
Then you choose the Hz depending on how much you are willing to butcher the quality, I usually go for 11025Hz.
I have done some testing with this and unfortunately I could always hear the transition, it seems basically impossible to not have some sound artefact at each break.
You mean the break between each segment of audio? If so, it certainly is possible to transition from one clip to another without any artifacts. Those generally occur when you compress the audio, however if it's left uncompressed then there shouldn't be any issues at all.
I had a theory awhile back about this. If you mute and then unmute volume (ie ctrl+s) wavs stop playing, so with eud actions or neuds you could force type ctrl+s ... Maybe?
Sounds also stop when you hit ESC to halt all triggers, could be something there.
🤙🏾
Also for decreasing length of WAVs you can use a program, like wavpad sound editor, to change the properties of the sound file.
Select 16 bits and mono. Mono because SC only plays in mono anyway, and 16 bits... for some reason I can't remember, but same deal.
Then you choose the Hz depending on how much you are willing to butcher the quality, I usually go for 11025Hz.
I'm pretty sure SC plays in stereo.
None.
SC also downgrades all higher files to 44100Hz.

An artist's depiction of an Extended Unit Death
I'm pretty sure SC plays in stereo.
You are correct. Take a song that obviously uses stereo (Animal by Three Day's Grace has some vocals that can only be heard in one channel in the middle of the song, for example) if you want to test this. I actually use Perfect Insanity by Disturbed in stereo for Dash 9, and you can hear the intro moving back and forth between the left and right channels.
I have done some testing with this and unfortunately I could always hear the transition, it seems basically impossible to not have some sound artefact at each break.
Also for decreasing length of WAVs you can use a program, like wavpad sound editor, to change the properties of the sound file.
Select 16 bits and mono. Mono because SC only plays in mono anyway, and 16 bits... for some reason I can't remember, but same deal.
Then you choose the Hz depending on how much you are willing to butcher the quality, I usually go for 11025Hz.
did you notice it on my map?
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
I'm pretty sure SC plays in stereo.
You are correct. Take a song that obviously uses stereo (Animal by Three Day's Grace has some vocals that can only be heard in one channel in the middle of the song, for example) if you want to test this. I actually use Perfect Insanity by Disturbed in stereo for Dash 9, and you can hear the intro moving back and forth between the left and right channels.
SC does play in stereo, but I thought it played all WAVs as mono.
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB -
topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig -
topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!