generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Smooth Sound loop script

Previous Thread :: Next Thread 
Seriphus is not online. Seriphus
Joined: 05 Dec 2008
Total Posts: 9267
09 Apr 2014 09:47 AM
In short, im making a starship with some cool ambient sound. I need a 1 second mp3 track to repeat over and over smoothly.

I'm a builder not a scripter, so i need help inserting this code too.

Thanks.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
09 Apr 2014 09:53 AM
You need a one second looping track without gaps, then


while wait(1) do
path.to.audio.track:Play()
end


into a script anywhere.
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
09 Apr 2014 11:09 AM
It could be made much smoother if the IsPlaying property was fixed >.>

Sound = --Idk you tell me
Sound:Play()
Sound.Changed:connect(function()
if (not Sound.IsPlaying) then
Sound:Play()
end
end)

But the IsPlaying property only changes when you call :Stop() on the sound, not when the sound finishes playing.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
09 Apr 2014 11:11 AM
Yeah, I guess. For now just get a really accurate time reference on whatever sound you're looping.
Like open it in audacity and down to milliseconds accurate time reference.
Then loop as shown in my above post.

Musicians will hear a 3ms gap or less in audio that's looped, and it's something that bugs 'em. (I'd know, I'm a piano player, therefore a musician).

--Shira
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
09 Apr 2014 11:14 AM
I didn't think about this
Use the .Looped property

Would still be nice if the .IsPlaying was fixed.
Report Abuse
Crakkitty is not online. Crakkitty
Joined: 25 Dec 2009
Total Posts: 17408
09 Apr 2014 11:56 AM
"while wait(1) do
path.to.audio.track:Play()
end "

This would play the audio in an overlap over each other. My recommendation is just having path.to.audio.track:Play() and have the audiotrack's looping property set to true.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image