Audio frequency generator: Difference between revisions
Content added Content deleted
(moved Categorys to top / Category:Sound) |
|||
Line 1: | Line 1: | ||
{{draft task}} |
{{draft task}} |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
An audio [[wp:Signal_generator|frequency generator]] produces a continual audible monotone at a set frequency and level of volume. |
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. |
|||
The task is to emulate an audio frequency generator. |
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. |
|||
The solution should include: |
The solution should include: |
||
Line 287: | Line 297: | ||
=={{header|ZX Spectrum Basic}}== |
=={{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 |
<lang zxbasic>10 REM The crappest signal generator in the world |
||
Line 298: | Line 314: | ||
80 BEEP 0.1,n: REM beep for 0.1 second at n semitones relative to middle C |
80 BEEP 0.1,n: REM beep for 0.1 second at n semitones relative to middle C |
||
90 GO TO 40</lang> |
90 GO TO 40</lang> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
[[Category:Sciences]] |
|||
⚫ |