Add an "Autosync Tempo" feature. This uses a linear Least Squares
Regression to figure out a line through the user's step errors to minimize that error. It then uses the slope of that line to fix the tempo and the intercept to fix the offset. Stops are adjusted as if they were originally calculated as a number of beats, ie the slope is also used to change the stops. Also fixed is a bug where the user doesn't get a chance to keep or reject the sync changes when ESCing (ZZing) from a song. R=glenn
This commit is contained in:
@@ -83,6 +83,7 @@ static LocalizedString AUTO_PLAY ( "ScreenSyncOverlay", "AutoPlay" );
|
||||
static LocalizedString AUTO_PLAY_CPU ( "ScreenSyncOverlay", "AutoPlayCPU" );
|
||||
static LocalizedString AUTO_SYNC_SONG ( "ScreenSyncOverlay", "AutoSync Song" );
|
||||
static LocalizedString AUTO_SYNC_MACHINE ( "ScreenSyncOverlay", "AutoSync Machine" );
|
||||
static LocalizedString AUTO_SYNC_TEMPO ( "ScreenSyncOverlay", "AutoSync Tempo" );
|
||||
void ScreenSyncOverlay::UpdateText()
|
||||
{
|
||||
vector<RString> vs;
|
||||
@@ -103,6 +104,7 @@ void ScreenSyncOverlay::UpdateText()
|
||||
case SongOptions::AUTOSYNC_OFF: break;
|
||||
case SongOptions::AUTOSYNC_SONG: vs.push_back(AUTO_SYNC_SONG); break;
|
||||
case SongOptions::AUTOSYNC_MACHINE: vs.push_back(AUTO_SYNC_MACHINE); break;
|
||||
case SongOptions::AUTOSYNC_TEMPO: vs.push_back(AUTO_SYNC_TEMPO); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user