fade in/out when play/stop sound ?

Matmine
New member
 
Posts: 1
Joined: Sat Jul 25, 2015 13:56

fade in/out when play/stop sound ?

by Matmine » Sat Jul 25, 2015 14:14

Hi all,


I'm looking for a way to get a fade in when playsound et and fade out when stopsound, can i achieve this with lua scripts or differently ?

thanks !
--
Matmine
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: fade in/out when play/stop sound ?

by Krock » Sat Jul 25, 2015 14:40

You can't modify the played sound with Lua, use AudaCity or any other music editor.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: fade in/out when play/stop sound ?

by BrandonReese » Sat Jul 25, 2015 16:18

Matmine wrote:Hi all,


I'm looking for a way to get a fade in when playsound et and fade out when stopsound, can i achieve this with lua scripts or differently ?

thanks !
--
Matmine


Nope, you would have to do what Krock suggested and add fades to the beginning and end of your sound, but that doesn't help if it needs to stop in the middle and fade out.

I added fading to the client side sounds in my fork but I had to modify the openal class. So it's possible with modifications to the engine. It would be a nice thing to have on the lua side, something that could be used instead of playsound and stopsound.

minetest.fadeinsound("sound")
minetest.fadeoutsound("sound")
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: fade in/out when play/stop sound ?

by BrandonReese » Sun Jul 10, 2016 05:18

I created a pull request that would add fading sounds in and out to the modding api.

https://github.com/minetest/minetest/pull/4304
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 9 guests

cron