AUDISY

Authors

Publication

Publication Details

Date

Pages

See all articles from SYNC v3 n6

‘AUDISY”— Audio Digitizer/Synthesizer — is a 65 byte machine code routine that allows you to digitize and store the data for any sound phrase on your ZX/TS computer with 16K RAM. You may then synthesize the sound at will or study the data field.

AUDISY Programming Instructions

Since our machine code contains an unlistable value (code 126), it cannot be stored in an ordinary REM statement. Instead we will load the code into an unlisted REM statement located between the listed program and the display file. This requires unique USR calls referenced below the display file (the variable F).

Enter the program as follows:

1) Type in a numbered REM statement containing 61 characters.

Press ENTER.

2) Type in the immediate mode:

POKE 16509 , 1 18

3) Type in Listing 1. Press RUN and ENTER.

4) Type in the decimal machine code from Table 1, going from left to right and pressing ENTER after each number.

5) When all the code has been entered, delete the loader program by typing in the line number followed by ENTER. Do not use NEW or you will wipe out the code.

6) Type in Listing 2, the driver program. This requires 16K.

You are now ready to use the program.

AUDISY Operating Theory

AUDISY operates as two separate routines. A call to USR (F-66) starts the digitizer (see AUDISY disassembly). First, RAMTOP is automatically lowered to location 18000 to provide a 14000 byte storage area up to location 32000. This vast field will be used to store digitized waveform data and will provide an aperature just seconds wide depending on the mean frequency stored. The higher the mean frequency, the narrower the aperature.

As the digitizer operates, register D is loaded with the value 255 and then decremented to contain 254. Register A is loaded with zero to set up the input code. If no signal is present at the input (the ear jack), the value 63 is returned by register A which causes a jump to be made to decrement D and to recycle the input loop. If a signal is present at the input, the value currently in register D is placed into the present location in the data field pointed to by the HL register pair.

A predominance of value 254 indicates a high noise level or an input signal that has a high frequency component exceeding the sensitivity of the input loop. The lower the number stored in the data field the lower the frequency that it represents. The full scale sensitivity of the digitizer is calculated to be 295 Hz to 26KHz. These are theoretical limits and are drastically reduced by such factors as noise and stray input capacitance, etc.

The signal amplitude is important since any waveform not sufficiently loud will not be processed. Excessive signal, however, will cause distortion.

The synthesizer operates by addressing USR (F-36). One byte at a time, values are taken from the data field and loaded into register A which provides the timing delays for toggling the output. The output signal is provided at the mic jack on the computer and requires amplification. The Sinclair output bus is shared by the RF modulator. This means that the sound will be available over the TV audio system.

Only about 2 1/2 K of memory is left after setting RAMTOP to provide the data storage area. This limits the user’s program development. It is now possible, however, to LOAD a new program while not affecting the data stored above RAMTOP. This may prove useful when extensively processing or studying the stored data. The data field cannot be SAVEd on tape by the usual means.

Audisy Operating Instructions

After LOADing AUDISY, prepare the input source. If you choose to digitize music or voice from a cassette tape, you will have to experiment with the volume control. It will take some practice to learn to cue the tape to the beginning of the digitizer routine.

Another input source is direct microphone. Plug a microphone into the mic input of your recorder or use the built-in condenser mic, if provided. Put in a blank tape and set the cassette to record. Press pause on the recorder if you do not want the tape to advance. Make sure the ear jack on the computer is connected to the ear jack on the tape recorder.

To digitize a sound source, enter RUN while the source is playing. If the input sound is of sustained intensity, it will allow the machine code routine to cycle out and return to Basic. After running the AUDISY driver with an input signal present, the user is signalled that digitizing is complete by the brief flash on the screen as the computer goes into infinite PAUSE (line 115).

Then press any key (except BREAK) to operate the synthesizer. The synthesizer can operate repeatedly by pressing a key to interrupt PAUSE. Press BREAK and then enter RUN to digitize a new sound phrase. You may also delete line 125 for a continuously repeating playback. Remember that any time changes are made to the program listing the display file moves about. This means that the program line establishing the variable F must be entered directly or read during the program operation in order to properly reference the USR addresses.

You may hear the synthesizer output directly over the TV set. Turn up the volume and adjust the fine tuning control for the best sound. For better fidelity you may record the output on tape to be played back. Connect the mic jack of the computer to the mic jack of the recorder.

I prefer to use a small amplifier to reproduce the synthesized sound. The Archer Mini Amplifier with built-in speaker (cat. #277-1008) from Radio Shack is ideal for this project.

Experimenter Notes

This section deals with ways of conveniently displaying the huge data field stored above RAMTOP. The simplest routines display the data field as 218 frames of 64 byes each plotted onto the screen. Program A plots a frame at a time with a pause between. Program B superimposes frame upon frame as a possible method for observing repeating patterns. The higher frequencies are at the top, and time advances from left to right. Similarly, Program C averages samples from the data field and plots them onto one screen frame. Examples are shown to adjust ranging. Program D simulates the modulation envelope of the sound sample. Maximum and minimum values are plotted and can be altered to show the effects of filtration. Program E scrolls plotted data from the bottom of the screen. This program compresses the time scale by eliminating all bytes that contain noise (code 254) allowing easier visualization of the component waveforms. Higher frequencies are to the right, and time advances from top to bottom. It may take a while for significant displays to develop with any of these programs.

Whether you use AUDISY to characterize waveforms for voiceprint identification in a science fair project or as an amusing mimic toy, you will find this a stimulating project.

Products

 

Downloadable Media

 
Scroll to Top