MeshugaPalejo Posted November 15, 2021 Share Posted November 15, 2021 (edited) Thought I would make a guide on how to replace the songs in GTA IV's existing radio stations (ie. not putting songs in Independence FM, but actually changing the tracks on Liberty Rock radio, etc. and having the DJs talk over them with intros & outros). Unfortunately I haven't figured out how to add new songs, only replace the current ones. I recommend using a radio downgrader to get a version of the game that still has the cut songs so that you have more tracks to work with. Also obviously you should make a backup of all your vanilla audio files that are in the "GTAIV/pc/audio" directory before you do this. What you'll need: - Audacity - OpenIV - IV/EFLC Rage Audio Toolkit & IV Audio Editor 1. Decide on the songs you want to insert into the game. Also decide what vanilla songs you want to replace. You'll want to use a notepad doc to keep track of which new songs you're using to replace which vanilla tracks. Obviously it's easier to replace the songs on radio stations with files for individual tracks (if you want to replace the songs on Beat, Ramjam, Electro Choc, Classics or Massive B you'll have to make a "mix" of all your songs in one big audio file as this is how these stations stream their music in the game). Also, if you have a new song by an artist that already has a song in the vanilla game it's a good idea to replace the file for that artist's song because you can have the DJ use the same intro (e.g. you can get Iggy Pop to say "this is a good tune by Bowie" over a different David Bowie song if you replace the file for Fascination). 2. Optimize your new audio files using Audacity (you can import multiple audio files in one project if you want to work on multiple tracks at once). The audio files need to be as amplified as possible but without any peaking/clipping in the waveforms as this will be very noticeable when in-game. To fix up your audio files, I find the easiest way to do this is to open them in Audacity, highlight all the audio of a song, use the Amplify effect with the "allow clipping" box unchecked, then use the Limiter effect with "apply make-up gain" set to "yes" and try different "limit to (db)" settings until the waveform fills up the oscilloscope nicely but with minimal change to the shape of the waveform (for most songs it's around -0.5gb to -2.5db). Also make sure there's no silence at the start and end of each track. Once you're happy, set the Project Rate to 32000 Hz (bottom left of screen). Don't export songs or close Audacity just yet! 3. Extract the original vanilla track files that you want to edit from the game files using OpenIV. It's easiest to do it one radio station at a time. For this guide I'll use IF99 as an example. So for IF99 I would use OpenIV to navigate to "GTAIV/pc/audio/sfx/radio_afro_beat.rpf/RADIO_AFRO_BEAT", then extract all of the Audio Files that are not station IDs (eg. ID_01) or DJ solo bits (e.g. SOLO_01) to a new folder called something like "if99" somewhere on your computer. So you'll have ACHANCEFORPEACE, CRYINFORLOVE, etc, as files without any extension in their own folder. 4. Convert the vanilla files into workable file formats using the IV Audio Editor that comes bundled with Rage Audio Toolkit. To do this, drag the files you've just extracted from OpenIV that are in "if99" onto the .exe file named "IVAudioConv.exe" in the RAGEAT directory. Explanatory Pic here. This will convert each vanilla files into its two component files: an .OAF file and a .WAV file. These new files will appear in the original directory where the extension-less files were ("if99"). 5. Delete the vanilla audio files that you extracted to "if99" (or equivalent) in step 3. You will now be building new versions of these files using the OAF and WAV files you just extracted. If you'd prefer not to delete them you can move them to a different directory somewhere for backup, but like I said at the beginning you should have made a backup of all your vanilla game files somewhere anyway. 6. Set the DJ intro & outro regions for each file. These are the periods at the start and end of each of your songs that are sort of "safe zones" within which it's appropriate for the station's DJ to say an intro or outro for each song. To set these, you will open the .OAF file for each track and look at the "timestamps" section. It should look like this: Quote "timestamps": [ { "eventTypeHash": 148611320, "parameter": 1150715834, "flags": 0, "time": 1323 }, { "eventTypeHash": 148611320, "parameter": 751231070, "flags": 0, "time": 7274 }, { "eventTypeHash": 148611320, "parameter": 2110693280, "flags": 0, "time": 130462 }, { "eventTypeHash": 148611320, "parameter": 1910037677, "flags": 0, "time": 156157 }, { "eventTypeHash": 2799252038, "parameter": 1104674816, "flags": 0, "time": 0 } The 5 "time" values are millisecond values within the song. The first 4 "time" values are: the start of the DJ intro, the end of the DJ intro, the start of the DJ outro and the end of the DJ outro respectively. I'm not sure what that 5th "time" value is for, but it always seems to be set to 0 or similar so just leave it. Sometimes the OAF files will have these values mixed around in a different order, but you'll know which is which by noticing the order in which the values ascend. These timestamps are currently set to times at which DJ speech would make sense during the vanilla song. If you dont change these you might have the DJ interrupt the middle of a chorus in your new song saying "let's listen some ads" but there's still 3 minutes of song left. Basically you need to set these values so that they delineate the instrumental portions at the start and end of each of your new songs over which the DJ can talk and not interrupt the lyrics. As you've probably experienced, it won't always be the same intro or outro speech that plays over each song when they play in-game, but the DJs never interrupt the song lyrics and these values are how the engine knows how to prevent this by playing a chunk of DJ speech that's an appropriate length. To get these millisecond values from your new songs, look at the tracks you have been optimizing in Audacity and find the moments at which a DJ intro/outro should start/end, noting the times in miliseconds by looking at the Selection toolbar and Time toolbar (bottom of screen by default). As a rough rule of thumb you want to make the intro go for 5-20 seconds and the outro go for like 15-25 seconds, but ultimately these regions should be as long as possible. The closer you can have the DJ stop talking at the start of the song to when the artist's lyrics come in the more satisfying it is (fun fact: in radio presenting, this phenomenon is called "hitting the post" or "backtiming"). If there's not enough instrumental time in your new song for a DJ to talk over at all, you can just delete either both of the intro timestamps (1st & 2nd) or both of the outro timestamps (3rd & 4th) and the game just won't play any DJ speech over that part of the song. Make sure you delete everything between the "{ }" brackets, as well as the brackets themselves, to delete a timestamp. Once you've got your timestamps set in the .OAF file for a song, save the .OAF file. Don't change the filename or anything else in the file other than the timestamps. 7. Set the new track lengths in the .dat15 files. Using the Rage Audio Toolkit (RAGEAT.exe) open your game directory's sounds.dat15 file (or EP1_RADIO_SOUNDS.dat15 or EP2_RADIO_SOUNDS.dat 15 if you're replacing tracks in either DLC). In the Meta tab, scroll down to each track that you're replacing and click the first entry for the track. For example, scrolling to RADIO_AFRO_BEAT_ACHANCEFORPEACE and clicking it you will see this screen: Then, in the Hex data on the right, you want to click the cell that is in the 2nd row under the 3rd column (under "2"). It's always the cell above the right-most pink cell on the bottom row if that makes it easier to remember. Once you've clicked this cell, you need to change "Signed Int" value for this cell to the length of your new track in milliseconds. Again, you can get this information about your new track's length in milliseconds from Audacity. So in the above example, the track with which I am replacing ACHANCEFORPEACE is 236069 milliseconds long (or 236 seconds and 69 milliseconds) so this is what I've set the "Signed Int" value to. You then click Save in the bottom righthand corner of the screen (do this as soon as you change the value for each track). Once you've changed all the tracklengths in the .dat15 file, go file > Save All and quit RAGE AT. 8. Add 15 seconds of silence to the end of your audio track in Audacity. For some reason when converting WAV files into the game's audio files using the IVAudioConv.exe tool, there will often be a noticeable distortion in the last 5-15 seconds of the song once in-game, but by making the last 15 seconds of the audio file silence this is avoided. More on this later. Just go into Audacity for each track and use the Generate Silence tool to generate 15 seconds of Silence at the end of each of your tracks. The length values you entered into RAGE Audio Toolkit in the previous step should not include this 15 seconds of silence. 9. Export as WAV from Audacity. Use the "Signed 32-bit PCM" encoder. Export each track with the name of the track that you're replacing (e.g. "ACHANCEFORPEACE.wav") or just export to WAV with the song's actual name and manually rename the exported WAV file to the filename of the vanilla track it's replacing. 10. Replace the vanilla WAV files with your newly exported WAV files. In the "if99" directory, you would now have new WAV files and edited OAF files. 11. Drag & drop the new OAF & WAV files into the IV Audio Editor (IVAudioConv.exe). Like in Step 4, highlight all of the OAF & WAV files you've been tinkering with and drag them all onto the IVAudioConv.exe file in the RAGEAT directory. This should generate new files for each track that you can now put back into OpenIV. If the newly generated game audio files don't appear in "if99" you may have made mistake in the .OAF file, or maybe the filenames don't match. 12. Insert the newly generated audio files into OpenIV. Use OpenIV to navigate to GTAIV/pc/audio/sfx/radio_afro_beat.rpf/RADIO_AFRO_BEAT. Turn on "Edit mode" in OpenIV. Drag & drop the newly created files that IVAudioConv.exe generated into the OpenIV window. It will replace the existing tracks. Boom, you're done. Pretty tedious process, but it will hopefully mean you can enjoy the vanilla radio stations again if you've been listening for them to years like me. KNOWN ISSUES: - The 15 seconds of silence at the end of the inserted tracks can occasionally cause a few seconds of silence when listening to the radio in the game. Most commonly when a weather update is played. This is because the weather update audio files are usually less than 15 seconds, so the game finishes the weather update then has to wait out the remainder of the 15 seconds of silence playing underneath it before it can play the next song. As a fix for this, I've lengthened all of the weather updates so that this silence is much less noticeable. If you'd like my lengthened weather updates files, here's a link: https://mega.nz/file/1hknAAhR#_ZOwt0CyJeGau_iug0dkJnLDbOkfxKPEtIuepna1mNA Silences also occasionally happen when DJs have a solo speech that is less than 15 seconds occurring between 2 songs. I'm looking at potentially lengthening these short DJ "solos" to help cover the silences but they occur less often than the weather update issue. Also if anyone can fix the issue with the IV Audio Converter causing the distortion in the last 15 seconds of a track that would be ideal! I'm guessing it's something to do with R* using some special in-house encoder for audio files that Audacity can't replicate, or otherwise a bug in AndrewMulti's program. - Some DJ Intro tracks will obviously not make sense with your new song when they mention the name of the song (e.g. Juliette saying "Here's 'Get Innocuous' by LCD soundsystem" or whatever). To remedy this, you can extract each radio station's "INTRO" Sound Bank file from it's RPF directory in OpenIV, and using the IVAudioConv.exe tool you can unpack the archive and then delete/edit the DJ Intro WAV files that don't make sense anymore. Before you recompile the archive, make sure you go into the OAF file for the sound bank and delete the instances of the Introductions whose WAVs you deleted. The game then won't play what you deleted but will still play any generic DJ introductions instead. Let me know if you need me to clarify this. Edited November 15, 2021 by MeshugaPalejo V, MaveriX and sirebire999 2 1 Link to comment Share on other sites More sharing options...
red84140 Posted November 25, 2021 Share Posted November 25, 2021 (edited) I'm adding new songs to the game without replacing, do you need to change the other entries in RAGE Audio Tool, how do I put a new song in a specific station, and how do you add the song titles to american.gxt? I want the song can be recognized by ZiT! too. Edited November 25, 2021 by red84140 Link to comment Share on other sites More sharing options...
red84140 Posted January 20 Share Posted January 20 Is there a guide to add new songs without replacing yet? takemeoff 1 Link to comment Share on other sites More sharing options...
MaveriX Posted January 30 Share Posted January 30 On 1/20/2023 at 6:55 AM, red84140 said: Is there a guide to add new songs without replacing yet? probably not takemeoff 1 Link to comment Share on other sites More sharing options...