[Mod] Immersive Sounds [.36] [ambience]

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Fri Sep 07, 2012 11:53

Echo wrote:two things:
1. Use the correct node-name: "default:water_source" not "default:water"
2. you can shorten your function:

Thanks Echo and Temperest! It works, It was water_source. But I might need to keep my code the way it was because I don't want to look for a whole square. I want to search as far out as possible in a small straight line in all four directions because that requires the searching of the least number of nodes. I'm hoping that will make my code more efficient, but you only have 1 search and I have 4, so that might make yours more efficient. I could change my code to 2 searches, 1 for each line. Hard to know which chews fewer cycles.

Your code searches
************
************
************
*****P******
************
************
************
Mine searches

*
*
*
*****P******
*
*
*
Last edited by Neuromancer on Fri Sep 07, 2012 11:59, edited 1 time in total.
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Fri Sep 07, 2012 16:16

So you don't get the ocean top left to you :-)

Besides, I would check if the ocean isn't to deep under you. I mean you could stand on a cliff about 40 nodes over the ocean. You would probably hear wind but not the ocean.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 08, 2012 02:30

Echo wrote:So you don't get the ocean top left to you :-)

Besides, I would check if the ocean isn't to deep under you. I mean you could stand on a cliff about 40 nodes over the ocean. You would probably hear wind but not the ocean.

Hmm,

I tried your method along wtih the following call.

if pos.y < 5 and atleast_nodes_in_t(pos, 60, -2, "default:water_source", 1500 ) then

I liked how it was pretty good at being able to detect oceans accurately, better than my method but it seemed kind of laggy. I'll keep playing around with this. But I'm not sure we're going to find something that can detect an ocean without being too laggy.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 08, 2012 14:23

This is really weird. I wanted to see what y (height) position the top of the water was at. So I kept on increasing the y value in the min and max position used in the find_nodes_in_area function. But even when I set y to 10, it was finding lots of watersource nodes, even when I knew the water didn't go above 0.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    minp = {x=pos.x+10,height, z=pos.z}
    maxp = {x=pos.x+search_distance,height, z=pos.z}
    nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name)
    minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")")
    if #nodes >= threshold then



Another strange thing is that if I would stand in a place, it would give me one result, then I would walk 10 blocks away and come back and the value of watersource nodes would decrease by 10, even though I knew the 10 extra water source nodes really were there.

These weird results really cause the beach sounds to stop and restart way more than I would like.
Last edited by Neuromancer on Sat Sep 08, 2012 14:23, edited 1 time in total.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Sep 08, 2012 14:30

Er, you seem to be adding values to the x position, not the y position. Perhaps that is the issue?

Also your position is missing a y= definition. I'm pretty sure that's invalid.
Last edited by Temperest on Sat Sep 08, 2012 14:32, edited 1 time in total.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 08, 2012 15:25

Temperest wrote:Er, you seem to be adding values to the x position, not the y position. Perhaps that is the issue?

Also your position is missing a y= definition. I'm pretty sure that's invalid.

Thanks much, the y= solved the water at 10 height. I think I have a pretty good algorithm now. It still finds sea too often, but it doesn't chop off the sound nearly as much. It searches by using a tic-tac-toe grid.

* *
* *
* *
******************
* *
* *
* P *
* *
******************
* *
* *
* *
* *
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all

local atleast_nodes_in_t = function(pos, search_distance, height, node_name, threshold)
    counter = counter +1
        minetest.chat_send_all("counter: (" .. counter .. ")")
    minp = {x=pos.x-search_distance,y=height, z=pos.z+20}
    maxp = {x=pos.x+search_distance,y=height, z=pos.z+20}
    nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name)
    minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")")
    if #nodes >= threshold then
        return true
    end
    totalnodes = #nodes
    minp = {x=pos.x-search_distance,y=height, z=pos.z-20}
    maxp = {x=pos.x+search_distance,y=height, z=pos.z-20}
    nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name)
    minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")")
    if #nodes >= threshold then
        return true
    end
    totalnodes = totalnodes + #nodes
    maxp = {x=pos.x+20,y=height, z=pos.z+search_distance}
    minp = {x=pos.x+20,y=height, z=pos.z-search_distance}
    nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name)   
    minetest.chat_send_all("z-Found (" .. node_name .. ": " .. #nodes .. ")")
    if #nodes >= threshold then
        return true
    end
    totalnodes = totalnodes + #nodes
    maxp = {x=pos.x-20,y=height, z=pos.z+search_distance}
    minp = {x=pos.x+20,y=height, z=pos.z-search_distance}
    nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name)   
    minetest.chat_send_all("z+Found (" .. node_name .. ": " .. #nodes .. ")")   
    if #nodes >= threshold then
        return true
    end
    totalnodes = totalnodes + #nodes
    minetest.chat_send_all("Found total(" .. totalnodes .. ")")
    if totalnodes >= threshold*2 then
        return true
    end   
    return false
end

if pos.y < 7 and pos.y >0 and atleast_nodes_in_t(pos, 60, 1, "default:water_source", 51 ) then  --found sea.
Last edited by Neuromancer on Sat Sep 08, 2012 16:40, edited 1 time in total.
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Sat Sep 08, 2012 19:00

Sorry, but your last minp is wrong. It should be -20 at the x-position.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 08, 2012 19:49

Echo wrote:Sorry, but your last minp is wrong. It should be -20 at the x-position.

Heck no need to be sorry. Thanks for finding that!
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Sat Sep 08, 2012 22:16

For some reason, it causes ERROR: COULD NOT EMERGE PLAYER if players don't join EXACTLY when the server launches. Love it to death for singleplayer, just not ready for multi.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 08, 2012 22:49

tinoesroho wrote:For some reason, it causes ERROR: COULD NOT EMERGE PLAYER if players don't join EXACTLY when the server launches. Love it to death for singleplayer, just not ready for multi.

I play multi player all the time with Immersive Sounds and haven't had this problem. What version of MT and this mod are you using? Based on your signature are you running Linux? Are they eventually able to join if they leave it trying to connect long enough?
Last edited by Neuromancer on Sat Sep 08, 2012 23:04, edited 1 time in total.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Sat Sep 08, 2012 23:08

I'm running 0.4.3 on my Linux box (Ubuntu 12.04 x64). I can tell that they won't connect because their client has this weird "teleporting theme" sound going to town on their speakers. Neat effect, by the way. We usually just reboot until the timing is _just right_. Also, teleporting them to 0,20,0 usually works.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Sep 09, 2012 02:21

tinoesroho wrote:I'm running 0.4.3 on my Linux box (Ubuntu 12.04 x64). I can tell that they won't connect because their client has this weird "teleporting theme" sound going to town on their speakers. Neat effect, by the way. We usually just reboot until the timing is _just right_. Also, teleporting them to 0,20,0 usually works.

That teleporting sound kind of reminds me of one of the first versions of the mod I was working on where a bug made the howling wolves go crazy on startup so there were a thousand or so of them howling all a microsecond one after the other. It definitely got your attention.

What version of the mod are you using? Have you tried a few different ones? I'm on windows 7 & vista but have mostly been running .4.2 rc1 for multiplayer. I will upgrade the rest of my machines to .4.3 and try it on my end. If you get rid of the mod everything works fine?

Is anyone else having troubles or success with this Mod when doing Multiplayer? What O/S are you using?
Last edited by Neuromancer on Sun Sep 09, 2012 02:22, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Sep 09, 2012 11:32

tinoesroho wrote:I'm running 0.4.3 on my Linux box (Ubuntu 12.04 x64). I can tell that they won't connect because their client has this weird "teleporting theme" sound going to town on their speakers. Neat effect, by the way. We usually just reboot until the timing is _just right_. Also, teleporting them to 0,20,0 usually works.

When I run multi-player, it's my family, and so we are all directly connected to the same LAN. So let me ask you this: Are your friends connecting in your house or are they connecting remotely over the internet? My guess is that it's remotely. Then what might be happening is that your server is sending all the sound.ogg files over an internet connection which is slower. Then the reason the server is saying "Cannot emerge player" is that it is timing out. And the reason it works if you are starting up the server the same time they are logging in is that the server is a little busy getting itself or its own client going and so the timeout is somehow extended because of the server being busy. My guess as to the reason you are getting the strange sound when they try to emerge is that usually when I start my own client, it seems to be running the mod for a little while before it fully starts up, and so the random sounds get queued up while waiting for the client to emerge, and thus I hear more random sounds than usual when I start. Since your connection is slower, even more of them get queued up.

Solutions:
-try this, temporanily remove more and more of all the larger. ogg files from your ambience\sounds folder until it works, to confirm this is caused by a timeout and slow loading of client over remote connection.

-Does anyone know how to bump up the timeout for player emerge?
-Can anyone help me change the code to prevent/delay the stacking up of sounds that occurs while the client is getting loaded?
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Mon Sep 10, 2012 15:47

I use a LAN myself; Adhoc is lousy and over the net laggy. It does look like the many oggs were bogging down the loading/caching/queueing/log-in.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Tue Sep 11, 2012 00:56

Dunno if audacity exists for win, but you could compress the oggs using the quality setting during export.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Tue Sep 11, 2012 01:35

tinoesroho wrote:I use a LAN myself; Adhoc is lousy and over the net laggy. It does look like the many oggs were bogging down the loading/caching/queueing/log-in.

What's Adhoc? What version of this mod were you using? Did you delete some .oggs and the problem went away?
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Tue Sep 11, 2012 01:38

mauvebic wrote:Dunno if audacity exists for win, but you could compress the oggs using the quality setting during export.

I compressed many of the .oggs using Audacity for Windows from 16.5 meg down to 9meg total. However they could be compressed further. I just didn't want to sacrifice sound quality, but I am kind of finicky. However there is Audacity for Linux, so if anyone wants to go that route then this is an option. I don't have a problem with Multiplayer on Windows for this Mod.
Last edited by Neuromancer on Tue Sep 11, 2012 02:38, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Mon Sep 17, 2012 00:46

EDIT: Figured it out:
local player = minetest.env:get_player_by_name(name)
ambiences = get_ambience(player)

To allow players to set the volume of ambient sounds and music relative to each other and the rest of the game sounds while the game is running, I need to do the following:

I'm trying to get the player who issued a chat command and pass that as a parameter to a function. How do I get the player who issued the chat command?


minetest.register_chatcommand("svol", {
params = "<svol>",
description = "set volume of sounds, default 1 normal volume.",
privs = {server=true},
func = function(name, param)
SOUNDVOLUME = param
ambiences = get_ambience(player)
minetest.chat_send_player(name, "Sound volume set.")
end, })
Last edited by Neuromancer on Mon Sep 17, 2012 02:19, edited 1 time in total.
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Mon Sep 17, 2012 10:32

Suggestion: Is it possible (in reasonable time) to detect the distance to desert or ocean? If so, it could be nice to auto-adjust the sound-volume by the distance. When you're far away from the ocean it's a quiet sound, when you're at the shore, it has full volume.
 

User avatar
Phitherek_
Member
 
Posts: 112
Joined: Thu Aug 23, 2012 16:17

by Phitherek_ » Mon Sep 17, 2012 10:41

No problems on multiplayer to the 0.4.2-rc1 version. Multiplayer over the Internet. Two to three players on the server.
---
Posted by Phitherek_
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Mon Sep 17, 2012 23:16

Echo wrote:Suggestion: Is it possible (in reasonable time) to detect the distance to desert or ocean? If so, it could be nice to auto-adjust the sound-volume by the distance. When you're far away from the ocean it's a quiet sound, when you're at the shore, it has full volume.


This should be somewhat do-able, maybe not to the degree you are looking for, but the ocean search routine does do a count of water nodes found in a tic-tac-toe grid. The more water nodes it finds, the louder the volume could be, but the distance wouldn't be that far out. The only thing is that the way the engine is written you are only allowed to play one ambience at a time. So you couldn't say play regular birds while you are playing quiet ocean at the same time. The same could be done for lava and waterfall and desert.

EDIT: One serious difficulty is this, once a sound starts playing, you can't adjust the volume for the whole while that .ogg is playing, and the beach waves is a very long .ogg file. You could break it up into a bunch of little ogg files, one for each wave, but then the sound might be really choppy. It would take a lot of playing around. I think what you would need is to have a number of wave sounds all playing simultaneously so they might blend together, but you might hear more clicks that way, hard to say without trying it.

If anyone knows of a way round these issues, let me know. This is an awesome idea, and one that I kicked around a bit when seeing the count of nodes I was searching for varying as I walked around in debug mode. But it would require taking this Mod to a whole new level to do really well.
Last edited by Neuromancer on Tue Sep 18, 2012 02:30, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Thu Sep 20, 2012 02:33

There was a bug in .29 & .30 where it detected flying too often when jumping around on the ground. This was fixed in .31, but I want to know what you all think of it. I was uncertain if it should have been added in the first place because it is not a sound you normally hear in the environment, but then it also is not normal for people to be able to fly either. Is it something you like or is it stupid and annoying even after the bug fix?
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Thu Sep 20, 2012 12:40

I have more thoughts on adjusting sound volume by distance from source:

-since we can do more than 1 sound at a time (example waterfall1 & waterfall2), we should be able to put as many sounds as we like in the array.
-Instead of passing {waterfall=waterfall"} into our table of ambiences to play we could pass waterfall=.5 (the gain)
-since we can't adjust the gain while a sound is playing????? We can break the sounds up into smaller chunks, and if they lose their smoothness, layer them like waterfall so there is always something playing.
-How hard would it be to use directionality of sounds?
-the biggest issue will be far searching (searching for faraway sounds, as this will greatly increase the processing power required. Maybe break into 2 groups, sounds you would hear far away (waterfall & beach), and sounds you wouldn't (cave).

Does anyone know if the gain/volume of a sound can be adjusted while it is playing?
Last edited by Neuromancer on Thu Sep 20, 2012 12:41, edited 1 time in total.
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Thu Sep 20, 2012 14:13

Stupid question, but why don't you use abm's and play the sound at a node (e.g. leaves for birds)?
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Fri Sep 21, 2012 23:07

That's not a stupid question at all. It's definitely something worth playing around with to see if it works well. Thanks for suggesting it! I was going to look into directionality for sounds, and this may be the way to get there anyway.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Wed Sep 26, 2012 02:12

This is so awesome!

Øystein Ramfjord (creator & producer of Amethystium) has agreed to let me add his music to the Mod:

"Thanks for the compliment. I can't give you a formal license (legal paperwork) for it, but as long as it's non-commercial I can give you my personal blessing and guarantee that you won't get in trouble for using it :) If that's enough just feel free to use any of my tracks. Please credit the music properly though, and include a link to www.amethystium.com and www.am.mu (it's the same site right now, but the latter will be a label/music store site soon).

Best regards,

Øystein Ramfjord"

Take a listen to his music and see if there are any songs that you think would go well with Minetest and let us know by replying here! I know I have some favorites. Can you tell I'm stoked? :)
Last edited by Neuromancer on Wed Sep 26, 2012 02:12, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Sep 30, 2012 02:12

I'm torn. I found a couple more really good songs by Amethystium, but I really don't want to replace any of the three really good songs we already have.

Here's the new songs I like.
Amethystium - Faraway
http://www.youtube.com/watch?v=KJOSVS5Mb7g
Amethystium - Ethereal
http://www.youtube.com/watch?v=9Gly1XleRWE

But we would have to cut one of these, and I really don't want to.
Jordach - EasternFeeling
JordanIbanez - Echos
Mass Effect - Uncharted Worlds

I'm thinking of replacing Echos with Faraway. Does anyone have an opinion on this?
Last edited by Neuromancer on Sun Sep 30, 2012 02:18, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Oct 14, 2012 03:27

Added 2 more awesome songs by Amethystium.
 

jyf1987
New member
 
Posts: 3
Joined: Wed Sep 05, 2012 15:15

by jyf1987 » Sun Oct 14, 2012 09:07

very cool mod, i dont have any other mod like texturepack
it make me feel very difference after installed this mod on minigame

and may i has a suggestions?

how about add some bio related sound which only be played at the corresponding bio

like when you swim on sea, you will heard sound of sea

and only when you entry to the forrest, you will heard birds , monkey
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Fri Oct 19, 2012 18:44

those last 2 added songs are simply amazing
i have youtubed a bit and found some more:
https://www.youtube.com/watch?v=eYcphCzYEWw&feature=related
and
https://www.youtube.com/watch?v=DlzH5Mo6NsY&feature=related

would love to hear them in mt

EDIT:

THIS ONE:
https://www.youtube.com/watch?v=p4regtGCsDM&feature=related
Last edited by RealBadAngel on Fri Oct 19, 2012 19:51, edited 1 time in total.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 37 guests

cron