   ---------------------------------------------
   ADDING SOUNDS and MIDISONGS by BME/ILMHB 2012
   ---------------------------------------------


   ************************************************************
   SOME ADVICE: You might want to start with clean Blood folder
   before you install these files!
   ************************************************************


1. Inside the 'BLOOD' folder, create a project folder 'MYSTUFF'
   and go inside. Open notepad and type the following:

   +--------------------------------------------------------------+
   |                                                              | 
   |   resource "MYSTUFF\RAW\LAUGH.raw";                          |
   |       data "LAUGH.SFX" as 12000: 100, 0x22050, 0x0, 5, -1,   |
   |            "LAUGH";                                          |
   |   ;                                                          |
   |                                                              |
   +--------------------------------------------------------------+

   On the first line, between quotes, is the complete path to the
   filename. Don't forget to end the line with a semicolon!
   Now define the SFX properties data on the second line,
   here's what the numbers mean:

   
       as 12000:      This is the sound number used in mapedit.
                      It's best to use 12000 and up for your own,
                      but you can also replace existing sounds.
                      Don' forget to type a colon behind the number!

            100,      This is the volume of the sound.
                      100 is sufficient when the waveform itself is
                      already normalized (has maximum volume)

          22050,      Is the pitch at which the sound is played.
                      Make sure it preceeds '0x'.

            0x0,      The 0 begind the '0x' is the amount of random
                      pitch.

              5,      The format (or sample rate):
                      5 = 22050hz
                      1 = 11025hz
 
                      It seems that not all SOUND SPRITE TYPE seem
                      to react properly to this setting though.

             -1,      This number represents the start of the loop
                      -1 means 'no loop', any positive number is the
                      position (in bytes) where the loop should start.
                      Once the sound comes to an end it starts
                      playing from this point again.

                      Because of the loop, a sound can have 3 stages;
                      at the ON STATE: the beginning of the sample,
                      then the loop and finally at the OFF STATE the
                      other sample.


   Save the file as 'SND.RFS' in the 'MYSTUFF' folder.

     
2. Inside the 'MYSTUFF' folder, create a folder called 'RAW' and put
   'LAUGH.RAW' inside the 'RAW' folder.
   In this folder you should put all your .RAW files.

3. Inside the 'MYSTUFF' folder, create a folder called 'MID' and put
   'GRABBAG.MID' inside the 'MID' folder.
   In this folder you should put all your .MID files.

4. Add the following line to the 'SND.RFS':

   +--------------------------------------------------------------+
   |                                                              | 
   |   resource "MYSTUFF\RAW\LAUGH.raw";                          |
   |       data "LAUGH.SFX" as 12000: 100, 0x22050, 0x0, 5, -1,   |
   |            "LAUGH";                                          |
   |                                                              |
   |   resource "MYSTUFF\MID\GRABBAG.MID";                        |
   |   ;                                                          |
   |                                                              |
   +--------------------------------------------------------------+

   And remember: never forget the semicolon behind the quote and
   one at the last line! Now save the file once again.

5. Next we need the install script, open Notepad and type:

   +--------------------------------------------------------------+
   |                                                              | 
   |   @ECHO OFF                                                  |
   |   CLS                                                        | 
   |                                                              |
   |   COPY MYSTUFF\SND.RFS ..                                    |
   |   COPY MYSTUFF\SNDTEST.INI ..                                |
   |   COPY MYSTUFF\SNDTEST.MAP ..                                |
   |                                                              |
   |   BARF SOUNDS.RFF -A @SND.RFS                                |
   |                                                              |
   |   BLOOD -INI SNDTEST.INI                                     |
   |                                                              |
   |   DEL SND.RFS                                                |
   |   DEL SNDTEST.INI                                            |
   |   DEL SNDTEST.MAP                                            |
   |   DEL SOUNDS.RFF                                             |
   |                                                              |
   |   REN SOUNDS.BAK SOUNDS.RFF                                  |
   |                                                              |
   +--------------------------------------------------------------+

   Save it as 'SNDTEST.BAT' in the 'BLOOD' folder.

6. And we also need an .INI file, open Notepad and type:

   +--------------------------------------------------------------+
   |                                                              |   
   |   [EPISODE1]                                                 |
   |   TITLE = SOUND TEST                                         |
   |   MAP1 = SNDTEST                                             |
   |                                                              | 
   |   [SNDTEST]                                                  |
   |   TITLE = SOUND TEST                                         |
   |   AUTHOR = BME/ILMHB 2012                                    |
   |   SONG = GRABBAG                                             |
   |                                                              | 
   +--------------------------------------------------------------+

8. Now we need a map, open Mapedit
   Create a room and then insert a sprite,
   change its TYPE to '711: PLAYER SFX', its RX ID to 100
   and its DATA1 field to 12000.

   Now insert a button sprite [ALT+S] and click on [MISC],
   then select a button, change its TX ID to 100, CMD to TOGGLE,
   'Send When' to X GOING ON and X GOING OFF, and 'Trigger On'
   to X PUSH.
   
   Make sure the white arrow is inside the room and then
   press [SCROLL LOCK].
   Save the map as 'SNDTEST', then exit Mapedit.
   
9. Finally, move 'SNDTEST.MAP' to the 'MYSTUFF' folder.
   Now you're ready to run the map with SNDTEST.BAT

   If everything fails you might want to unzip READY.ZIP ;)

   Have fun!
   BME

===================================================================

   ADDITIONAL INFO


   If you want to create your own samples, you need a wave editor.
   Download a free one here: http://audacity.sourceforge.net/
   
   Make sure the samples are saved in the RAW format and are:

   - MONO
   - 8 BIT
   - 22050hz or 11025hz

   A cool program to rip any sound currently playing on your
   PC with is 'Free Sound Recorder', download it here: 
   http://www.sound-recorder.biz/freesoundrecorder.html
   
===================================================================
 YOUTUBE.COM/BLOODMAPEDIT                    BME/ILMHB, april 2012
