Open jpcima opened 6 years ago
Recalculate all sounding delays
It does calculation of non-empty voices. And when voices are presented, it works very long if it uses Nuked (it is used by default). Empty non-sounding voices are skipping to don't waste time on them.
Also, I have made the thing to detect 5 seconds of silence and then break the scan. That usually happens when no sound was produced.
when I launch the emulator benchmark I have very significant variations of results. what to do about this?
That because of error which is caused by capturing of data from the generated wave analysis and it's not accurate as you see.
do instruments have a definition of the field NTS/Note-Sel (from OPL3 register 08)? do I set 0 for NTS?
I think, it's just unused as I see...
I have just continued progress on this, and now I also have the model for the release phase. This part of implementation will be easier but must take into account the starting level defined by the sustain parameter.
For a validation basis, it would be great if I can run it over all instruments, and instruct it to compare the normal measurement vs estimate.
I think, it's just unused as I see...
NTS has impact on computing the effective envelope rate. I think it controls how note frequency affects the scaling. I think, as I just copied the computation out of Nuked code.
EDIT this is envelope rate computation according to NTS:
unsigned effective_rate = 4 * rate;
if (!ksr)
effective_rate += block >> 1;
else
effective_rate += (block << 1) | ((fnum >> (9 - nts)) & 1);
I have made a quick and dirty write-up to explain math in the time estimation code, since it's not really obvious to understand at the first look. For reference here it is. https://github.com/jpcima/opl3-time-measurement/blob/master/docs/master.pdf
I started an experimental branch to make an estimation of envelope times and compare with real times. It's unclean code but here for experiment purposes. link.
This estimate method is more oriented towards precision than performance. There is some difficulty in finding an exact result, but I have expectation for error to be in the magnitude of milliseconds.
I have some questions, probably stupid