Page 1 of 1

AY Crudentials: Samples Overview

Posted: Sat Jan 21, 2006 2:50 pm
by Twilighte
Playing a sample on the Oric may appear a daunting task, since the sound chip is not memory mapped and their is a big difference in resolution between samples played on the PC and Oric.

A Sample is a sequence of values sent to an Amplitude register in quick succession where each value was taken from either an artificial or real instance of a source sound.
The accuracy of the value to represent the true amplitude level is known as the resolution.
The distance in time between each instance is known as the speed and is measured in Kilohertz (Khz) or thousands of values per second.
A 1Khz Sample will play 1000 values in 1 second.

Samples may be played up to 8 bit resolution and up to 44Khz.
However, as the speed and resolution increases, the length of the sample decreases because of the available memory.

For example, a 4 Bit 44Khz non-repeating sample will last for two and a half seconds, whereas a 2 Bit 10Khz sample can last for over 24 seconds in the same size of memory.

Each individual channel within the AY-3-8912 can handle up to 4 bit resolution samples.
This is by accessing the D/A converter amplitude setting in registers 8,9 or 10 for Channels A,B and C respectively.

It is always recomended to disconnect the Channel Square wave oscillator by setting Bits 0,1 or 2 of the Status Register 7.
It is also recommended to disable any noise linked to the channel by setting the bits 3,4 or 5 in Status register 7.
Keeping either enabled may produce distortion effects upon the played sample.
It is also important to confine the sample to a 4 bit frame or else this may enable the Envelope Generator link Bits in the same respective Volume register.

A Sample will always have a start and an End but may also loop back to a position from the start of the Sample.

Most applications will use 2, 4 or 8 bit samples.