China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 10:17
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to write a batch file to emit a continuous - editable ticking sound View 3,077 Replies 2
Original Poster Posted 2017-11-21 17:03 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Generally, ^g emits a beep sound. Multiple ^g s are continuous and uniform beeps, and there is no intermittent pause even if there are spaces or other characters in between.

Seek an editing method for pausing to achieve auditory effects similar to Morse code or 0s and 1s:
Hello
ni hao
n i h a o
_. .. .... ._ _ _ _
space, ^g ^g, ^g ^g, ^g, ^g, ^g ^g, space space, space, space
1<词>,2,3/段\,4{节},5(章)。
Floor 2 Posted 2017-12-23 15:38 ·  中国 上海 电信
金牌会员
★★★★
Credits 4,639
Posts 2,239
Joined 2005-01-30 00:00
21-year member
UID 35785
Gender Male
Status Offline
You can use the beep command of 4DOS


4DOS Help Topic: BEEP


Purpose: Beep the speaker or play simple music.

Format: BEEP

frequency: The beep frequency in Hertz (cycles per second).
duration: The beep length in 1/18th second intervals.

See also: BeepFreq and BeepLength.

Usage

BEEP generates a sound through your computer's speaker. It is normally used
in batch files to signal that an operation has been completed, or that the
computer needs attention.

Because BEEP allows you to specify the frequency and duration of the sound,
you can also use it to play simple music or to create different kinds of
signals for the user.

You can include as many frequency and duration pairs as you wish. No sound
will be generated for frequencies less than 20 Hz, allowing you to use BEEP
as a way to create short delays. The default value for frequency is 440 Hz;
the default value for duration is 2.

This batch file fragment runs a program called DEMO, then plays a few notes
and waits for you to press a key:

demo ^ beep 440 4 600 2 1040 6
pause Finished with the demo - hit a key...

The following table gives the frequency values for a five octave range
(middle C is 262 Hz):

C 131 262 523 1046 2093
C#/Db 139 277 554 1108 2217
D 147 294 587 1174 2349
D#/Eb 156 311 622 1244 2489
E 165 330 659 1318 2637
F 175 349 698 1397 2794
F#/Gb 185 370 740 1480 2960
G 196 392 784 1568 3136
G#/Ab 208 415 831 1662 3322
A 220 440 880 1760 3520
A#/Bb 233 466 932 1864 3729
B 248 494 988 1976 3951

Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
zzz19760225 +2 2017-12-25 11:46
Floor 3 Posted 2017-12-26 12:14 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Please clarify the specific meaning and context of "双声" and "单声" here. Based on the current information, it's not clear enough for an accurate translation. Maybe you can provide more detailed explanations about what "双声" and "单声" refer to in this technical context related to DOS.
1<词>,2,3/段\,4{节},5(章)。
Forum Jump: