Skip to content

Commit

Permalink
Merge pull request #877 from delta-kimigatame/debug_classic_pitch_whe…
Browse files Browse the repository at this point in the history
…n_change_tempo_

fixed:classic pitch when changing tempo
  • Loading branch information
stakira authored Oct 10, 2023
2 parents a57ae2c + 0d2ce87 commit 984e3a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenUtau.Core/Classic/ResamplerItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public ResamplerItem(RenderPhrase phrase, RenderPhone phone) {
int tempoPitchSkip = (int)Math.Floor(MusicMath.TempoMsToTick(tempo, startMs - phoneStartMs) / 5.0);
tempoPitchCount = Math.Min(tempoPitchCount, pitches.Length - tempoPitchSkip);
int phrasePitchSkip = (int)Math.Floor(phrase.timeAxis.TicksBetweenMsPos(phraseStartMs, startMs) / 5.0);
double intervalPitchMs = phrase.timeAxis.TickPosToMsPos(5);
double intervalPitchMs = 120 / tempo * 500 / 480 * 5;
double diffPitchMs = startMs - phraseStartMs - phrase.timeAxis.TickPosToMsPos(phrasePitchSkip * 5);
double tempoRatio = phone.tempos[i].bpm / tempo;
for (int j = 0; j < tempoPitchCount; j++) {
Expand Down

0 comments on commit 984e3a9

Please sign in to comment.