OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: laggy on 24 Jun 2009, 22:43:53

Title: Has anyone REALLY been able to create custom sounds?
Post by: laggy on 24 Jun 2009, 22:43:53
Hi,

Trying to include an important sound in my mission, so far so bad. Tried the "old" way (never had any problems with sound in OFP or ArmA), but it didn't work so then I tried the way suggested in this forum... still no luck. Been using GoldWave AND OFPsoundLab. I have tried to use ogg and wss with no luck so far, this is my current .ext:

Code: [Select]
class CfgSounds
{
 class alsatianBark
 {
  scope = 1;
  name = "alsatianBark";
  sound[] = {"alsatianBark.wss",1,1};
  titles[] = {};
 };
};


class CfgMusic
{
 tracks[]={};

 class alsatianBark
 {
  name = "alsatianBark";
  sound[] = {"alsatianBark.ogg", db+5, 1.0};
 };
};

Can't make it work as a sound or music  :weeping:

Any ideas? Seems like format or definition has changed somehow. Can someone please give an example of a CORRECT format and a CORRECT .ext definition PLEASE!!! I'm just a poor man fighting for his soul !!!
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: nominesine on 24 Jun 2009, 22:55:42
Does this (http://www.ofpec.com/forum/index.php?topic=33501.0) shed any light on your problem?
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: laggy on 24 Jun 2009, 23:01:14
Not really, it just sheds the same darkness I already have plenty of :weeping:
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: nominesine on 24 Jun 2009, 23:19:18
Don't fear the dark. Only fear what hides inside it...
 :D
Sorry! Couldn't resist. I will play with the sound bit as soon as I can and see what I can come up with. If you manage to solve the problem, maybe you can make a beginners tutorial. Or tell me how it's done, and I can write it for you. Good luck.
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: loki72 on 24 Jun 2009, 23:42:16
did you remove
Code: [Select]
tracks[]={};?

 :dunno:

its all i did.

Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: laggy on 24 Jun 2009, 23:48:05
This .ext works in your mission... PERIOD !!!

Code: [Select]
class CfgSounds
{

sounds[] = {alsatianBark, sound2};


class alsatianBark
{
name = "alsatianBark";
sound[] = {\sound\alsatianBark.ogg, db - 20, 1.0};
titles[] = {0, ""};
};
class sound2
{
name = "sound2";
sound[] = {\sound\sound2.ogg, db + 0, 1.0};
titles[] = {0, ""};
};
};

class CfgMusic
{

tracks[] = {music1, music2};


class music1
{
name = "music1";
sound[] = {\music\music1.ogg, db + 0, 1.0};
titles[] = {0, ""};
};
class change
{
name = "music2";
sound[] = {\music\music2.ogg, db + 0, 1.0};
titles[] = {0, ""};
};
};

class CfgEnvSounds
{

sounds[] = {Ambience1};


class Ambience1
{
name = "Ambience1";
sound[] = {\sound\Ambience1.ogg, db + 0, 1.0};
soundNight[]={"Ambience1.ogg",db-40,0,1};
title = "";
};
};


This works for me, hope it's the same for you  :D
Only sure about the CfgSounds part so far...
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: loki72 on 24 Jun 2009, 23:54:18
ok.. guess i should of got that from the get-go.. you're working in a mission and i made an addon..

.ext vs .cpp

not that it should make a different.. but it did.. even when i put the name of the tracks in, i still got no joy finding my .pbo music list in the editor.

removed that line and it showed up.. maybe a bug in the game?

Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: nominesine on 25 Jun 2009, 00:03:06
This is the entire description.ext from one of the official SP-missions:

respawn = 4;
respawnDelay = 5;
doneKeys[]={"BIS_SP05"};

/*
class CfgSounds
{

   //counterattack
      class incomming01
      {
         name = "incomming01";
         sound[] = {"counterattack\incomming01.ogg", db+20, 1.0, 160};
         titles[]={};
      };
      class incomming02
      {
         name = "incomming02";
         sound[] = {"counterattack\incomming02.ogg", db+20, 1.0, 160};
         titles[]={};
      };
      class incomming03
      {
         name = "incomming03";
         sound[] = {"counterattack\incomming03.ogg", db+20, 1.0, 160};
         titles[]={};
      };
      class incomming04
      {
         name = "incomming04";
         sound[] = {"counterattack\incomming04.ogg", db+20, 1.0, 160};
         titles[]={};
      };
};
*/
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: laggy on 25 Jun 2009, 01:03:04
Seems like a new criteria is that you must specify a folder to look in for the sound file and exclude the quotes.


   class sound1
   {
      name = "sound1";
      sound[] = {\sound\sound1.ogg, db + 0, 1.0};
      titles[] = {0, ""};
   };


Don't recognize that part from before  :dunno:
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: nominesine on 25 Jun 2009, 14:19:13
Seems like a new criteria is that you must specify a folder to look in for the sound file and exclude the quotes. Don't recognize that part from before  :dunno:

It was recommended in the old un-official comrefs floating around during the golden age of OFP, buts since OFP and ArmA automatically looked for a folder named SOUND it wasn't necessary. It was always necessary with music, unlss I'm misstaken
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: savedbygrace on 14 Nov 2009, 13:07:29
Yes I know it's old but .... Can someone shed some light on the fourth parameter within the brackets? Thats a new requirement.

sound[] = {\sound\sound1.ogg, db + 0, 1.0, 160};
Title: Re: Has anyone REALLY been able to create custom sounds?
Post by: Rellikki on 14 Nov 2009, 13:33:39
As far as I know, the fourth parameter defines how far away the sound can be heard from its source. If the sound has titles defined in it, that's the distance the player has to be in to have the title texts displayed on screen.