Sound tab

BASin

Sound tab

The Sound tab can be found in the Options window.

Options window, 'Sound' tab.

BASin produces sound from the emulated Spectrum's beeper (generated by DirectSound) and sounds in the editor (generated by the standard waveOut functions in Windows).

Note: In general, higher quality sound requires more calculation. If BASin appears to run slowly on your computer, try reducing the sound quality or disabling sound altogether.

Sound settings

You can use the options here to turn on or off the Beeper or Editor sounds, and what type of Editor sounds you want to hear.

Beeper/AY

If this box is checked, BASin plays sounds produced by the BEEP command or by manipulation of port $FE (254) in machine code, and also the AY chip's output from the AY's registers or the PLAY command. If it is not checked, beeper and AY sound is muted, but the emulated Spectrum still pauses while it is being played.

Editor sounds

If this box is checked, the editor generates a click for each keypress, a high beep when a program line is successfully entered, and a low beep when a line is rejected because it contains a syntax error, or already exists.

Key click type

Determines whether the keypress click sound resembles that of the 48K Spectrum or that of the 128K Spectrum. 48k sounds will use the softer, sharper "click" of the classic 48k Spectrum, and 128k sounds will use a louder, more beep-ish sound of the 128k. The syntax checking sounds are taken from the 128k machine, and will be used regardless of the key click type.

MIDI Device

BASin can, when emulating the PLAY command, drive any MIDI device attached to your PC. Generally, this will be your sound card but you can use this menu to choose any device you have - this includes keyboards, drum machines etc. Choosing "None" will disable MIDI output.

Volume

This part of the sound options provides a simple slider which allows you to set the volume of the sounds produced by BASin. To the left is the minimum, or silent volume, and to the right of the slider is the maximum. This affects all sound within both the Editor Window and the main emulated sound from your programs.

Quality settings

Here you can set how accurate and smooth the sound made by BASin is. Higher settings will result in much crisper, cleaner sounds at the expense of greatly increased CPU usage, whereas lower quality will sound much more coarse, but will consume less CPU time.

Frequency (Hz)

This setting, at either 44100, 22050 or 11250 samples per second (Hertz, or Hz) will set how often BASin "samples" the beeper port to create the sound. Higher settings will consume more CPU time, but will produce much higher quality sound.

Bit depth

The bit depth can be either 8 or 16 bit, which increases the range of volume granularity that BASin can produce. This setting will use more CPU at 16 bit than at 8 Bit, but will probably have very little effect on sound quality as the Spectrum's Beeper is only capable of a square-wave type sound, which has no graduated volume setting.

Stereo

This will allow you to choose either stereo or monaural output. This, like the bit depth, will not have much impact other than increased CPU output if set to stereo, as the Spectrum was not a stereo capable computer. Some Russian clones which incorporate the AY chip of the 128k Spectrum can output stereo sound, but in line with the original Spectrum 128k, BASin's AY output via the PLAY command is mono.

DSound Synch

Enabling this item will tell BASin to synchronise the speed of the emulation with the "play cursor" in the internal Directsound buffers. This can, on good soundcards with good drivers, provide very accurate timings with the least stuttering in the sound. However, not all drivers are created equal, and some can mis-report the position of the "play cursor" or even omit it altogether. If you find that BASin runs very slowly, you can try disabling this option to see if it helps. If it does, then you really need to get a decent soundcard. On-board soundcards are the main culprits in this case.

Buffering options

BASin does not output sound directly to the soundcard as it is produced by your program. Instead, it builds a "buffer" of sound samples which, when full, is then sent out to the soundcard for playing. Smaller buffers result in quicker response, but the transport to the soundcard can consume a relatively large amount of CPU time. Larger buffers require less processing time, but there may be a small, but noticeable lag before the sound plays.

Users are encouraged to experiment with these settings to find the best for their tastes/tolerances and system hardware.

Sound buffer size

This is the overall amount of time that will be buffered, in frames per second, of sound before it is sent to the soundcard. Smaller values require more CPU time, but if this is available then the sound will be much more responsive and remain better synchronised to the display. This will be more noticeable with machine code sound routines, such as sound effects. A larger buffer will require less CPU time to process, but will conversely affect the response of rapid sound effects. This setting will also contribute in some ways to the speed and fluidity of the emulation and display update speed.

Sound latency

Some sound cards have trouble outputting sound at a rapid rate, and on some computers the CPU may have trouble keeping up with your buffer settings. This can be alleviated by setting a higher latency, but be warned that the higher the latency, the larger the "lag" between emulation and sound synchronisation. Lag experienced due to this option will be more noticeable than lag created by a larger sound buffer.