OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blacknite on 11 Jun 2006, 18:39:32

Title: Need help on Sound Scripting!
Post by: Blacknite on 11 Jun 2006, 18:39:32
Actually I need lots of help lol

1.)  My sound file wont work, even though its was converted into WAV format, then OGG format.

2.)  How do I start the sound file in the Briefing (it can be done!)?

3.)  How do I start the sound file during loading (if possible)?

4.)  How do I make the sound come from a person?

5.)  How can I control the volume of the sound?


Thanks!

Title: Re: Need help on Sound Scripting!
Post by: The-Architect on 11 Jun 2006, 20:38:58
1. Check that the sound file has these perameters.
    44100Hz
    120kbps
    Mono (Important)

2. OnBriefingGear = "sound";
    OnBriefingGroup = "Sound";
    OnBriefingNotes = "sound";
    OnBriefingPlan "sound"

3. Not that I know of.

4. Unit Say "Sound"

5. Get the required volume in a sound editor. But make sure your Flashpoint volume settings are at max or when you play the sound in a mission, you'll get a false volume and it may make you change the sound file's volume again when you didn't need to..
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 17 Jun 2006, 19:35:05
Quote
1. Check that the sound file has these perameters.
    44100Hz
    120kbps
    Mono (Important)
How?

Quote
2. OnBriefingGear = "sound";
    OnBriefingGroup = "Sound";
    OnBriefingNotes = "sound";
    OnBriefingPlan "sound"
In the description file?

Quote
4. Unit Say "Sound"
Why wont their lips move?
Title: Re: Need help on Sound Scripting!
Post by: The-Architect on 17 Jun 2006, 21:07:04
I thought you knew this stuff dude.

Anyway.

DL Goldwave.
http://www.goldwave.com/

Load the file you made. Then save it and Goldwave will give you all those options.

For the lines of code.
Yes. If I remember right.

Lips moving.
For this you need to do the following.

DL WavToLip
http://www.flashpoint1985.com/docs/lipsync.html
Lip files can only be made from wavs, hence the name. The file details should be 16bit mono. Lip files go in your sound folder with the accompanying .ogg files.
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 17 Jun 2006, 23:13:46
The Wave2Lip doesnt work.
Title: Re: Need help on Sound Scripting!
Post by: Planck on 17 Jun 2006, 23:45:27
Wav2lip does work, you just need to follow the instructions that come with it.

 :P


Planck
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 18 Jun 2006, 00:53:12
1.)  It didnt come with instructions.

2.)  The download link doesnt work.

3.)  It never gave me a lip file, just an ogg.
Title: Re: Need help on Sound Scripting!
Post by: The-Architect on 18 Jun 2006, 01:08:07
Install it on a root.

Drag and drop the pre made wav. Remember the file specs.


[attachment deleted by admin]
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 18 Jun 2006, 02:07:24
It doesnt do anything.
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 18 Jun 2006, 04:33:23
Problem solved, using Sound Lab.
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 20 Jun 2006, 17:21:00
The sound for the briefing doesnt work, instead it closes out and gives me an error message.
Title: Re: Need help on Sound Scripting!
Post by: The-Architect on 21 Jun 2006, 02:38:08
Check your sytax is correct. Then check it again.
Title: Re: Need help on Sound Scripting!
Post by: Blacknite on 21 Jun 2006, 16:00:25
Here is what my description file looks like:

Quote
OnBriefingPlan = "escape.ogg"
minScore=2000
avgScore=8000
maxScore=14000

class CfgSounds
{
   sounds[] =
   {
      escape, nice, halt, martini, harm, talk, yolt, drink, contact, contact2
   };


   class halt
   {
      name = "halt";
      sound[] = {"halt.ogg", db-0, 1.0};
      titles[] =
      {
         0, $STR_01v1,
      };
   };
   class escape
   {
      name = "escape";
      sound[] = {"escape.ogg", db-0, 1.0};
      titles[] =
      {
         0,
      };
   };
   class contact2
   {
      name = "contact2";
      sound[] = {"contact2.ogg", db-0, 1.0};
      titles[] =
      {
         0, $STR_contact2,
      };
   };
   class nice
   {
      name = "nice";
      sound[] = {"nice.ogg", db-0, 1.0};
      titles[] =
      {
         0, $STR_nice,
      };
   };
   class contact
   {
      name = "contact";
      sound[] = {"contact.ogg", db-0, 1.0};
      titles[] =
      {
         0, $STR_contact,
      };
   };
   class martini
   {
      name = "martini";
      sound[] = {"martini.ogg", db+40, 1.0};
      titles[] =
      {
         0, $STR_martini,
      };
   };
   class harm
   {
      name = "harm";
      sound[] = {"harm.ogg", db+40, 1.0};
      titles[] =
      {
         0, $STR_harm,
      };
   };
   class talk
   {
      name = "talk";
      sound[] = {"talk.ogg", db+40, 1.0};
      titles[] =
      {
         0, $STR_talk,
      };
   };
   class yolt
   {
      name = "yolt";
      sound[] = {"yolt.ogg", db-0, 1.0};
      titles[] =
      {
         0, $STR_yolt,
      };
   };
   class drink
   {
      name = "drink";
      sound[] = {"drink.ogg", db-0, 1.0};
      titles[] =
      {
         0, $STR_drink,
      };
   };
};


class CfgMusic
{
  tracks[]=
  {
      jamesbond, bondmusic
  }; 
  class jamesbond
  {
      name = "jamesbond";
      sound[] = {\music\jamesbond.ogg, db+0, 1.0};
  };
  class bondmusic
  {
      name = "bondmusic";
      sound[] = {\music\bondmusic.ogg, db+0, 1.0};
  };
};

I have changed "escape.ogg" to "escape" and it still doesnt work.  The sound file has been converted to its proper format like all the other lip files and as such.