中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 批处理如何编写发出可连续编辑的滴答声
作者:
标题: 批处理如何编写发出可连续编辑的滴答声 上一主题 | 下一主题
zzz19760225
超级版主




积分 3673
发帖 2020
注册 2016-2-1
状态 离线
『楼 主』:  批处理如何编写发出可连续编辑的滴答声

一般是^g发出一个蜂鸣声音。
多个^g,是连续均匀的蜂鸣声,
哪怕中间有空格或其他字符也没有断续停顿。

求可停顿的编辑方法,出现类似莫斯密码或0和1的听觉效果:
你好
ni hao
n                     i                        h                     a                    o
_.                    ..                      ....                  ._                   _ _ _
空格,^g         ^g,^g             ^g,^g,^g,^g      ^g,空格         空格,空格,空格



1<词>,2[句],3/段\,4{节},5(章)。
2017-11-21 17:03
查看资料  发短消息 网志   编辑帖子  回复  引用回复
DOSforever
金牌会员





积分 4633
发帖 2236
注册 2005-1-30
状态 离线
『第 2 楼』:  

可以用 4DOS 的 beep 命令

  Quote:

4DOS Help Topic:  BEEP


Purpose:  Beep the speaker or play simple music.

Format:   BEEP [frequency duration ...]

          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




   此帖被 +2 点积分    点击查看详情   
评分人:【 zzz19760225 分数: +2  时间:2017-12-25 11:46




DOS倒下了,但永远不死
DOS NEVER DIES !

投票调查:
http://www.cn-dos.net/forum/viewthread.php?tid=46187

本人尚未解决的疑难问题:
http://www.cn-dos.net/forum/viewthread.php?tid=15135
http://www.cn-dos.net/forum/viewthread.php?tid=47663
http://www.cn-dos.net/forum/viewthread.php?tid=48747
2017-12-23 15:38
查看资料  发短消息 网志   编辑帖子  回复  引用回复
zzz19760225
超级版主




积分 3673
发帖 2020
注册 2016-2-1
状态 离线
『第 3 楼』:  

请问DOSforever:

我用echo ^g > x.bat,复制x.bat中取得的声音,是双声。
需要单声,是执行那个x.bat。

在不想另外打开文件的情况下,如何获取单声,如加上可能原因最好?



1<词>,2[句],3/段\,4{节},5(章)。
2017-12-26 12:14
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: