[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] UnaryOpUGen with dbamp and ampdb broken for audio-rate?



These unary ops appear broken at audio rate and demand rate. It seems like something is wrong with exponentiation.


// for reciever 0:

cpsmidi
[ -inf, -inf, -1455, -1455 ]
ratiomidi
[ -inf, -inf, -1524, -1524 ]
ampdb
[ -inf, -inf, -764.6162109375, -764.6162109375 ]
cpsoct
[ -inf, -inf, -122.25, -122.25 ]
log
[ -inf, -inf, -88.029693603516, -88.029693603516 ]
log2
[ -inf, -inf, -127, -127 ]
log10
[ -inf, -inf, -38.230812072754, -38.230812072754 ]

I've made the following test:


(
f = { |operator ... args|
	operator.postln;
	{
		var cases;
		cases = args.collect { |x|
			[
				x,
				DC.kr(x),
				DC.ar(x),
				Duty.ar(1, 0, Dseq([x])),
			]
		};
		cases.flop.collect { |x|
			var a, b;
			#a, b = x;
			a.perform(operator, b)
		}
	}.loadToFloatArray(0.01, s, { |x| x.clump(4).at(100).postln })
};
)

(
fork {
	['neg','reciprocal','abs','asFloat','ceil','floor','frac','sign','squared','cubed','sqrt','exp','midicps','cpsmidi','midiratio','ratiomidi','ampdb','dbamp','octcps','cpsoct','log','log2','log10','sin','cos','tan','acos','atan','sinh','cosh','tanh','rand','rand2','linrand','bilinrand','sum3rand','distort','softclip','rectWindow','hanWindow','welWindow','triWindow','scurve','ramp'].collect( { |x| f.(x, 0); 0.1.wait; })
}
)
_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/