Skip to content

Add vocals censorship chart feature (core)#405

Open
Supersonicboss1 wants to merge 18 commits into
YARC-Official:masterfrom
Supersonicboss1:vocal-censorship
Open

Add vocals censorship chart feature (core)#405
Supersonicboss1 wants to merge 18 commits into
YARC-Official:masterfrom
Supersonicboss1:vocal-censorship

Conversation

@Supersonicboss1

@Supersonicboss1 Supersonicboss1 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

As described here: https://docs.google.com/document/d/1L5yDejAOpbSnDvicgh6Id0aIeMewORVBQRStErAnogw/edit?usp=sharing

This encompasses three parts, each of which are technically independent from each other, but all of which depend on the "Censor Mature Content" setting being enabled in YARG:

  1. Stems - Depends on [stem]_clean or [stem]_explicit files being present. If censor mature content is disabled, loads the normal vocal stem, and if present, the _explicit file. If the setting is enabled, attempts to load _clean, then if it does not find that for a particular stem, loads the normal variant.
  2. Content Rating - If a song is rated as "Mature" or "Sensitive Content", and clean_vocals = 1 is found in the ini, drop the rating to "Supervision Required".
  3. Chart - If the [CENSORSHIP_MARKERS] text event is found in that vocals part, anywhere where MIDI note 104 is covering a vocal note, remove the note, and replace the entire word with a dash. The state of this setting is also stored in replays, to ensure correct playback.

While I am relatively happy with the stem and content rating implementations, I am unsure about the chart stuff. The way I have it implemented here is as a public post-processing step in SongChart, which applies the transformation. Not sure if this is better, or if passing it further up the chain to MoonSongLoader (or handling it in GameManager) is a better idea. Furthermore, because of the way this works, it requires looking at vocal notes in MoonSongLoader's lyric parsing which doesn't deal with flags at all, making it a bit less clean.

Also, sorry about the random whitespace changes, I have no idea how to make Rider stop doing that.

Depends on YARC-Official/YARG#1529

@wyrdough

Copy link
Copy Markdown
Contributor

I have not done a full review, but a quick read-through of the diff did not show any obvious glaring architectural issues, so I don't think any massive redesign is going to be required before merging this.

Thanks for handling this, I know there are some team members who are quite interested.

@wyrdough wyrdough left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I can see from looking at the diff alone. Feel free to push back, because I'm definitely missing context.

Comment thread YARG.Core/Chart/Notes/VocalNote.cs Outdated
Comment thread YARG.Core/Song/Entries/Ini/SongEntry.UnpackedIni.cs

public int PlaylistTrack => _metadata.PlaylistTrack;

public SongRating SongRating => _metadata.SongRating;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this have changed to public SongRating SongRating => GetSongRating(); instead of being deleted outright?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if I should enforce an explicit contract with any code that gets SongRating - essentially, should they be required to consider explicitly whether to return that with censorship enabled or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants