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
Torture Your YM

              Make it squeal like a pig with fake resonant effects

I'm just returning from the nice Paracon party, very well organised by the  guys
from Paranoia. Anyway,  my flight is  a little delayed,  so I am  stealing a few
minutes to write this article.

The YM2149 soundchip was  a big sucking feature  of the Atari ST  series when it
was first released. Now, ironically, it is providing the scene with the fuel for
interesting technical innovation, as well as many talented musicians. As long as
the YM sound chip exists I think people will be inventing new effects using  it,
and perhaps YM2149 has the record for the most punished sound device ever!

This  we  all  know, so  lets  get  down to  business  -  when I  released  some
demonstration sounds from maxYMiser on 505's great Atari Tracking website I  was
surprised that  people thought  the acid  sound effect  was a  completely new YM
effect. In fact I heard it even in  old Mad Max tunes, and of course the  famous
'My First Resonant Burp' by Jess/OVR. I was asked many questions about how  this
is possible, and had all kinds of speculations: for example a crazy  sync-buzzer
technique. Actually this effect is a pure YM effect using no timer at all, so it
should even be possible on platforms like Oric or ZX Spectrum.

In case you have not heard the sound demo I am talking about, I am refering to a
simple four bar loop with a single channel YM effect sounding like an overdriven
acid synthesiser (you can listen in the included example - YM303.SND). Of course
YM has  no filter,  so this  is not  the answer  - actually  the sound is a ring
modulation effect caused by the interaction between the buzzer and a square wave
being played  out of  tune on  the same  channel. If  you want  to try,  you can
already experiment  with these  effects in  the MusicMon2  and XLR8 chip editors
from Aura and Sentry. Its even possible in SID Sound Designer, but it needs more
work to get something useful.

So if this is an old effect, whats the big deal? In the past the effect has been
hard to set up and control in a musical way. I experimented with some techniques
and ideas and quickly found a way to use the effect painlessly and with a  large
degree of control.

To generate the acid sound in the demo sequence you take a buzzer sound  playing
at the  frequency of  the desired  note. Then  combine this  with a square wave,
changing  in frequency  each VBL,  starting between  something like  32 and  48
semitones above the  buzzer note, and  decreasing by a  set number of  semitones
each time. The important  thing is that this  way the square and  the buzzer are
fixed  harmonicly  relative  to each  other,  so  that the  sound  has  the same
characteristics no matter what what note is played.

So now you have  a nice acid tone,  of course the next  step is to increase  the
'cutoff' of the  effect, to make  the sound really  squeal! Again this  is quite
easy if you think harmonically. The  buzzer tone is kept at the  same frequency,
but the  downward sweeping  squarewave can  transposed up  or down  by a certain
number of semitones to vary the effect.

Very nice, but what is an acid effect without a portamento? This was the hardest
part of the  effect for me  to work out,  but even then  it wasn't that  tricky.
Portamentos  work  by  smoothly  increasing  or  decreasing  the  YM's frequency
registers, which  modfies the  period of  the wave  linearly. Unfortunately  the
human ear and the musical scale work logarithmicaly. This means that applying  a
fixed portamento to all notes  in the squarewave sweep will  completely screw-up
the harmonic relationship,  except in very  small sweeps. To  fix this I  used a
logarithmic lookup  table to  modify each  of the  frequencies in  the sweep  in
relation to their  musical note. To  do this flexibly  I needed to  use a divide
operation, which I  think is no  big deal in  a music driver  (just one use  per
VBL), but if you are really against this you could use a larger lookup table, or
use a more restrictive technique not allowing portamentos.

Its easy to use a timer generated waveforms instead of the buzzer, at expense of
CPU, but  with the  advantage of  volume control  and a  free buzzer for another
sound. For an example of this listen to my competition entry for the DHS 10 year
anniversary.

I was pretty happy with my  further developments of this technique, but  seen in
perspective its  just another  sound in  the YM  chip composers  already massive
selection.

                                   gwEm/Gareth Morris, Nov 2004

Alive 9