Jump to content

Audio frequency generator: Difference between revisions

moved Categorys to top / Category:Sound
(moved Categorys to top / Category:Sound)
Line 1:
{{draft task}}
[[Category:Electronics]] [[Category:Sciences]]
[[Category:Sound]] [[Category:Temporal media]]
{{omit from|GUISS}}
{{omit from|Lotus 123 Macro Scripting}}
{{omit from|Scala}}
{{omit from|TPP}}
 
An audio [[wp:Signal_generator|frequency generator]] produces a continual audible monotone at a set frequency and level of volume. There are controls to adjust the frequency and the volume up and down as desired. Some also have a selector to switch the waveform type between sine wave, square wave and triangular sawtooth.
There are controls to adjust the frequency and the volume up and down as desired.
Some also have a selector to switch the waveform type between sine wave, square wave and triangular sawtooth.
 
The task is to emulate an audio frequency generator. It is permissible to use an inbuilt computer speaker if the system does not have the facility to utilize dedicated sound hardware.
It is permissible to use an inbuilt computer speaker
if the system does not have the facility to utilize dedicated sound hardware.
 
The solution should include:
Line 287 ⟶ 297:
=={{header|ZX Spectrum Basic}}==
 
The ZX Spectrum is not very good at making sound.
The ZX Spectrum is not very good at making sound. Most applications in BASIC would just produce annoying beeps, and the following is no exception. To emulate the signal generator, we just produce repetative beeps using the inbuilt speaker. The left and right keys (5 and 8) change the tone. There is no volume control on the Spectrum.
Most applications in BASIC would just produce annoying beeps,
and the following is no exception.
To emulate the signal generator, we just produce repetative beeps
using the inbuilt speaker.
The left and right keys (5 and 8) change the tone.
There is no volume control on the Spectrum.
 
<lang zxbasic>10 REM The crappest signal generator in the world
Line 298 ⟶ 314:
80 BEEP 0.1,n: REM beep for 0.1 second at n semitones relative to middle C
90 GO TO 40</lang>
 
{{omit from|GUISS}}
{{omit from|Lotus 123 Macro Scripting}}
{{omit from|Scala}}
{{omit from|TPP}}
 
[[Category:Electronics]]
[[Category:Sciences]]
[[Category:Temporal media]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.