Alive
News Team Current issue History Online Support Download Forum @Pouet

01 - 02 - SE - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 - 13 - 14

Alive 9
Start synchronisation

techniques,

YM sampling and

a brand new YM effect

Many times I hear  the tip that all  you have to do  to speed up YM  replay into
half a scanline  is to sample  the YM register  every 50Hz and  simply dump them
back to the chip on replay without calculation.

This is simply wrong ;) Sure, it will work for many tunes - but dumb YM sampling
like this will  fail to capture  some YM effects  using techniques developed  by
classic  chip composer  Dark Angel/Aura.  This is  also why  tunes using  these
techniques are not reproduced correctly  in JAM for Windows, which  also ignores
the special YM behaviour used.

MusicMon2 and my up-coming editor  maxYMiser use this behaviour to  create whats
best described as note start synchronised phasing effects.

Most people know that writing to the YM buzzer waveform register retriggers  the
envelope from its  start (as stated  in the YM2149  datasheet). Whats not  often
known is  that its  possible to  retrigger the  squarewave in  this way as well.
Heres a bit of code that does just that for YM squarewave channel A:

        move.l      #$00000000,$ffff8800.w
        move.l      #$01000000,$ffff8800.w
        move.l      #$0000xx00,$ffff8800.w
        move.l      #$0100xx00,$ffff8800.w

as you see the two YM  registers for squarewave frequencies are cleared  to zero
shortly, before being immediately set for the required frequency. Obviously this
effect is impossible to record using simple YM2149 sampling.

You can  create a  combined buzzer/squarewave  sound, and  by synchronising both
square and  buzzer waves  at the  start of  the note  you can achieve repeatable
phasing,  which  great for  smooth  pad and  dirty  bass sounds  with  the right
detuning.

The sync-square

a new YM effect?

You  might think, ok so we can  sync the squarewave - why not apply  this method
to create  a kind of syncbuzzer sound,  but for the square  wave. I also thought
this  ;)  The  problem   is   that   synchronising   the   squarewave   is   not
completely reliable. Actually  the squarewave is  only restarted  from  the last
time  it changed   state, and  not from  a known  phase.  This  gives two  sync
possibilities, either  where it syncs with the square starting again low(1),  or
when it starts again high(2):

1)
+--+
|  |
--+  +-->

2)
--+  +-->
|  |
+--+

If you play  with MusicMon2 you'll  be able to  hear two distinct  variations in
phasing, seemingly at random. Its not possible to retrigger the squarewave  with
the timer each time with enough precision to give repeatablity, except for  very
low bass notes.  Normally you might  hear some glitchy  distorted tones unusable
for melodic instruments.

STeem and SainT  emulate this YM  squarewave synchronisation such  that the wave
restarts at  a given  phase reliably,  but remember  on real  YM this is not the
case. If you wish to experiment  further with this effect, you'll find  the code
fragment shown  above gives  the best  performance, or  wait for  the release of
maxYMiser.

gwEm                                                                    Jan 2005

Alive 9