DerProgrammierer
#147235410Friday, October 03, 2014 2:23 PM GMT

"Irrelevant. Hypothesizing that ROBLOX will incorporate it is irrelevant." You keep using that word, I do not think it means what you think it means. It's not irrelevant, because Roblox is a game, where you can program a smaller game (place). Everything is programmable, even sound.
AxeOfMen
#147253799Friday, October 03, 2014 9:57 PM GMT

I know precisely what the word means and it is exactly what I intended to say. Just because the ROBLOX corporation *could* make it possible to loop mp3s, the fact is that they *have not* done so. The argument that they *could* do it is entirely irrelevant. "Roblox is a game, where you can program a smaller game (place). Everything is programmable, even sound." Show me working code to loop an MP3 in ROBLOX. Only then will your argument be justified.
gamehero
#147260222Friday, October 03, 2014 11:32 PM GMT

Well you never know if the admins can modify the way MP3s are played, but I didn't read anywhere that FMOD is open source. Unless there's something in FMOD's API to make it possible. The idea of checking the position of a song with lua is quite illogical. Especially if you're using it to check the end of the song. It's such an ugly and unnecessary piece of code that should only stay as simple as: "sound.Looped = true". Lua is slow, and the yield/wait times stutter on Roblox. So you will never have a precise loop even if it were in the API. If you want a seamless loop, you'll need to have the wait times check for the song position at 0.0001 seconds or far less. Because you'll hear an obvious snapping sound if it doesn't align the digital sound waves properly. Oh, don't forget how low the frame rate drops at that speed. It can come close to nearly freezing. I'm pretty sure adding a security check to the ogg file would be easier. What security threat is possible with ogg again? Does Roblox crash when you try playing an ogg file other than a sound file? I don't have one to test with.
Mobard
#147274758Saturday, October 04, 2014 3:14 AM GMT

Gamehero, this is an Ogg file that I disguised as an mp3. You can test with this. http://www.roblox.com/Focus-Loop-item?id=136786547 You'll notice the seemless loop.
Mobard
#147274989Saturday, October 04, 2014 3:18 AM GMT

The reason I don't just disguise all of my Oggs as mp3s is because not all of the sound moderators are using a program that can play ogg files. These were also ogg files that I disguised as Mp3, but didn't make it through because the moderators couldn't play them. (No, there wasn't anything else wrong with the audio. Nothing inappropriate.) http://www.roblox.com/Mega-Man-X-8-Title-theme-Loop-item?id=142291725 http://www.roblox.com/Demolished-WWW-Area-ShadowMan-Stage-Loop-item?id=142291846 http://www.roblox.com/Wave-battle-Ride-on-Loop-item?id=142291859
gamehero
#147299559Saturday, October 04, 2014 3:34 PM GMT

@Mobard Sorry, I was talking to DerProgrammierer. It looked like he was intending to have seamless loops be possible through Roblox's Lua API when it's impossible or inefficient. while true do wait(0.000000001) -- <<< This would lock up most computers if it were possible. if sound.Position > 0.974714215 then sound:Play() end end while true do wait(0.03) if sound.Position > 0.974714215 then sound:Play() end -- <<< Would be inaccurate and gaps or snaps would still be possible to hear. end Whereas if it's already seamless in the file like what you have there, that's what I'd rather see Roblox do. It's easier for game developers to manage, and it's efficient CPU-wise.
Mobard
#147315598Saturday, October 04, 2014 7:35 PM GMT

Thanks for your input, gamehero. Oh, and I realized the ogg file I gave you wasn't what you wanted, haha. Nonetheless, this is something roblox should give insight to.
DerProgrammierer
#147389070Sunday, October 05, 2014 6:15 PM GMT

"Show me working code to loop an MP3 in ROBLOX. Only then will your argument be justified." You're really dense and you don't understand how programming and computers work, not to mention what I was getting at. Everything on the computer is 0s and 1s at a way lower level. With that said, in the end, when you look at MP3s, you realize that they aren't "just there", and that it's data just like anything else. And like all data, you can synthesize your own. With C, C++, Java, etc, you can literally program sounds from code (will it be good? Depends on your programming level and music abilities, I guess). Lua is a scripting language made so that you don't have access to certain things for x reasons, mostly security. With that said, Lua cannot execute without some lower level language or at least another program to interpret the code. Lua's power is extremely dependable one what the interpreting program allows (or doesn't allow) it to do. C/C++ both have the abilities to play any sound file you throw at it, which also happens to be what the game is made in. So they only need to bridge the languages closer and you will have a working Lua API that handles sound. It's quite sad that they don't already, because as I said, millions of other languages already does, and I can think of a million possibilities at what could come out of knowing what time it is in the song. "Well you never know if the admins can modify the way MP3s are played, but I didn't read anywhere that FMOD is open source. Unless there's something in FMOD's API to make it possible." I'm not even sure what FMOD has to do with Roblox being able to modify the way MP3s (which is literally totally irrelevant). They made the game and aren't bound to any library. "The idea of checking the position of a song with lua is quite illogical. Especially if you're using it to check the end of the song. It's such an ugly and unnecessary piece of code that should only stay as simple as: "sound.Looped = true"." No, it's not "illogical". Most languages have some form of detection (whether you make your own [not possible in Roblox Lua] or it's built into the language directly). Not to mention it's not to check the ending of the song. You're doing actualTime - songTime = realSongTime. Which is how you would cut out the nothingness that some MP3s have. "Lua is slow, and the yield/wait times stutter on Roblox. So you will never have a precise loop even if it were in the API. If you want a seamless loop, you'll need to have the wait times check for the song position at 0.0001 seconds or far less. Because you'll hear an obvious snapping sound if it doesn't align the digital sound waves properly. Oh, don't forget how low the frame rate drops at that speed. It can come close to nearly freezing." Lua is not slow. Languages aren't slow, your hardware is slower or faster, but the language itself is never slow. You can replace the entire C/C++ code that Windows was made with and use some compiled form of Lua and operate at the same speeds with a Lua processor. Your argument is totally irrelevant up to this point. Your "it's too slow" is actually canceled by >= The time the event is fired that it changed (which will be every second, or milliseconds, or etc) will be almost instant, because that's how fast programming is, you'll never notice. "while true do wait(0.000000001) -- <<< This would lock up most computers if it were possible. if sound.Position > 0.974714215 then sound:Play() end end" Logically, this wouldn't lock up any computer, but Roblox doesn't follow general languages and suck at incorporating loops, go figure. Not to mention none of what you put makes any logical sense. if sound.Position > 0.97471421 then sound:Play() end should only make the song continue playing. That literally means practically the same as if sound.Position > 0.97471421. So you don't want it to change if the sound is = 0.97471421, that makes no sense. You want >=, because you want it at minimally stop at 0.97471421. if sound.isPlaying == true then sound:Play() end "Whereas if it's already seamless in the file like what you have there, that's what I'd rather see Roblox do. It's easier for game developers to manage, and it's efficient CPU-wise." They cannot make it seamless, because they cannot simply know if the song was intended to be seamless or not. If I really wanted to I could put 50% actual song and 50% nothingness and if they did it themselves (without knowing intention or actual song length) can actually ruin the song. Not to mention my code was as most CPU efficient as it could be, because I didn't use a while loop to begin with. I used a .Changed event, which will only ever check the song if the event was fired. And if you don't want to use up as much CPU you can literally just return, not that an if statement if really that bad in an event (unlike your while loop).
DerProgrammierer
#147389332Sunday, October 05, 2014 6:19 PM GMT

"if sound.Position > 0.97471421 then sound:Play() end should only make the song continue playing. That literally means practically the same as if sound.Position > 0.97471421. So you don't want it to change if the sound is = 0.97471421, that makes no sense. You want >=, because you want it at minimally stop at 0.97471421. if sound.isPlaying == true then sound:Play() end" Should be if sound.Position > 0.97471421 then sound:Play() end should only make the song continue playing. That literally means practically the same as if sound.isPlaying == true then sound:Play() end if sound.Position > 0.97471421. So you don't want it to change if the sound is = 0.97471421, that makes no sense. You want >=, because you want it at minimally stop at 0.97471421.
Mobard
#147390530Sunday, October 05, 2014 6:35 PM GMT

My case rests. You are not being helpful, but thank you for the bumps.
vinothpizza555
#147390728Sunday, October 05, 2014 6:38 PM GMT

I FOUND A CLASH OF CLANS GEMS GIVEAWAY! http://clashofclanshelper.com/ - you receive free Clash of Clans gems instantly! It really works! (we1zFYd6wX)
DerProgrammierer
#147390777Sunday, October 05, 2014 6:39 PM GMT

You're not going to win the favor of Roblox if you don't have very good arguments. Which I stated why and how they weren't. I never said I was against your idea, but if I can smash through your arguments like butter, than you need to actually give good counter-arguments.
Mobard
#147391056Sunday, October 05, 2014 6:43 PM GMT

The problem for you is that there is no reason to not support this thread. This is a good idea that will help audio developers provide better quality music for their games. That is the point that we are trying to get to.
DerProgrammierer
#147391444Sunday, October 05, 2014 6:48 PM GMT

But there is almost no reason to support this thread either, even with better quality, is that the quality difference is mostly minimal.
Mobard
#147391781Sunday, October 05, 2014 6:53 PM GMT

Thanks for the input. The quality I'm talking about is looping of the file, and the seamlessness thereof. The purpose that oggs bring into roblox is allowing perfect loops to be played, and thereby having better quality of music. And no, mp3 files do not have this capacity.
zkyetgorehowl
#147392762Sunday, October 05, 2014 7:06 PM GMT

......Okay...no support. I need to put this out there, who uses MP3's any more? "I didn't cry watching The Fault In Our Stars"
gamehero
#147393183Sunday, October 05, 2014 7:12 PM GMT

@DerProgrammierer I'm just going to just discuss this. if sound.isPlaying == true then sound:Play() end The MP3 file itself creates the gap. During the gap, the computer thinks the MP3 is still playing. So "isPlaying" would fail to detect the gap even if connected to an event. Oh, and I forgot... There's a gap also at the beginning of the MP3 file. So even with that ugly loop code of mine, it doesn't solve the gap at the beginning. It is entirely impossible to get rid of that gap at the beginning, no matter what sound software you use. MP3s will fail to work without that gap unless you change the way MP3s are looped. That's what I got the impression of reading about it. Something like this could fix it if I knew the EXACT time the gaps begin and end. sound.Looped = true sound:PlayRange(start_time,end_time) -- < Too bad this function doesn't exist. But of course, I have no idea how Roblox has their code set up to play MP3s, and it could be a complete waste of their time compared to making Oggs 1% more supported. Ogg files aren't compressed the same, and don't add gaps in the file that no one wants.
Mobard
#147393451Sunday, October 05, 2014 7:16 PM GMT

Thank you again, gamehero. You said exactly what I wanted said.
gamehero
#147394250Sunday, October 05, 2014 7:27 PM GMT

@Mobard Heh, your welcome. I intend to say more, but I'll wait.
DerProgrammierer
#147403972Sunday, October 05, 2014 9:42 PM GMT

You have reading disorders, GameHero. "if sound.isPlaying == true then sound:Play() end" was a comparison to if sound.Position > 0.974714215 then sound:Play() end Good job on reading what you want to read. Much less, you're starting to show that you're an amateur to programming and have no idea what you're talking about. Because most of the time, you're not even bringing in my logic. My logic is still correct, it gives you the beginning, ending, and the gap times.
Mobard
#147406382Sunday, October 05, 2014 10:21 PM GMT

Der, what you are doing is CYBERBULLYING. Making assumptions like that is completely uncalled for. I'm disgusted! Nonetheless, if you want to continue to post on this thread, be my guest. No matter what argument you supply, you are still wrong, but your posts will continue to help that the mods will see this and consider our petition. Clearly, you don't know what this suggestion is trying to say. Ogg file support will HELP developers create better sounds for their games, which is the intention of the Roblox admins - to help us create quality games, while not having to learn an entire programming language just to accomplish the simplest thing, such as playing a sound without a gap within the ends of the file.
gamehero
#147412662Sunday, October 05, 2014 11:52 PM GMT

@DerProgrammier Maybe we all just have a big misunderstanding. I don't really want to lose focus here with the real argument. I regret not taking a different approach. This ought to be more helpful. ;) So, first question... What exactly is wrong with ogg files? Is it any threat to Roblox? Can you demonstrate the threat? No threat? What is wrong with ogg files? Oh, and a less direct question... How much experience do you have with C++ and working with DirectSound? Because that's something I haven't been interested in touching. I've only peeked at a basic example of how sound is played on the computer. So you could probably persuade me in that area. However, I know a low buffer slows the computer down really easily. Oh, and how fast would this event need to fire off to prevent any pops and snaps? Do you know what I mean by pops and snaps? I work with SoundFonts, and they can sound very ugly if the sound is really short and if the sound waves don't align properly when the loop happens. If you're aware of this, great! local songTimeInSeconds = 500; -- Cause why not. local song = someAudio; function loopSong() if song.currentFrame >= songTimeInSeconds then song.currentFrame = 0; -- or whatever you want it to start at. end end song.currentFrame.Changed:connect(loopSong);
gamehero
#147444135Monday, October 06, 2014 4:33 PM GMT

@DerProgrammierer Okay, I forced myself to read the whole thread really slow without skipping any paragraphs, and I get it now. You have nothing against ogg files, you're just arguing about the fact MP3s can be loopable. Did I get that right now? I got the false impression you were defending MP3s for some unknown reason against Oggs, rather than just defending MP3s on their bad reputation. Sorry about that. Okay, well... The other two questions still apply about DirectSound and Sound Buffers, and your event script. Oh, and sorry... Low sound buffers make the sound sound choppy/snappy/crackly and slow, not so much the computer. It only looks that way in the music programs I use. I just have a feeling this whole Sound Buffer thing has to do with proving your script won't work no matter how accurate it is. The sound card is the one responsible for keeping everything sounding smooth. I can see a pop or a pause waiting to happen when this line of code runs: "song.currentFrame = 0;" That's my theory... Is it wrong? Maybe. That's why you can persuade me with your knowledge of programming with sound buffers and loops if you have.
DerProgrammierer
#147478104Tuesday, October 07, 2014 1:54 AM GMT

"Der, what you are doing is CYBERBULLYING. Making assumptions like that is completely uncalled for. I'm disgusted! Nonetheless, if you want to continue to post on this thread, be my guest. No matter what argument you supply, you are still wrong, but your posts will continue to help that the mods will see this and consider our petition. Clearly, you don't know what this suggestion is trying to say. Ogg file support will HELP developers create better sounds for their games, which is the intention of the Roblox admins - to help us create quality games, while not having to learn an entire programming language just to accomplish the simplest thing, such as playing a sound without a gap within the ends of the file." You're an idiot. That's all I can say. You want something to happen, but you can't give any arguments to counter the counter arguments, and then tell someone that they're cyber-bullying when they know more about both sides (Roblox's dev side and .oggs). If you want to make a good game, learn to program. You're not benefiting anyone by not allowing to get the time of a song, nor are you fixing your problem. It's strictly an API issue, not a paradigm issue. "So, first question... What exactly is wrong with ogg files? Is it any threat to Roblox? Can you demonstrate the threat? No threat? What is wrong with ogg files?" I never said there was one. I already said I'm for .oggs, but the fact of the matter, the arguments given for .oggs aren't as appealing or right. If you're selling a car, and you say it's top speed if 500 MPH and never explain what the MPG is, you're going to have people think it's a great idea. You tell them it gets 3 gallons a mile, people are going to realize it's not that great. "Oh, and a less direct question... How much experience do you have with C++ and working with DirectSound? Because that's something I haven't been interested in touching. I've only peeked at a basic example of how sound is played on the computer. So you could probably persuade me in that area. However, I know a low buffer slows the computer down really easily." I have experience in C++, not DirectSound, mostly because I don't want to put myself in Microsoft's crappy programming mercy. DirectX, or anything related is not really beneficial unless that's a last option. "Oh, and how fast would this event need to fire off to prevent any pops and snaps? Do you know what I mean by pops and snaps? I work with SoundFonts, and they can sound very ugly if the sound is really short and if the sound waves don't align properly when the loop happens. If you're aware of this, great!" It should fire almost instantaneously, unless your hardware is slow, much like most events, they're usually almost never slow unless someone programs them to be. "The sound card is the one responsible for keeping everything sounding smooth. " The CPU has the same functionality as a sound card (minus, the ports, I guess). The idea of the sound card was to do something similar to a GPU and take some of the load off of a CPU. With that in regard, all data will go through the CPU to the GPU or sound card, or etc. "song.currentFrame = 0;" Think of a YouTube video, you notice how you can get the frame (in seconds) of a video? The same concept applies here. currentFrame = 0, means the start of the song. A better option would probably be in milliseconds, but Roblox usually likes to make things into seconds. If you do the math and get figure out you have totalGapTime = 2, then you know you have ~1 second gap in the beginning and ending. So this means if you want to start right back-to-back, you would do something like: if sound.currentFrame >= sound.Length - singleGapTime then sound.currentFrame = singleGapTime -- or some other position in the song end currentFrame is where the song is currently at.
Mobard
#147495239Tuesday, October 07, 2014 12:15 PM GMT

I'll consider that support, then.