AY Crudentials: Synthesis

Probably the most technical forum around. It does not have to be coding related, or assembly code only. Just talk about how you can use the AY chip to do cool sounding things :)
Post Reply
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

AY Crudentials: Synthesis

Post by Twilighte » Sun Feb 04, 2007 11:42 am

Synthesis is the generation of a waveform from math operations or at least that is my perception of Synthesis.
To this end, Synthesis can be produced on the Oric, and SID sound is one example. For instance removing the chip element of a SID voice will procure a pure square wave on the channel derived from SID generation itself.
But this is only one avenue for Synthesis. By alternating between two different Periods of IRQ speeds at each IRQ event, the Oric can produce a variable pulse width tone.
The difficulty is then to divide the pitch into the two timer periods. This can be achieved by shifting right the pitch and storing the results for each shift (up to 7 shifts). Then adding the results depending on the pulse width required and storing as one period. Then taking the Pitch frequency and subtracting the Period to get the other.
I have done this in a small demo and the results are quite astonishing.
Protection must be included to prevent either Period receding 256 cycles, otherwise corruptiion of the sound will occur through repeated IRQ events because it hasn't had time to process the information.
But even with a limit of 256 Cycles, the sound is sufficiently sharp.

http://www.defence-force.org/ftp/forum/ ... ile/ct.tap

Download this file and cload.
The controls are a little quirky.

Code: Select all

X switches between left and right options
Y moves down options
T moves up options
- decrements value
= increments value
Space multiplies IRQ-PERIOD by 2.
Adjust each value until they match the screenshot shown below.
Image

Now by adjusting IRQ-PW% you can clearly hear the pulsewidth changing.
This sort of control allows dynamic sounds like Flies, Bees, Bass sounds and Synchronised SID.
The example is based around modifying the Envelope Cycle, so different sounds can be heard by changing First or Second CYC to a different waveform.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest