Music loops

Moderator: GZDoom Developers

Post Reply
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Music loops

Post by Apothem »

Recently, since I've been messing around with a bit of music for the RPG Engine, I noticed something. There is no way to define wether or not music loops on the title screen or levels. For example, say you want to make a really strong ambience to a level, and only want music to play once around and not loop. you cant do that. When you want to add a simple mp3/wav that you only want to play once on the title screen, it will continuously loop. I believe there should be a way, either via MAPINFO or a different lump, to define if the song is looped, or how many loops the song should have.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Yeah, it's been asked for before. At present, there is no easy or satisfactory solution.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

Enjay wrote:Yeah, it's been asked for before. At present, there is no easy or satisfactory solution.
Hence, why I asked it again :P I think there's got to be an easy way to implement such a feature, I'm just curious as to how many people would find such a feature useful?
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

I would certainly use it if I had the chance. This has been bothering me for a while as well. :P
User avatar
Killo Zapit
Posts: 292
Joined: Wed Jul 16, 2003 9:26 pm
Location: Most likely sleeping.

Post by Killo Zapit »

You can make non-looping mods pretty easily (C?? effect and B?? effect), and you could just import a wave as an instrument and play it once if you want.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

But for people with limited/ no mod programming knowledge that's not easy (which is where the "no easy... solution" part of what I said comes in). But yes, that is a possibility.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

If it's a TITLEMAP, would it not be possible to place a sound object at the same coordinates as the camera and play the sound only once?
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Not if the camera is moving, and why not just ThingSound() on the camera itself?
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Killo Zapit's suggestion works just fine, except if you're using MP3s/OGGs (or even MIDIs, for that matter). I would personally love a way to have a song play only once, and stuff.

I wonder if it's at all possible to add an ACS command that checks to see whether a given song is finished playing or not... then it would be possible to automatically start a different song once the current one is completed. Of course, that's wishful thinking, really.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

With music, I think Zdoom only registers changes in music - notice how if you idclev to the map you are on the music doesn't restart. Same thing happens if two levels with seamless transition (eg HUB) use the same music. So obviously that would have to be changed before Zdoom could remember how far through a song it was.

What would happen if you played a sound as a song between saves? Would Zdoom remember how far through the sound it was or would it just register this sound has been played and therefore not play it when you loaded a save?
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

The problem isn't really making something play once then- the problem is getting ZDoom to know that it's playing at the moment and where it's playing it from given a save point or pause.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”