[SOF1] Ed. Entities. How to add music to the map. Need HELP

Models + Mapping, Computer & SOF Problems.
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I want to clarify about the timer

Code:
{
"target" "bgmsnd"
"wait" "5.55" ----------------------- Here are seconds and milliseconds ? or minutes and seconds
"spawnflags" "1"
"origin" "4032 3992 456"
"classname" "func_timer"
}

Let's consider an example. If I have music for 2 minutes. 1 minut = 60 sec. Then I need to edit like this:

"wait" "120.00"
or
"wait" "120"

How will it be right ?
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

So, I found the .map file of SOF1 and checked all what I wanted. Hasten to upset myself, nothing worked

The .map to BSP compilation was successful, no mistakes. I used QuArK

I added a script for calling music with a timer and then compiled to BSP - It was written in the console that test.wav is stereo
I also edited "musicset" "test.WAV" then compiled to BSP. But the game is still looking for the DNS music file
So in SOF1 this method does not work which I used in rtcw

I edited the some...game for a very long time. And they came up with another way to calling music. Together with the launch of map, Winamp was launched automatically without switching the game window to the desktop.
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

There's really no hope with the use of "musicset". Listen to the example below. I managed to get this to work really not long ago and this was the result.


(I'm using the command forcesong to manually play the music the same way as entering a value in the "musicset" field.)
I also found some old forum post of peoples attempting to fix this issue by reverse engineering but it was not a success.
GStuff002 wrote:I also edited "musicset" "test.WAV" then compiled to BSP. But the game is still looking for the DNS music file
.dms file is what it uses to locate where are your audio files for the left/right channel playback. You'll understand what I mean if you peek through with an hex editor.

GStuff002 wrote:Let's consider an example. If I have music for 2 minutes. 1 minut = 60 sec. Then I need to edit like this:

"wait" "120.00"
or
"wait" "120"

How will it be right ?
I don't quite remember but I think both are fine. As long they are measured in seconds.
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

(I'm using the command forcesong to manually play the music the same way as entering a value in the "musicset" field.)
I listened twice, even my head was spinning.., it's cool !!

What did you do in this case with the WAV file or files?
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

GStuff002 wrote:What did you do in this case with the WAV file or files?
  • Set my audio frequency to 22050Hz (11025Hz also accepted)
  • Change from stereo to mono and independently save them with the "L" and "R" prefix to differentiate (prefix is optional I think).
  • SOF1 only read the first 4 byte header and require to be the audio frequency. So, I used an hex editor to remove the header, then insert this 22 56 00 00 bytes at the very beginning. The frequency is written in reverse order (5622 hex = 22050 decimal).
  • Copy a premade .dms from the game and used it as a template, then set the location of where my two files are located.

One big thing that I forgot to say is in order to play them natively, you'll need this specific to be set in the worldspawn

Code: Select all

"startmusic" "1"
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

It's too hard for me. It would be nice to ask you to make a short video with instructions. To just see where you click and what you write. If the method works, then it need to try to take music with vocals (with voice) and see how it will be played. It is very interesting. You may have found a solution, hacked the impossible!
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I came up with another way. But it turned out 50%.

I Separating Stereo Audio Channels into Two Mono. So that almost different music is played in each mono wav file

I uploaded wav's example here: https://easyupload.io/knokhe" onclick="window.open(this.href);return false;

And if it run them with two "scripts with timers" at the same time, it will seem that it is playing in stereo

Run two wav files in Audacity and alternately do Mute / Unmute Track L or R. The difference is clearly audible from 35 seconds after the words "Dj Tommy Lee ..."

I took the video instruction here: https://www.youtube.com/watch?v=nOzudbKpxW0" onclick="window.open(this.href);return false;
Separating Audio Channels in Premiere Pro CC

There is a problem! It is necessary in the "L wav sound to turn off the right side of the sound, and in the" R wav "to turn off the left side of the sound
I tried to do this, but the game perceived such a file as Stereo
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

GStuff002 wrote:There is a problem! It is necessary in the "L wav sound to turn off the right side of the sound, and in the" R wav "to turn off the left side of the sound
I tried to do this, but the game perceived such a file as Stereo
The executable (SoF.exe) handle this already, thus complaining because your files aren't properly set.


I've made a set of screenshots with a brief instruction in the file name. I also included the example file to match the screenshots (as part of a DIY). The technic is kinda wild and controversial but I take this as a starting point.

With SofPlus, you can also set your audio frequency to 44100Hz (instead of 22050Hz) and set the first 4 bytes to 44 AC 00 00
Attachments
bgmtut.zip
(6.33 MiB) Downloaded 53 times
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

Thanks, I'll try. How the results appear, I will unsubscribe. It is very interesting to hear the complete music composition with vocals, how much it will be improved
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

What version of Audacity are you using?

In newer versions there are no option in the menu item select "mono"

Tried from [v2.0.0] to 2.1.1
These versions have it but the settings for saving are limited.

There are old versions here:
https://www.fosshub.com/Audacity-old.html" onclick="window.open(this.href);return false;
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

Version 2.1.2 was used for the screenshots.

Perhaps you used the save function but the file has to be exported:
File > Export audio
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

In your description, you didn't say 16-bit PCM should be set after Rate (HZ) ?

'...Copy a premade .dms from the game' - i was looking for .dms but not found any files in the game folder.
Where can I get them ?
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I can't even understand from the pictures. In your photos working with Hex Editor is not clear to me.

How to understand where the header is ?, then Locate audio files - the same is not clear ?

One video would have saved me from all questions...

Your skill experience amazes me. I'm still weak in this
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

GStuff002 wrote:i was looking for .dms but not found any files in the game folder.
Where can I get them ?
Stored in pak0.pak. You can extract using some utililies like pakscape or even QuArK
GStuff002 wrote:How to understand where the header is ?
I'll quote myself from an earlier post
Spoiler!
Acadie wrote:The technic is kinda wild and controversial but I take this as a starting point.
I'm doing a bad practice there. I simply managed to get this to work without crashing the game.

All I know is SOF1 will ignore until it reaches the actual audio. This just happens to be after the first bundle of zeros and to where I stop cutting is definitely false. :dntknw:
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

My pakscape can't open pak0.pak,
pak1 2 3 - opens fine
pak0.pak - is probably encrypted

I understand that you are deleting at random, deleting zeros "0" at random in hex editor.

Which version of the hex editor are you using? I tried to do everything according to the yours screenshots, but the values ​​in the hex editor are different, even with your sonic.wav

I set in hex editor bytes per row - 44, then, text encoding set to DOS/IBM-ASCII (OEM) but the values are different with your sonic.wav

QuArK cannot extract dmg. I did this, save as .. and added the .dms extension to the DM1 file
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

After you removed the "0" in header, then insert this 22 56 00 00 bytes

lsonic.wav or rsonic.wav could be played via windows media player or other player?

because..after this manipulation, the music does not play for me in wmp. Is that it should be?
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

This is in Entities.txt, the first row of the script

{
"message" "V® In The Hood Niggas ! made by : Cеdrи ..."
"chopsky" "255"
"chop" "255"
"startmusic" "1" -----------------------------------Right ? Added
"musicset" "sonic" --------------------------------Right ? Changed
"ainame" "kos3"
"sky" "bos2"
"classname" "worldspawn"
}
{


This is written in the console:

Downloading sound/music/SONIC/lsonic.wav.sound/music/SONIC/rsonic.wav
File not found.
Couldn't load sound/music/SONIC/lsonic.wav.sound/music/SONIC/rsonic.wav
Reactions: 15
Posts: 718
Joined: 23 Nov 2011, 16:42
Location: Canada

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by Acadie »

GStuff002 wrote:because..after this manipulation, the music does not play for me in wmp. Is that it should be?
True
GStuff002 wrote:This is written in the console:

Downloading sound/music/SONIC/lsonic.wav.sound/music/SONIC/rsonic.wav
File not found.
Couldn't load sound/music/SONIC/lsonic.wav.sound/music/SONIC/rsonic.wav
I bet you used a period (2E hex) between wav and sound. There, it should be 00 (NUL byte) like the original. This cannot be changed. Although, it's normal to see that you got tricked because both share the same ASCII character but internally, they are fundamentally different. Important to check both section.
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

test3
After join to server, the music was downloaded to a different folder

Console:

failed to rename
Couldn't load sound/music/test3.wav




I didn’t understand anything at all. If the case is in the Editor, please upload your. And a couple of pictures where I missed. It's almost the finish, but somewhere I'm making mistakes
-------------
(2E hex) between wav and sound. There, it should be 00 (NUL byte) like the original. This cannot be changed. Although, it's normal to see that you got tricked because both share the same ASCII character but internally, they are fundamentally different. Important to check both section.
------------
Reactions: 0
Posts: 55
Joined: 09 Nov 2021, 20:50

Re: [SOF1] Ed. Entities. How to add music to the map. Need H

Post by GStuff002 »

I make screenshots of how I do everything:

https://easyupload.io/frr1sp" onclick="window.open(this.href);return false;
Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests