Re: [hatari-devel] Preserving YM2149 sound phase

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 06/05/2017 à 22:53, David Savinkoff a écrit :
Hi Nicolas,

I just found a revealing article by gwEm:
http://alive.atari.org/alive9/ymsamp.php

The second half of the article after **** is what caught my attention:

  Alive 9
  Start synchronisation techniques,
        YM sampling and
     a brand new YM effect

Hi

thanks for the link, but in fact I already knew it ;-)

Regarding the phase emulation of the tone square wave, I wrote some low level test program some weeks ago to check that the internal counter of the YM2149 was couting from 0 up to tone_per, at which time the phase gets inverted. This is interesting because the AY's doc from which the YM is derived says the opposite (that counter goes from tone_per to 0)

Basically, I wrote some kind of tone / cpu synchronisation programs that allow me to change precisely a new tone_per at any given point of a phase, which allows to see how a new per modifies the current phase. I then recorded my STF on my PC at a rather high freq of 44.1 KHz, which is of course not enough to capture the highest YM freq of the STF, but enough for my tests were tone freq was much in the 500 Hz range.

So, I updated the YM square wave emulation in Hatari to emulate incremeting a counter for all tone/noise/env generators, simulating a base frequency of 250 KHz, which is exactly the freq at which the YM updates its counter.

I sent a preversion of this to Troed, so he could ask 7an if the 1st version of the music he composed for Closure sounds closer to a real STF now, in which case I will commit the change soon to Hatari devel tree.

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/