Nes2DMC wrapper class for the Nes2 UGen



requires my BitOr plugin.  available at http://www.fredrikolofsson.com/pages/code-sc.html


simplifies the interface for the [Nes2] ugen a little.  provides standard ranges with clipping for all inputs.  no need to deal with bitwise register calculations, though note that this class is a bit less cpu efficient than to use the standard Nes2.

see also [Nes2Triangle], [Nes2Square], [Nes2Noise]


*ar(trig, loop, freq)

trig - control or audio rate trigger

loop - looping off or on 0/1

freq - frequency 0-15


note that all functionality is not implemented, but it can still be somewhat (mis)used.


s.boot

{Nes2DMC.ar(Impulse.kr(4), MouseX.kr(0, 1), MouseY.kr(0, 15))}.play


{Nes2DMC.ar(Impulse.kr(10), 1, SinOsc.kr([SinOsc.kr(0.05, pi, 0.5, 1.5).round, 1], 0, 7.5, 7.5).round(SinOsc.kr(0.19, 0, 2.5, 2.5)))}.play