nununoisy / gb-presenter-rs

GBS/LSDj visualizer based on SameBoy and FFmpeg
MIT License
59 stars 1 forks source link

GBPresenter

GBPresenter is a tool I wrote to generate visualizations of Game Boy chiptunes, based on SameBoy, FFmpeg, and Slint. The visualization design is essentially a port of the piano roll from RusticNES. It supports playing music from GBS files, VGM files exported from Furnace/DefleMask, and from save files for most versions of Little Sound Dj.

Slint logo Slint logo

Functionality

GBPresenter runs your GBS, VGM, or LSDj ROM in SameBoy and captures the state of the APU channels every frame. It then generates a visualization and feeds it to FFmpeg to be encoded as a video.

Features

Installation

Windows: head to the Releases page and grab the latest binary release. Simply unzip and run the executable, and you're all set.

Linux: no binaries yet, but you can compile from source. You'll need:

Clone the repo with submodules (git clone --recursive), cd in, and run cargo build --release to build.

Usage

GUI

  1. Click Browse... to select a GBS, VGM, or an LSDj ROM file.
  2. If you selected an LSDj ROM file, select Browse... next to the LSDj SAV field to select your LSDj save file.
  3. Select a track to be rendered from the dropdown.
  4. Select the duration of the output video. Available duration types are:
    • Seconds: explicit duration in seconds.
    • Frames: explicit duration in frames (1/59.97 of a second).
    • Loops: if loop detection is supported, number of loops to be played.
  5. Select the duration of the fadeout in frames. This is not included in the video duration above, rather it's added on to the end.
  6. Select the output video resolution. You can enter a custom resolution or use the 1080p/4K presets.
  7. Optionally select a background for the visualization. You can select many common image and video formats to use as a background.
    • You can also elect to export a transparent video later if you would like to use a video editor.
    • Note: Video backgrounds must be 60 FPS, or they will play at the wrong speed. A fix for this is planned.
  8. Click Render! to select the output video filename and begin rendering the visualization.
    • If you would like to render a transparent video for editing, then choose a filename ending in .mov to export in a QuickTime container. When asked if you would like to export using ProRes 4444, select OK.
  9. Once the render is complete, you can select another track or even change modules to render another tune.

CLI

If GBPresenter is started with command line arguments, it runs in CLI mode. This allows for the automation of rendering visualizations which in turn allows for batch rendering and even automated uploads.

The most basic invocation is this:

gb-presenter-rs --lsdj lsdj.gb songs.sav path/to/output.mp4

or

gb-presenter-rs --gbs songs.gbs --track 3 path/to/output.mkv

or

gb-presenter-rs --vgm song.vgm path/to/output.mov

or

gb-presenter-rs --2xlsdj lsdj.gb songs.sav lsdj2x.gb songs2x.sav --track 1 --track 2 path/to/output.mp4

Additional options: