Map Sounds Tutorial

Guides about mapping and everything Teeworlds related.

User avatar
timakro
User
Posts: 411
Joined: Mon May 05, 2014 6:05 pm
Location: Germany
Player profile: timakro
Mapper profile: timakro
Clan: υηιqυє
Website: https://timakro.de/

Map Sounds Tutorial

Post by timakro » Tue Oct 28, 2014 7:32 pm

Map Sounds Tutorial
written by DoNe, slightly edited by Index

As of client version 2.x you can use sounds in maps. The feature was coded by BeaR. His idea was to make little environmental sounds like singing birds or wind possible for maps. You can only hear the sounds if you use DDNet client. You can change the volume of map sounds for your client and even turn them off. Because only players using the DDNet client can hear the sounds you shouldn't use them to give information the players have to know. Map sounds are included to a map in the Opus(.opus) filetype.

How to convert my own sound to Opus?

The most music editing programs support the filetype Wav. Use this programm to convert Wav to Opus: http://www.foveon.de/sonstiges/opusdrop/index.htm. You can also use this online converter which supports almost every format for your input sound: http://audio.online-convert.com/convert-to-opus. Your output file should end with ".opus". Now put this file into your mapres directory.

Read a detailed explanation about opus: viewtopic.php?p=26734#p26734

How to include my sound to a map?

In editor sounds are handled similar to quads. Klick on the button that switches between images, sounds and layer management until you get to the sounds section. You should see your sound file in the file browser. Add it like you would add a image and don't forget to embedd it. Switch back to layer management and rightclick on any group. Click on "Add sound layer". Rightclick on your new layer and select your sound file as you would do it with a quad layer. After that the "Add Source" button at the top right will be clickable. Click on it and a new sound source will appear. You can move it like a quad by clicking on the green dot. Rightclick on the green dot to modify your sound source. You can decide if the sound will loop or just play when you enter the sound circle. You can change the delay that is waited when you enter the sound circle until the sound is played. The sound will get louder if you get closer to the middle of the sound circle. You can change the radius of the sound circle by changing the distance. A sound source can also have a position envelope. It will work like on quads and just move the sound center around. You can also add a sound envelope if you created one.

How to use sound envelopes?

Sound envelopes control the volume of a sound. They are very similar to the other envelope types. In the envelopes menu you can click "Sound+" to add a sound envelope. The x-axis controls the time and the y-axis the volume of your sound.
Last edited by timakro on Sat Nov 08, 2014 7:18 pm, edited 4 times in total.

User avatar
deen
Retired Administrator
Posts: 3171
Joined: Mon May 05, 2014 2:30 pm
Player profile: deen

Re: Map Sounds Tutorial by DoNe

Post by deen » Tue Oct 28, 2014 11:52 pm

We're switching away from wavpack to opus for map sounds. Have a look at a nice comparison of Opus with some other codecs. Here's how to convert your sound files to opus for using them in DDNet maps:
  • Choose VBR encoding and opus filetype
  • Try out the lowest bitrate
  • Increase the bitrate until it sounds good enough
You can use these tools to do this:
Graphical
  • Use an Online converter
  • Use an all-in-one tool like WinFF, make sure to choose opus as the output codec.
  • First convert the sound to .wav, then use OpusDropMP to convert to opus
Command line
  • Code: Select all

    ffmpeg -i input.wav -b:a 6k output.opus
  • First convert the sound to .wav, then use the commandline tool opusenc like this:

    Code: Select all

    opusenc --bitrate 6 input.wav output.opus

User avatar
Aoe
User
Posts: 742
Joined: Thu May 29, 2014 10:54 pm
Location: Denmark
Player profile: Aoe
Mapper profile: Aoe
Clan: Infamous
Contact:

Re: Map Sounds Tutorial by DoNe

Post by Aoe » Thu Oct 30, 2014 5:05 pm

Wow nice, is there any map with this feature yet?
Image

User avatar
imp
User
Posts: 792
Joined: Mon May 05, 2014 5:56 pm
Player profile: imp
Mapper profile: imp

Re: Map Sounds Tutorial by DoNe

Post by imp » Thu Oct 30, 2014 6:38 pm

lol, I didn't even realise that this feature had been released :D

User avatar
Kintaro*
User
Posts: 43
Joined: Tue Oct 28, 2014 8:45 pm
Player profile: Kintaro*
Mapper profile: Kintaro
Contact:

Re: Map Sounds Tutorial by DoNe

Post by Kintaro* » Thu Oct 30, 2014 7:22 pm

Aoe wrote:Wow nice, is there any map with this feature yet?
Aoe i alreay created a map,
idk if its already on test server or if it will be realeased on ddnet anyway^^

User avatar
Aoe
User
Posts: 742
Joined: Thu May 29, 2014 10:54 pm
Location: Denmark
Player profile: Aoe
Mapper profile: Aoe
Clan: Infamous
Contact:

Re: Map Sounds Tutorial by DoNe

Post by Aoe » Sun Nov 02, 2014 7:17 pm

Kintaro* wrote:
Aoe wrote:Wow nice, is there any map with this feature yet?
Aoe i alreay created a map,
idk if its already on test server or if it will be realeased on ddnet anyway^^

https://www.youtube.com/watch?v=kIfOjkB17BA
Image

User avatar
Bossk
User
Posts: 43
Joined: Thu May 08, 2014 2:54 pm
Player profile: Bossk
Mapper profile: Bossk

Re: Map Sounds Tutorial by DoNe

Post by Bossk » Tue Jan 27, 2015 11:20 pm

I have music in my winning room, but I'm wondering why just looping works.

-loop off
pan off/on nothing happens when entering soundzone

-loop on
pan off/on sound is looping when entering sound zone

I ask me what "pan" is for and why I can't configure that the sound starts playing and stopps afterwards if u enter a zone.

User avatar
Alvin Risk
Banned
Posts: 440
Joined: Sat Oct 04, 2014 6:27 am
Player profile: Alvin Risk
Mapper profile: Alvin Risk
Website: https://vk.com/ms_zn
Contact:

Re: Map Sounds Tutorial by DoNe

Post by Alvin Risk » Wed Jan 28, 2015 5:37 am

Pan its panorama.
Ya ebu tvou mamashu.

BeaR
User
Posts: 54
Joined: Fri May 30, 2014 10:18 am
Player profile: BeaR

Re: Map Sounds Tutorial by DoNe

Post by BeaR » Wed Jan 28, 2015 11:39 am

Panning: The audio signal will be split into two stereo channels and the volume will be adjusted for each channel according to your position in the audio field.
So e.g if you stand on the left side of the audio source, the right channel will have an higher volume than the left one and vice versa

About your second question: There is no support some sort of event triggering for OnEnter/OnLeave (same for animations)

User avatar
Bossk
User
Posts: 43
Joined: Thu May 08, 2014 2:54 pm
Player profile: Bossk
Mapper profile: Bossk

Re: Map Sounds Tutorial by DoNe

Post by Bossk » Wed Jan 28, 2015 12:33 pm

Thx for your answer BeaR!

Maybe i missunderstood this
You can decide if the sound will loop or just play when you enter the sound circle.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest