Jump to content


Photo

Audio file


  • Please log in to reply
7 replies to this topic

#1 Great_White_Shark

Great_White_Shark

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted 04 November 2016 - 08:06 PM

How to i import a mp3 / wav file into a course file. and can they be looped....Cheers



#2 StoneComet

StoneComet

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts
  • LocationNew York

Posted 04 November 2016 - 09:01 PM

Just take any .mp3, .ogg or .wav file from whatever location you have them saved onto your computer and drag it into your Assets area. I drag mine into the sounds folder. Then create an audio source using the hierarchy create tab. Then select the sound asset within the inspector area where it says missing clip. In the inspector there are options to loop and make the sound 3d or localized. Just play around with it. It takes some getting used to moving the audio source around but you'll get the hang of it. Just don't mess with the current ambient audio settings other than simply replacing the clip with one you may prefer.

 

You want the ambient audio to encompass your entire terrain and keep it 2d.

 

Make sure you back up your project on another drive or even on your desktop on the same drive if you have the room before experimenting too much.

 

SC  B)


- We would be wise to remember that extremism is the real enemy and to keep ourselves aware so as not to become extreme ourselves; otherwise the enemy wins. -


#3 Great_White_Shark

Great_White_Shark

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted 04 November 2016 - 09:35 PM

Cheers..I dont want it to loop continuously  just in intervals....how can i set it for that..plus do i check all the bypasses 



#4 Great_White_Shark

Great_White_Shark

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted 04 November 2016 - 11:22 PM

Cheers..I dont want it to loop continuously  just in intervals.of every 5 or 8 mins....how can i set it for that..plus do i check all the bypasses 



#5 JoeF

JoeF

    Advanced Member

  • Members
  • PipPipPip
  • 2,551 posts
  • LocationBrighton, Ontario, Canada

Posted 05 November 2016 - 12:50 AM

For sounds that you want to be a contiguous loop it is best to use .wav files rather than mp3's.  For whatever reason, when using mp3's for loops Unity puts a slight pause of silence between the end and beginning of the loop.  This doesn't occur if the source file is a .wav.  You will also need to ensure that the end and beginning of the file are the same so you don't hear an audible difference when the file loops.  mp3's work fine for single or non-contiguous sounds.


Intel i5-4570 cpu @ 3.2 GHz, ASUS Z74-K mb, ASUS GeForce GTX 960 gpu, 16 GB ram, 2 x SSD drives, Windows 10 64 bit

 

Steam name: sound_flier


#6 Acrilix

Acrilix

    Advanced Member

  • Members
  • PipPipPip
  • 1,832 posts
  • LocationBedford, UK

Posted 05 November 2016 - 01:31 AM

Cheers..I dont want it to loop continuously  just in intervals....how can i set it for that..plus do i check all the bypasses 

 

I don't know if this is an option in Unity, but I just load sound files into a sound editor such as Audacity and generate an appropriate length of silence to the end of the file to create a pause between plays.


life ................... don't talk to me about life ................

#7 Great_White_Shark

Great_White_Shark

    Advanced Member

  • Members
  • PipPipPip
  • 98 posts

Posted 05 November 2016 - 02:00 AM

Yeah its a wav file ..in unity it plays continuously without pauses ..i only want it intermittent like every 5 mins or so



#8 M Rose

M Rose

    Advanced Member

  • Members
  • PipPipPip
  • 1,918 posts
  • LocationMelbourne, Australia

Posted 05 November 2016 - 02:43 AM

You have to edit the .wav to insert space in between, otherwise it will play continuously. If you untick the loop box, you won't hear it at all. I usually add about 5-10 seconds of silence on either side of a sound. It sort of depends on the sound too.... hearing a bird chirp two or three times won't be quite as oppressive as say, a loud crow or a train horn.

 

Sound placement is one of the weaknesses of Unity, IMO.


VG2 • PG • 2k21 • 2019 • Links • GBC • JN5





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users