Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Question about music  (Read 1135 times)

0 Members and 1 Guest are viewing this topic.

Zhello

N.A.D.I.
Question about music
« on: March 22, 2009, 12:48:44 am »
  • L'homme avec beaucoup de noms.
  • *
  • Reputation: +6/-1
  • Offline Offline
  • Gender: Male
  • Posts: 925
I want my music to loop instead of stopping then restart again, is there any way to make that music go on without stopping and restarting?  :huh: :huh:
Logged
The IT Guy
Intermediate Coder
Linux is a wonderful thing
~Linkwolf48/Gumstone1080~

The Legend of Zelda - New Beginnings

http://zfgc.com/forum/index.php?topic=34986.0
1.6 Demo -
https://www.dropbox.com/s/56km0iadaras56g/LoZNB%20Game%20Folder.rar?dl=0


Side Projects:

Dragon Diary - Cybernetic Threat
Story: http://wiki.zfgc.com/Cybernetic_Threat

Quote
Aero88
ZFGC is like the Hotel California.  You can come in but you can never leave!

devianart: http://linkwolf48.deviantart.com/

Xiphirx

wat
Re: Question about music
« Reply #1 on: March 22, 2009, 12:52:17 am »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
Well, judging from your post, you may want to edit the music file itself so that it is loopable, as in it doesn't "stop and restart".

Or,

you can play the first part of a song (don't loop it), then play a loopable part of the song and loop that.

Of course, this information comes from my understanding of your post...
Logged
  • For The Swarm
Re: Question about music
« Reply #2 on: March 22, 2009, 01:18:43 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
This isn't advice about the music, Xiphirix has covered that, but you have posted a lot of topics in Discussion with questions about how to do things or requests for things to be done and/or given to you. Such a rush will not help you for a multitude of reasons.
Logged
Re: Question about music
« Reply #3 on: March 22, 2009, 05:02:50 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
Questions:

What program are you using?

Is it a coding problem? or is it actually the music itself?
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Re: Question about music
« Reply #4 on: March 22, 2009, 08:43:09 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 860
I've always kind of wondered about this myself.
There's 3 possible options I've thought of, though I'm not sure which is generally used, or if I'm way off track...

1) "MIDI". Console systems such as the SNES or N64 had their own soundcard in the system which generated sounds to be played on something similar to midi tracks. What probably happened is these signals are simply repeated at set points, allowing for an infinitely long loop of music.

2) The audio is cut and timed with extreme precision so that the original audio file is precisely long enough that when coded to perform a simple "loop" by playing the song again after finishing, it sounds like there is no gap in the music. I've always thought this to be a terrible way to do things, and I don't know if it's used, but it has too many flaws. If the song loads again too slow it won't be on time, and if it's not cut at the precise millisecond AND at a point where there won't cause any strange audio side effects, the beat of the song won't carry through. Lastly, most songs tend to have a short intro, and then a looping part of a song. Seems like more work than necessary to create 2 separate sections (ie. intro and looped segment)

3) The song is kept in memory constantly until it needs to stop. Then when the song is nearing the end, it is played again while the other instance of it finishes playing. This would also be hard to time, and it just seems inefficient.

So basically, I don't know how it's done in professional games. Audio glitches in regards to looped music in those is almost nonexistent or very subtle.
« Last Edit: March 22, 2009, 08:45:34 am by Q.K. »
Logged
Re: Question about music
« Reply #5 on: March 22, 2009, 01:39:29 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
It might be a good idea to look into loop points. Several different audio formats support defining sections within a track that automatically loop.
Logged
Re: Question about music
« Reply #6 on: March 22, 2009, 04:34:19 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
@QK: I think they do it this way: suppose you have a song that loops the parts as "ABABABAB...". They would make a "MIDI" of "ABAB", record it, and separate "A" from "BA" from "B". But in a way they cut the soundwave in the exact same position (I don't know how it's done with MP3, but with WAV it's simple, you just need to code a simple software to compare the soundwaves and cut in the right time. As it was recorded from a "MIDI", the loop should be identical to the original part), so that there will be no gap. Then they delete the "B" file, use the "A" file to start it and the "BA" file to loop it. In a "ABCBCBCBC..." song, they would play "ABCBC" and cut "AB" "CB" "C", using "AB" to start and "CB" to loop.

^ That's just an idea though, I don't know if they do this way really.
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.222 seconds with 48 queries.

anything