Music Sound--08 Audio mixer

Source: Internet
Author: User

Study Notes for beginners, please correct me if you have any mistakes. The number is also please point out, thank you.

Audio Mixer to add effects and blend sounds from your scene to audio source

Open the Audio Mixer window: Windows Audio Mixer

The group group for the current mixer is displayed under the groups bar

The audio mixer will have a master group that cannot be removed, and any other group is his child group

The audio Mixer group is a mix of one or a group of audios, and its signal chain signal chain provides the ability to adjust the volume attenuation and pitch, and we can add various effects

1 How to use

The output of audio source is specified as a group under audio mixer for use, and the outputs of audio mixer can also be output to other audio mixer groups

2Views

In the views can be worn a different view, in view can hide the display of certain groups, in the case of a lot of groups, with different view to edit especially convenient

3Send and receive

Signals from one group can be sent with send and accepted in another group with receive or duck volume

4Duck Volume

Depending on the volume intensity of a group to weaken the other group's volume, Duck is the meaning of evasion, all can be understood to avoid the other group of volume, it is suitable for some specific situations,

For example: When the shooting sound is very big, when the background music volume is smaller, to the ear more comfortable, otherwise, if all is very big sound, will have the noisy feeling

Another example: When the explosion occurred in the vicinity of people, after a violent explosion, the ear will appear tinnitus, and hear no other sound, this time should only play the sound of tinnitus, and other sound to avoid the sound of tinnitus, reduce the volume to very low

5Audio Mixer Instances

1. Create a new scene

2. Create background music and shot sounds and set parameters,

Create a new two audio source and name it "Music" and "gunshot"

Set the audio clip of music to "11.4BGM", tick loop and set spatial blend to 0

Set gunshot audio clip to "Player gunshot" to uncheck Playon awake and add spatial blend to 1

3. Create a new audio Mixer, named "11.8", and select the master group in the groups bar of the Audio Mixer window

Click the "+" button to create a new group and name "Music", select the master group again and click the "+" button, create a new group and name "sound"

4.Audio source Specifies the group, in hierarchy, select music and specify the music group under output 11.8 mixer, select gunshot and specify the sound under the output 11.8 mixer

5 Create a new game object and name it "Manager", then add the script, the code listing is as follows:

 using   Unityengine;  using   System.Collections;  public  class   C_11_8:monobehaviour {  Audiosource gunshot;  public  void   Ongui () { //  if  (Guilayout.button ( fire   " 

Run the scene, play the loop background music and play the gunfire after pressing the fire button, and the volume of the left and right channels of each group is displayed in a vertical bar
Then add Duck Volume, select the music group in the Audio Mixer window, and click the "Add" button

Then click Add Duck Volume, and then set threshold to -35.00db

Select the sound group and click "Add" below and click Add Send

Set the Receive to "Muisc\duck Volume" in the inspector window and set the send level to 0.00dB

Running the scene, when the gunfire sounded, the sound will send the volume through send to music Duck Volume,duck Volume received, found that the volume exceeds the threshole threshold, so reduce the volume of its "dodge"

Music Sound--08 Audio mixer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.