From 2118fb3fddd13ed3928a031d222b1e8d7e84994e Mon Sep 17 00:00:00 2001 From: LTVA1 <87536432+LTVA1@users.noreply.github.com> Date: Sun, 25 Aug 2024 16:30:46 +0300 Subject: [PATCH] trust me bro this time freq is correct even for custom clock fr fr --- src/engine/platform/tx81z.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/platform/tx81z.cpp b/src/engine/platform/tx81z.cpp index e9542aad9..6fe8d52a2 100644 --- a/src/engine/platform/tx81z.cpp +++ b/src/engine/platform/tx81z.cpp @@ -345,7 +345,7 @@ void DivPlatformTX81Z::tick(bool sysTick) { if(chan[i].opsState[j].hasOpPitch) { pitch2=chan[i].opsState[j].pitch2; } - int opFreq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,arp,fixedArp,false,2, pitch2,chipClock,(524288.0 / 4.0) * 261.63 / 306.0,0); + int opFreq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,arp,fixedArp,false,2, pitch2,chipClock,(524288.0 / 4.0) * 2093.0 / 2192.0 * chipClock / 4000000.0,0); if (opFreq<0) opFreq=0; if (opFreq>65280) opFreq=65280; int freqt=toFreq(opFreq);