Well, ideally PCM streaming would happen at an exact rate. But in practice there will be some jitter, a DMA controller needs to wait for bus access, and especially for CPU-controlled streaming like on Z80, it’s hard to stream at a totally perfect rate if you’re also controlling the FM chip and buffering.
So maybe the stream control commands are too exact? Is it important to capture the imprecisions in e.g. Sega MegaDrive games PCM? OTOH I guess the alternative is pretty heavy on the data size (3-4x as much as it is in VGM 1.0, which is already pretty hefty), so maybe we simply do not have the luxury to care about that. Or maybe we shouldn’t even care since it is either barely audible or more pleasant on the ears.
Btw, IMO the streaming commands should specify rate as a period in system clock cycles (as pretty much every sound chip does as well). Currently the 2.0 proposal allows rate to be specified as a Hz frequency or a period in sound chip cycles, but I think the frequency option should go, and the period should use system clock cycles (“chip 0”) rather than sound chip cycles. Since the streaming rate is driven by the CPU clock, it is the most natural unit to use.
Additionally it’s easier to process in the player, because on a system clock period value I need to do zero processing, I can just subtract it from the running counter like I do for regular commands, no division needed to determine the period every time the pitch is changed. Numerator denumerator is even worse, requiring two divisions, at runtime, so occurring frequently. And 32-bit divisions are pretty rough on a Z80.
vampirefrog wrote:
I suppose, ideally, you could store yet another field that dictates how the data in the stream frequency field is stored: as an integer ratio, as a floating point number, as a double, fixed-point (which is still just a fraction, but the denominator is a power of two) etc. A double precision floating point value would take the same space as two 32-bit ints btw.
Please no…

Let’s just pick the best option instead of being undecisive and making me implement a plethora of ways, half of which take forever to calculate. Also having more than one way to specify rate is pretty useless anyway, as a user how do I know which I’m supposed to use. If one really must, a fixed point fractional field could be added to the period, which can easily be ignored by the player. But given how streaming is tied to the CPU clock, it doubt it would add actual precision, unless the original streaming code also used fixed point.