YM2612 - op_calc problem [solved]

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
neologix
Very interested
Posts: 122
Joined: Mon May 07, 2007 5:19 pm
Location: New York, NY, USA
Contact:

YM2612 - op_calc problem [solved]

Post by neologix » Mon Jun 27, 2011 11:39 pm

(edit - it seems these ARE the intended outputs, but the results weren't being fed into the connections. solved!)

hello again! so i'm trying to get this ym2612.js to generate some numbers, but it feels like op_calc and op_calc1 (and as a result, chan_calc) aren't giving me something usable.

to start, i'm using the grand piano patch from maxim's doc. i'm writing the same frequency as the example, then a note on, then 120 samples later a note off. i'm only retrieving the first five samples generated from that, and it's running off the native 53267 Hz frequency.

the five samples generated by op_calc & op_calc1 (both take op's current phase, then calculated EG_OUT, then PM index, then return some value from the TL table) are as follows:

==UPDATE 1==
1:op_calc1(0, 280, 0) = 0
2:op_calc(0, 360, 0) = 0
3:op_calc(0, 304, 0) = 0
4:op_calc(0, 0, 0) = 0

==UPDATE 2==
1:op_calc1(157696, 280, 0) = 0
2:op_calc(157952, 360, 0) = 0
3:op_calc(158208, 304, 0) = 0
4:op_calc(157952, 0, 0) = 64

==UPDATE 3==
1:op_calc1(315392, 280, 0) = 0
2:op_calc(315904, 360, 0) = 0
3:op_calc(316416, 304, 0) = 0
4:op_calc(315904, 0, 0) = 192

==UPDATE 4==
1:op_calc1(473088, 280, 0) = 0
2:op_calc(473856, 360, 0) = 0
3:op_calc(474624, 304, 0) = 0
4:op_calc(473856, 0, 0) = 320

==UPDATE 5==
1:op_calc1(630784, 280, 0) = 0
2:op_calc(631808, 360, 0) = 0
3:op_calc(632832, 304, 0) = 0
4:op_calc(631808, 0, 0) = 448


are these the values i should be expecting to be fed by the slots to their respective connections for the first five frames generated?

Post Reply