Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: music loop with waits
music loop with waits
Nov 8 2014, 9:21 am
By: twilight_marine  

Nov 8 2014, 9:21 am twilight_marine Post #1



How do I run my music to loop? I tried the methods in http://www.campaigncreations.org/starcraft/resources/staredit_tutorials/music_looping

and also tried
All players
Switch is cleared
Play wav.
Wait 142000 milliseconds
Preserve Trigger.

No death counters please :)



None.

Nov 8 2014, 2:28 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Both should work. There must be something interefering with it, so more information on what's actually happening (and what isn't) would be helpful.

Without knowing that my guess would be wait blocks. (I'm on the phone, so can't link you to the article, but I'll provide it later. In the meantime just look for wait blocks and hyper triggers in the wiki.)




Nov 8 2014, 2:31 pm Roy Post #3

An artist's depiction of an Extended Unit Death

Is your music really 142 seconds long (2 minutes 22 seconds)? That sounds massive and is going to make your map size too large to be shared on Battle.net.

In any case, if it's not working and you know your switch is cleared, it's because you're experiencing wait blocks, which is why you should never use waits for background music.

The correct solution is to use death counters. What is your reasoning for not wanting to use them? They're easy and problem-free, unlike waits. To calculate the number of deaths, you just do the following (where seconds is the length of your wav in seconds):

seconds * 1000 / 84

Then +/- 1 death depending on rounding issues and whatever sounds best for your wav file.

Attached is a map using death counters to perfectly loop a 46-second wav (compressed to 16 kHz, 16-bit mono). Note that the map is 400kb in size, which is fairly large but tolerable to share on Battle.net. Ideally you want your map below 500kb if you intend for others to download it in the game lobby.

Attachments:
MusicLoopSample.scx
Hits: 0 Size: 418.08kb




Nov 11 2014, 4:20 am rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

This map should provide an example of how to use waits and DCs together to make seamless transitions. And as I load up the map and play it, I'm accosted by wait blocks, so apparently I didn't do a very good job on making the map. If anything, this just goes to show you that you shouldn't use waits since it's really easy to create wait blocks and ruin your system.

Quote from Roy
Is your music really 142 seconds long (2 minutes 22 seconds)? That sounds massive and is going to make your map size too large to be shared on Battle.net.

In any case, if it's not working and you know your switch is cleared, it's because you're experiencing wait blocks, which is why you should never use waits for background music.

The correct solution is to use death counters. What is your reasoning for not wanting to use them? They're easy and problem-free, unlike waits. To calculate the number of deaths, you just do the following (where seconds is the length of your wav in seconds):

seconds * 1000 / 84

Then +/- 1 death depending on rounding issues and whatever sounds best for your wav file.

Attached is a map using death counters to perfectly loop a 46-second wav (compressed to 16 kHz, 16-bit mono). Note that the map is 400kb in size, which is fairly large but tolerable to share on Battle.net. Ideally you want your map below 500kb if you intend for others to download it in the game lobby.
A major issue with using DCs is that DCs are not based off of real time like waits. Waits are counted in real time, whereas DCS are counted in game time (frames). If you change the speed, your song will no longer loop right.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Nov 11 2014, 5:29 pm BloodyZombie117 Post #5

I have no idea what to put here... So I guess I'll just put this here.

Quote from rockz
This map should provide an example of how to use waits and DCs together to make seamless transitions. And as I load up the map and play it, I'm accosted by wait blocks, so apparently I didn't do a very good job on making the map. If anything, this just goes to show you that you shouldn't use waits since it's really easy to create wait blocks and ruin your system.

Quote from Roy
Is your music really 142 seconds long (2 minutes 22 seconds)? That sounds massive and is going to make your map size too large to be shared on Battle.net.

In any case, if it's not working and you know your switch is cleared, it's because you're experiencing wait blocks, which is why you should never use waits for background music.

The correct solution is to use death counters. What is your reasoning for not wanting to use them? They're easy and problem-free, unlike waits. To calculate the number of deaths, you just do the following (where seconds is the length of your wav in seconds):

seconds * 1000 / 84

Then +/- 1 death depending on rounding issues and whatever sounds best for your wav file.

Attached is a map using death counters to perfectly loop a 46-second wav (compressed to 16 kHz, 16-bit mono). Note that the map is 400kb in size, which is fairly large but tolerable to share on Battle.net. Ideally you want your map below 500kb if you intend for others to download it in the game lobby.
A major issue with using DCs is that DCs are not based off of real time like waits. Waits are counted in real time, whereas DCS are counted in game time (frames). If you change the speed, your song will no longer loop right.

I want to meet the people who play on Slowest or Normal game speeds.
As far as I know, most people play on Fastest. That's usually what all map makers think when they use music, DCs, or any other system in their maps.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:00 pm]
Vrael -- good map
[04:00 pm]
Vrael -- damn dude you got 27 years of playtime out of that map
[03:01 pm]
Oh_Man -- https://www.youtube.com/watch?v=JgODe0xG2Cw finished it last week lol
[01:37 pm]
Vrael -- jesus christ that was 2005?
[09:19 am]
Linekat -- cool
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[2024-4-19. : 10:41 am]
v9bettel -- Nice
Please log in to shout.


Members Online: Vrael, Roy, Dem0n, C(a)HeK