Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Mobius on March 16, 2008, 02:59:55 am

Title: Using music soundtracks and other files...
Post by: Mobius on March 16, 2008, 02:59:55 am
This may not be the correct place to discuss the subject, but here you go...

Is there a limit to what a campaign design can add to a modpack? I know that many good campaigns use soundtracks taken from other games...are there any risks? Is there something we can't add at all?

I'd like, for example, to use "Silent" from Ace Combat 04 as briefing soundtrack. Is it possible? I didn't extract the file from the game, I DLed it from a site.
Title: Re: Using music soundtracks and other files...
Post by: haloboy100 on March 16, 2008, 12:37:22 pm
Why wouldn't you be able to do that?
Title: Re: Using music soundtracks and other files...
Post by: Nuclear1 on March 16, 2008, 05:10:11 pm
As long as there's a category for it in a VP, you can add it.

Music is tricky. Briefing music is easy to add: just save the file in your /music folder and add the necessary information to the .TBL file. Example:

$Name: BriefingName
$Filename: Acecombatmusic.wav

Battle tracks are far more difficult to add, however. There's a number of different numbers you have to figure in order to get them to work in the game. There's num_measures and samples_per_measure. I've never been able to figure out how you find these numbers though.
Title: Re: Using music soundtracks and other files...
Post by: blackhole on March 16, 2008, 06:16:27 pm
Samples per measure determines how long a measure is in the song, and then the number of measures is the song length divided by the number of samples per measure.

...However, i have no idea what the heck they mean by "samples per measure." What are these "samples" they speak of?  :confused:
Title: Re: Using music soundtracks and other files...
Post by: Darius on March 16, 2008, 06:50:12 pm
Put simply, samples are the little tiny bits of data that make up an audio file.

More information: http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29
Title: Re: Using music soundtracks and other files...
Post by: blackhole on March 16, 2008, 07:15:07 pm
The real question is, how do you determine how many samples are in a given time period?
Title: Re: Using music soundtracks and other files...
Post by: CP5670 on March 16, 2008, 10:20:00 pm
The whole "measures" thing has no effect on the game and is just an odd quirk with how the data is entered in music.tbl. See this. (http://www.hard-light.net/wiki/index.php/Music.tbl#Music_Tracks)

Put simply, samples are the little tiny bits of data that make up an audio file.

More information: http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29

That article describes the theory behind it. The idea is that you can evaluate a continuous function at discrete points ("samples") and use only that point data to uniquely build up the whole function again, under certain conditions on the function. The samples are the data stored in a music file, while the thing you hear out of your speakers is the original function reconstructed by the sound card's DAC. The sampling rate is the 22khz or 44khz thing you see on music files.
Title: Re: Using music soundtracks and other files...
Post by: Mobius on March 17, 2008, 02:17:27 pm
I was refering to the risks...legal risks...
Title: Re: Using music soundtracks and other files...
Post by: Darius on March 18, 2008, 06:45:23 am
Ah! Well, in that case:

http://www.hard-light.net/forums/index.php/topic,52739.0.html
Title: Re: Using music soundtracks and other files...
Post by: Mobius on March 18, 2008, 02:12:43 pm
I mean files in general(textures and voice files included), that thread is only about music.
Title: Re: Using music soundtracks and other files...
Post by: HAZARDLEADER on January 10, 2012, 09:40:47 pm
You mean i can't just add a file to the battle track line, with out figuring out this bull siht?
Title: Re: Using music soundtracks and other files...
Post by: mjn.mixael on January 10, 2012, 10:48:23 pm
Was that really worth a 4 year necro? Clearly this thread is outdated. play-sound-from-file is your friend.