Arma 3
FSH Radio
Fishy  [developer] 5 Mar, 2017 @ 5:42am
How to add your own music
Hello, welcome to the README.

Firstly, thanks for downloading the mod. Thats cool of you.
This readme is aimed at people who want to add content to the radio- music, or stations. I have made this task as
easy as I can so grab a pew and dig in.


/////////////////// CREATING YOUR OWN SOUNDS ////////////////////////////////
Method 1- Mod

this method is probably better for sounds that you are going to use lots. it will keep mission file sizes down and
allow you to intergrate music into exsisting missions.
Cons- copyright issues slightly more obvious here, so if you go down this road, keep it for private use or make sure you
own the rights to the audio you are using.

the file "fsh_music.pbo" is a good example of how to add your own music. De-pbo it to have a look.

1) create a folder on your P: drive. (or any where to be honest, it isnt important). eg. "new_music"
2) add the .ogg files to your directory (eg. "song.ogg");
3) add a "config.cpp". It should include both figures A and B:
//----------------------------//
//----- Figure A --------//
//---------------------------//
class CfgPatches {
class #YOURCLASSNAMEHERE {
units[] = {};
weapons[] = {};
requiredVersion = 1;
requiredAddons[] = {};
author = "#YOURNAMEHERE";
version = 0.1;
versionStr = "0.10";
versionAr[] = {0,10};
};
};

//---------------------------//
//----- Figure B --------//
//---------------------------//
class CfgMusic {
class #YOURCLASSNAMEHERE {
name = "#SONGNAME"; //Not the ugly class name, the nice display one
duration = 225; //How long it is in seconds. Do some maths boi
artist = "PRINCE"; //Give credit to the artist
type = "song"; //Can be anything you like, but if its a song leave this alone
theme = "pop"; //This is instead of Genre, because BIS
tags[] = {pop,jazz,funk,soul} //You can put as many things here as you like
sound[] = {"#foldername\#filename.ogg", db+0, 1.0}; //Only change the string
};

class #music2 {
etc...

};
//---------------------------//

4) now you have your mod. Compile it using a pbo builder and plug it in to a mod folder. Thats it!


/////////////////// CREATING YOUR OWN SOUNDS ////////////////////////////////
Method 2- Mission files

If you are using this method then fair enough, just bear in mind the mission files will be huge.

1) in your mission "description.ext" you must include figure B. it works exactly the same, path starts at mission folder root

missionFolder >> "music" >> song.ogg

for example. then the "sound[] =" bit of your class will read
{"missionFolder\music\song.ogg", ...

2) thats it. Do that for every mission

/////////////////// CREATING YOUR OWN RADIO////////////////////////////////

If you fancy creating a radio station, its actually very easy. here is an example

//--------------------------//
//-------Figure C-------//
//--------------------------//

class CfgRadioStations {
class radio_goon {
name = 'My Radio Station'; //This is the name. IF you cant get that, maybe this is too much for you.
program[] = {song,advert,song,chat}; //This is the running order of your show. More on that later
debug = 0; //Set to 1 if you want to see lots of log messages
Speed = 1; //Not sure if this still works, best to leave it at 1
class song {
tracks[] = {};
types[] = {song};
themes[] = {pop,rock,jazz};
};
class advert {
tracks[] = {};
types[] = {advert};
themes[] = {silly};
};
class chat{
tracks[] = {chat_1,chat_2};
types[] = {''};
themes[] = {casual};
};

};
};

//------------------//

Figure C creates a radio station that plays a song, then an advert, a song and then a chat clip.
If you look at the program[] entry, you see it referese to the classes bellow. You could make up any class you like
and create any order. Each category you create has a search criteria that you define. class 'advert' will look for tracks
that have "advert" as their type. class 'song' will look for a song that has one of 'pop', 'rock' or 'jazz' in its tags (also includes theme).

The station will pick a result at random every time so when the program reaches its end it doesnt loop exactly.
neat, hu?!

You can include this in either a "config.cpp" (for a mod) or "description.ext" (for a mission) and it will work just the same.

If you are unsure of anything, simply de-pbo any of mine and have a look. The only PBO that is code based is the fsh_radioCore- everything else simply adds audio content.
Last edited by Fishy; 9 May, 2017 @ 7:10am
< >
Showing 1-3 of 3 comments
☺ImPeRiaL☺ 15 Aug, 2017 @ 12:30am 
Man, this needs a video tutorial :D hard to understand because i don't script.
Monsieur Le Ping 24 Aug, 2017 @ 8:01am 
Hello, I am not an expert in C ++, but I would say that there are some errors in the code or in the instructions so I would like to ask you to hang on the net some template template in cpp format and to comment the code a little, for The rest thank you very much.

P.S:
In cooperative, the sound is not heard as it should, although the players can interact with lamisma radio, the sound is not heard sometimes in some players, this is not by the configuration of the sound.
Pimp 4 Oct, 2021 @ 11:06am 
Is it possible to add music from YouTube? Because I want to listen to CCR while I commit more war crimes.
< >
Showing 1-3 of 3 comments
Per page: 1530 50