MantisBT - VCMI
View Issue Details
0002368VCMISound, music, videospublic2016-01-08 11:312018-01-27 16:13
SXX 
SXX 
normalfeatureN/A
resolvedfixed 
0.98f 
0.next 
0002368: Missing feature - environment sounds
Some objects in game must have background sounds that played when your hero stand next to them. Volume is depend on distance from them. I'll try to make a lists of these sound effects there.

Max distance is 3 tiles. Less distance is higher volume:
3 3 3 3 3 3 3
3 2 2 2 2 2 3
3 2 1 1 1 2 3
3 2 1 S 1 2 3
3 2 1 1 1 2 3
3 2 2 2 2 2 3
3 3 3 3 3 3 3
S - Sound source. It's size can be even 8x8 but sound always distribute to 3 tiles around it.

Important:
 - Not sure there is any limit of number of different simultaneous sounds.
 - Multiple tiles with same sound don't make volume higher.
 - There also special surf sound 3 tiles from shoreline.
 - When you're on water away from shoreline there is no background sounds. Same for land
Most of objects does have background sound so it's easier to list one that don't have it:
- Non-active objects (rocks, trees, etc).
- - Exceptions: Volcano's from lava terrain
- All monsters, heroes (include prison), towns.
- Pickables except Campfire
- Quest objects: Border Gate, Keymaster Tents, Seer's Hut, Spridion of Seer
- Hut of Magi, Eye of Magi
- All cartographers
- Some of rewardable objects don't have sounds:
- - Idol of fortune
- - Library of enlightenment
- - Tree of knowledge
- - Witch Hut
- - Oasis
- - Lean to
- - Corpse
- One of creature banks: Pyramid
- All water objects.
- - Exceptions: Whirlpool, sirens, buoy
- Other map objects:
- - Events, Signs, Warriors Tomb, Lighthouse, Magic well, Redwood, Freelancer's guild, Cover of darkness, Altar of Sacrifice

Notes about special terrain:
 - Only two have sound: Magin plains and Cursed ground
 - If multiple magical terrains is on top of each other only top terrain sound play. If top one don't have background sound then there is no sound.
 - If two terrains only partially cover each other and you stay on then you may hear both sounds.
No tags attached.
related to 0001630resolved SXX some sound effects are missing 
? SXX_Sound_effects_v1.h3m (45,267) 2016-01-08 15:03
https://bugs.vcmi.eu/file_download.php?file_id=2415&type=bug
wav levels-backgroundsounds.wav (2,492,790) 2016-01-08 15:32
https://bugs.vcmi.eu/file_download.php?file_id=2416&type=bug
Issue History
2016-01-08 11:31SXXNew Issue
2016-01-08 11:31SXXStatusnew => confirmed
2016-01-08 12:25SXXRelationship addedrelated to 0001630
2016-01-08 14:11SXXDescription Updatedbug_revision_view_page.php?rev_id=3106#r3106
2016-01-08 14:22SXXFile Added: SXX_Sound_effects_v1.h3m
2016-01-08 14:23SXXDescription Updatedbug_revision_view_page.php?rev_id=3107#r3107
2016-01-08 15:03SXXDescription Updatedbug_revision_view_page.php?rev_id=3108#r3108
2016-01-08 15:03SXXAdditional Information Updatedbug_revision_view_page.php?rev_id=3110#r3110
2016-01-08 15:03SXXFile Deleted: SXX_Sound_effects_v1.h3m
2016-01-08 15:03SXXFile Added: SXX_Sound_effects_v1.h3m
2016-01-08 15:04SXXDescription Updatedbug_revision_view_page.php?rev_id=3111#r3111
2016-01-08 15:08SXXNote Added: 0006261
2016-01-08 15:32SXXFile Added: levels-backgroundsounds.wav
2016-01-08 15:48SXXNote Added: 0006262
2016-01-08 15:55SXXNote Edited: 0006262bug_revision_view_page.php?bugnote_id=6262#r3113
2016-01-08 16:13WarmongerNote Added: 0006263
2016-01-08 16:17SXXNote Added: 0006264
2016-01-08 19:36SXXNote Edited: 0006264bug_revision_view_page.php?bugnote_id=6264#r3115
2016-02-11 01:24SXXNote Added: 0006413
2016-02-11 06:22SXXAssigned To => SXX
2016-02-11 06:22SXXStatusconfirmed => assigned
2016-02-11 17:12AVSNote Added: 0006414
2016-02-12 00:04SXXNote Added: 0006415
2016-09-25 18:29SXXNote Added: 0006744
2018-01-27 16:13SXXStatusassigned => resolved
2018-01-27 16:13SXXFixed in Version => 0.next
2018-01-27 16:13SXXResolutionopen => fixed

Notes
(0006261)
SXX   
2016-01-08 15:08   
Also I suppose this also available in H3 configs, but anyway here is few notes about objects that do have sounds:
- All dwellings have sounds. There also standard sword collision sound that used by default.
- Almost sure that all mines include abandoned one have unique sound.
- Teleports have different sounds depend on type:
 - - One way
 - - Two way
 - - Subterranean Gate
(0006262)
SXX   
2016-01-08 15:48   
(edited on: 2016-01-08 15:55)
BTW here is WAV file with normalized sound from Magic plains. Using it it's should be easier to determine needed sound level depend on distance. In this file captured from H3 hero stand 4 tiles from magic plains and then moving by one. Each time background sound become louder.

From what I personally see:
S - When you stand on source is 100% volume
1 - Tiles around source have 90% volume
2 - One tile away is 60%
3 - Two tiles away is 30%

(0006263)
Warmonger   
2016-01-08 16:13   
Yes the amplitude goes like 90-60-30%. Please do not confuse amplitude with loudness ;)
(0006264)
SXX   
2016-01-08 16:17   
(edited on: 2016-01-08 19:36)
Sadly I'm have about zero experience with sound recording / editing so I have no idea how that's must work.

What loudness it's should be then?

UPD: Ok, I RTFM ;-)

(0006413)
SXX   
2016-02-11 01:24   
So full list of ambient sounds is now on gist:
https://gist.github.com/ArseniyShestakov/616dd31231d5ac5942ad [^]
(0006414)
AVS   
2016-02-11 17:12   
Idea for further improvement.
1) store also 4 tile away sound sources
2) update amplitude every frame during movement transition between tiles to make volume changes smooth.
(0006415)
SXX   
2016-02-12 00:04   
Ok here is a bit of correction on original statement how ambient sounds work for objects. In case of visitable map objects sound only visitable tiles work as sound source.

Though for special terrains every tile is sound source and same valid for volcanos. Sadly I'm not sure how to handle that yet considering volcano is only static object that have ambient sound.
(0006744)
SXX   
2016-09-25 18:29   
Mostly finished PoC implementation:
https://github.com/vcmi/vcmi/pull/195 [^]