-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AY UGen freqtotone method is incorrect. #348
Comments
There is also perhaps some relationship to the sample rate. I used AY successfully at 44.1 kHz and it was by and large in tune with other synths. But just now (perhaps for the first time) I ran it at 48 kHz. It sounded a bit less than a minor third too low. This is puzzling because 1/ if the AY sample/hold behavior works by counting samples, a higher sample rate would produce a higher pitch, but instead it's lower, and 2/ the ratio Baffled... PS The formula at this stackexchange thread is even worse -- 440 gets about a P4 difference at 48 kHz, and it varies with frequency.
|
the emulator uses a default clock frequency of 1773400 rather than 2MHz. accordingly, i tried (
a.free;
a = {
var freq = 440;
var toneFactor = 1773400 / 16;
var tonemap = { |freq| (toneFactor / freq).floor };
var tone = tonemap.(freq); // AY.freqtotone(freq).postln;
[AY.ar(tone, tone, tone), LFTri.ar(freq)] * 0.1
}.play;
) (in addition to the at 44.1kHz, this sounds to me even closer than the original |
Yes, it seems to be the
freqtotone
method of theAY
ugen is not correct.Here is a test:
The text was updated successfully, but these errors were encountered: