Skip to content

Repository files navigation

JRGuard logo and slogan

JRGuard

JRGuard is a highly configurable Windows companion app for the JR East Train Simulator that automatically plays station departure melodies (発車メロディ) for a more immersive experience.

Download now »»»

Compatible with Windows only.

Installation

For normies: download the latest release here.

For developers:

Requires Python 3.11+ and five wheel-only dependencies: PySide6, mss, numpy, sounddevice, soundfile.

.\scripts\setup.ps1
.\scripts\run.ps1
.\scripts\build.ps1

Calibration (required!)

JRGuard was built to be extremely lightweight and non-intrusive, and thus does not ship with OCR or image recognition models. This means you have to teach it where the countdown timer and drive light are on your screen. The app will remember these regions for each line you drive.

Important

You only need to do countdown digit training once.

Caution

You need to specify where the drive light is on your screen for each line, as each line's rollingstock has slightly different lamp positions on the screen.

  1. Start the sim and stop at a station so the countdown is visible. Click Select region and drag one box around the timer row, keeping the MM:SS value well inside the card's edges. The screen freezes while you drag and a magnifier follows the cursor for pixel-accurate edges.
  2. With the countdown ticking, click Start learning, let it run 30–60 seconds so every digit (0 to 9) appears at least once, then click Stop and label and tell JRGuard what each collected shape is. The colon gets Not a digit.
  3. Draw a box around the cab's orange drive light tightly. This is how JRGuard knows the train is standing at a platform, and the region is saved against the current line, so each line keeps its own. Without it a melody can play while the train is running.
  4. (optional!) Draw a box around the station name if you want per-station melodies.

Library Setup

Warning

Melody audio included in this repository is for educational purposes only and is the property of the respective copyright holders.

You can source your own melody audio, or use the included ones in melodies/.

Import melody audio by first creating a new line and clicking Add files. The app copies the files into its own data folder, so you can move or delete the originals safely. Make sure to select the correct line when driving from the dashboard.

Melody selection

Each line holds any number of variants, played either shuffled (never the same one twice in a row) or cycled in order. A line's whole pool is used by default.

Station overrides pin specific variants to specific stations for signature melodies. Register the station in Library → Station overrides while stopped there, then Assign melodies. A station with nothing assigned plays from the default pool.

Additional Settings

JRGuard is highly configurable. Once setup, feel free to tweak the settings to your liking. Below is my personal configuration, which I believe is a good starting point for most users.

jrguard_settings

Licence

JRGuard is under GNU GPL-3.0.

jrguard

About

A JREast Train Simulator companion app that automatically plays departure melodies as you drive.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages