{{htmlmetatags>metatag-robots=() metatag-title=(BELL | ugBASIC User Manual) metatag-keywords=(ugBASIC,Commodore 64,Commodore PLUS/4,ZX Spectrum) metatag-description=(Manual page for BELL) metatag-media-og:image=(:ugbasic:logo-ugbasic-fb.png) metatag-og:title=(BELL | ugBASIC User Manual) metatag-og:description=(Manual page for BELL) }} ====== ugBASIC User Manual ====== ===== BELL ===== ===== SYNTAX ===== BELL BELL note BELL note, duration BELL note, duration ON channels ==== PURPOSE ==== The ''BELL'' command makes the computer emit a sound, usually a short beep, through the internal speaker or audio chipset. This sound serves as an acoustic signal to the user, indicating that an action has been completed, reporting an error, or simply to attract attention. It can be used alone, or specifying characteristics of the sound to be produced. When you use ''BELL'' with parameters, ugBASIC generates a sine wave with the frequency specified by the ''value'', and of ''duration'' length. The higher the value, the higher the pitch. The greater ''duration'', the greater time the sound will last. The ability to specify the frequency opens up many creative possibilities: by combining several ''BELL'' commands with different frequencies, you can create short melodies; you could simulate the sounds of explosions, pops, or other effects, depending on the frequency and duration of the sound; you can create specific beeps to indicate different conditions or events in your program. The supported frequency range may vary depending on the hardware of target computer. Typically, the duration of the sound produced by ''BELL'' is short and can be controlled by another, additional, parameter. Moreover, you can select a specific channel for audio output. Executing the command may or may not interrupt program execution, depending on the setting of ''DEFINE AUDIO SYNC''. Not all targets support all settings (synchronous and asynchronous). ==== EXAMPLE ==== BELL 42 BELL #42 ON #%001 ==== ABBREVIATION ==== Bel ==== AVAILABLE ON ==== * Dragon 32 * Commodore VIC-20 * Commodore 64 * Atari (400/800) * Atari XL/XE * * Commodore 128 (MOS 8502) * ColecoVision * Commodore PLUS/4 * Olivetti Prodest PC128 * Dragon 64 * Thomson MO5 * Amstrad CPC 664 * TRS-80 Color Computer * MSX ==== ANY PROBLEM? ==== If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please [[https://github.com/spotlessmind1975/ugbasic/issues/new?title=ISSUE ON BELL|open an issue]] for this keyword on GitHub. Thank you!===== POWERED BY ===== [[:ugbasic:user:index|{{ :ugbasic:user:logo-ugbasic.png?nolink&600 |}}]]