sc3-plugins icon indicating copy to clipboard operation
sc3-plugins copied to clipboard

AY UGen freqtotone method is incorrect.

Open telephon opened this issue 1 year ago • 2 comments

Yes, it seems to be the freqtotone method of the AY ugen is not correct.

*freqtotone { |freq|
		// Approximate empirical...
		//^(109300 / (freq - 3.70727))
		^(110300 / (freq - 0.5))
	}

Here is a test:


Here is the datasheet: http://atariage.com/forums/index.php?app=core&module=attach&section=attach&attach_id=397711
On page 18ff. there is a formula that needs proper implementation.

```supercollider
// starting point for tests.

(
Ndef(\x, { 
	var mapping = { |x| (110300 / (x - 0.5)) };
	var freq = MouseX.kr(200, 700);
	var f = mapping.(freq);
	AY.ar(f, f, f) + Saw.ar(freq) * 0.1 
	
}).play;
)

telephon avatar Jan 02 '23 12:01 telephon