Skip to content

AddyMills/RB-Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RB-Tools

Various Tools to work with Rock Band files. Written using Python 3.9. Dependencies, if any, are listed in each section.

Please note, you need all files in the repo for it to work properly. All of the scripts rely on the Python files found in the "common" folder.

Create Song Package

Uses various elements of this repository (and DTXTool) to create a song package for converting to RB3 or RB2. Currently creates a songs.dta file with all the data from the RB4 song and converts the MIDI from an rbmid to mid.

Lipsync Converter

Takes an RB4 "rbsong" or lipsync_ps4/pc file, grabs all lipsync data and outputs up to 4 .lipsync files to be used in RB2 or 3.

Usage: Drag an "rbsong" file onto the script, or use it in a batch to convert multiple files in a folder. The files will have the same name as the input file with a number indicating the part and ending in .lipsync.

Should not need any dependencies.

Converter.mp4

Lipsync Visualizer

Dependencies: matplotlib, progress

Takes an RB2/3 or converted RB4 lipsync file and produces a bar chart for each frame in the file. Produced bar charts can be stitched together at 30fps to sync perfectly with the audio.

This is just for fun. Images do take a while to generate. Depending on length, most songs are between 6,000-8,000 frames. I want to try and implement multiprocessing to speed up generation, but can't figure it out at this point. Something for the future to implement.

VisualPreview.mp4

Lipsync2Midi

Dependencies: mido, numpy

Takes a lipsync file and inserts all viseme events into a MIDI file that is compatible with Onyx's Lipsync tab found in Other Tools. Useful for viewing official viseme data, or splicing MIDI tracks together and have Onyx make a combined lipsync for you.

Usage: Run the script with a lipsync file as its variable. The program will look for all lipsync files in the folder and outputs a 120bpm MIDI that has the visemes synced to the song. Add "-split" (no quotes) to the script arguments to split each viseme from each lipsync file to a separate track within the MIDI.

Optionally, if you have a MIDI file in the same folder as the lipsync files, it will add the LIPSYNC# tracks to that MIDI. If you use this functionality, make sure to only have one MIDI file in the folder. Multiple MIDI files will result in duplicate tracks for some reason I haven't been able to debug. But only having one will not cause duplicates.

Example: Lipsync2Midi.py song.lipsync -split

Link to Onyx: https://github.com/mtolly/onyxite-customs

Milo2Midi

Dependencies: mido, numpy

Takes a song's anim file (found in the milo of a song) and converts all data to a MIDI track. Think of this as a reverse Milo Mod tool.

For now, you must extract the anim file yourself from a song's milo file (Onyx can do this).

Usage: Run the script with the .anim file as an argument. Optionally, you can also add a MIDI file as an argument. It will read through the anim file and give you a midi file containing all events found in the anim file separated into multiple tracks.

If you opt to add a MIDI file, the events will get added to that MIDI. This is the most accurate solution.

If a MIDI file is not present, it uses a default MIDI file with a BPM of 120bpm. This will work fine to quickly check, but it's not as accurate as using a MIDI file.

The name of the output will be a MIDI file and use the name and folder location of your first argument with "merged" added to it.

Optional: add "separate" to your arguments to get separated venue tracks (lights, camera cuts and post procs)

This does not yet work with with song .anim files from TBRB

RBsong2Midi

Dependencies: mido

Similar to Milo2Midi, but this works with RB4's rbsong file. Takes in an rbsong file as an argument, and outputs a MIDI file with the venue events from the rbsong file.

Will rename any non-basic pp event to ProFilm_a, ProFilm_b, or film_bw (whichever is closest) to make ported songs look nicer.

MIDI file with the same name as the rbsong is required for this script to work.

Will also extract the metadata for a song and place it in a text file in the folder (tonic note, vocal speed, drum soundbank, etc.). This portion of the script does not need a MIDI file.

Optional Arguments:

Add "separate" to your arguments to get separated venue tracks (lights, camera cuts, and post procs)

Add "rb4" to your arguments to get the original post process calls.

Songdta2txt

Dependencies: none

Parses the songdta_ps4 file and writes a file similar to an RB2/3 songs.dta file. Data parsed is unorganized for now, but you can copy/paste them into a songs.dta file in the appropriate places.

Usage: Run the script with the songsdta_ps4 as its only argument

Voc2Lipsync

Dependencies: mido

Converts a voc lipsync file from GH2 and (potentially) KR to the lipsync format used by RB2 and above. This only converts the mouth movements and blink events. Using the Audrey script to add some eyebrow movements could make these lipsync files really pop.

Usage: Run the script with a voc file as its variable. Optionally, you can have a third argument to exaggerate the mouth movements. Enter this number as a decimal up to 1.5 (150%).

Example: Voc2lipsync.py freebird.voc 1.2

This will convert the Free Bird voc file to RB2 lipsync while exaggerating the animations by 20%.

Acknowledgements

Most of the code used in the Python scripts is my own with contributions from rjkiv. DTXTool by maxton (with edits from InvoxiPlayGames) is also used as a dependency for one of the scripts to make an RB3 song package. I would also like to extend special thanks to Maxton and PikminGuts92 for having 010 templates available to figure these scripts out

DTXTool Repo Link: https://github.com/AddyMills/DtxCS (forked from InvoxiPlayGames who forked it from Maxton)

About

Various Tools to work with Rock Band Files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages