GenericMadScientist / CHOpt

Star Power optimisation for the masses!
GNU General Public License v3.0
35 stars 6 forks source link

Pro Drums and Enable dynamics options not working (.mid / .chart, CH Engine) #14

Open jpetersen5 opened 4 weeks ago

jpetersen5 commented 4 weeks ago

Enabling / disabling these options have no effect on the output path, and the output path seems to always be the score of an optimal, non-dynamic non-pro path.

Through testing I've found that .chart songs do properly calculate dynamics, but not pro drums.

It probably has something to do with the note value calculation here:

    if (note->flags & SightRead::FLAGS_DRUMS) {
        if (note->flags & SightRead::FLAGS_CYMBAL) {
            note_value = engine.base_cymbal_value();
        }
        if (note->flags & (SightRead::FLAGS_GHOST | SightRead::FLAGS_ACCENT)) {
            note_value *= 2;
        }
    }

It could be the SightRead flags aren't being set properly so these conditions aren't passing.

image

Thanks for the hard work

GenericMadScientist commented 4 weeks ago

Good catch, I'll give it a look.

GenericMadScientist commented 3 weeks ago

Turns out there's two main issues at play here.

If a chart has pro drum markers, SightRead reads them correctly and CHOpt correctly disables them for drawing non-pro drums, but does not disable them for scoring. There's a similar bug with disco flip.

The other issue is that it looks like if a chart has no cymbals, CH will automatically convert YBG to cymbals. Need to investigate further to see what the behaviour is, and ask Matt.

I don't see any issues with dynamics. If you can provide an example, I'd be happy to look further.

jpetersen5 commented 3 weeks ago

Sure, and thanks for figuring things out. Dynamics work fine for .chart as far as I can tell, it's .mid that have issues, or maybe specifically .mid from files generated by the Onyx toolkit? I don't have any .mid that aren't from Onyx so I don't know but here's an example: image And to show it has dynamics: image

Here's the link to the song file if you want it for testing https://drive.google.com/drive/folders/1sFNJn1mzS-jzJRrShz2v4gDmBBy5lk2k

jpetersen5 commented 3 weeks ago

Also, regarding a chart defaulting to cymbals, maybe it's related to how toms are charted in midi? At least when charting in a DAW like Reaper, YBG are default cymbal notes and you have to mark the toms with an extra midi note for pro drums image