abcmusic for Atari Lynx

The Lynx has special hardware that produces noise by itself without any support from the CPU.
The only problem from the programmers point of view is that the hardware is too cheap!

The original Lynx developers kit had a tool called HSFX that is pretty good at explaining how things go together.


The part at the top left has a choice of 7 different basic oscillators from 1us to 64us. The clock is then fed to a shift register (lower left) that produces weird noises depending on how the feedback taps are connected. The general rule is that the further to the left you connect a tap the more the sound resembles noise.

After the shift register you have a volume setting and an integrate-button. The intergrate will sum the volume-figures to produce triangular waves instead of square waves.

As most programmers don't have a HSFX-kit to work on Songbird produced a nice cart called SFX to try out sounds on a real Lynx. The use of the registers on the SFX card is not a trivial task and finding a decent instrument sound requires a lot of experimenting.

To make things a bit easier I wrote a small music module that takes the Lynx hardware capabilities and add an envelope to the sound. The envelope consists of three parts:
- attack, that tells how many steps to increase the volume on every tick. The drums could use 127 that means get to maximum volume instantly.
- hold, that tells how long a sound can be stable before it starts to fade. This would be very short for drums and very long for a flute.
- decay, that tells how slowly the sound dies out. A guitar could have a value of 4. This means that the volume will be reduced by 4 units for every interrupt after the sound has ended.

The new tool called "abcmusic creator" playes a small tune over and over again. It allows you to tune the parameters in a logical fashion just like HSFX.


The first field called "octave" allows you to set the input clock frequency. The second parameter "taps" will treat the taps as one integer ranging from 0 to 511. The third parameter is the "smooth" or integrate function. And the last one is the desired volume. Please note that it makes a difference to adjust the volume in integrate-mode. The effect is different from keeping the volume at max and adjusting the analogic wheel.

The second row of controls are software controls used by my abcmusic module.

The abcmusic is a technique to write music with ASCII characters instead of midi or notes.

A simple tune is like:

"CDEEDEFFEFGEFDGG"

My program uses abcmusic for playing a small tune over and over again. This first version of the code does not allow you to edit the notes themselves. But you are free to try out this tool on a real Lynx.

Download it from here: here --
Regards,

Karri