VB主機板發聲

時間 2022-09-02 21:15:03

1樓:

private declare function beep lib "kernel32" (byval dwfreq as long, byval dwduration as long) as long

private declare sub sleep lib "kernel32" (byval dwmilliseconds as long)

sub main()

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 600, 100: playsnd 400, 100:

playsnd 450, 100: playsnd 500, 200: playsnd 0, 100:

playsnd 0, 100:

playsnd 520, 100: playsnd 520, 100: playsnd 520, 200:

playsnd 520, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 450, 100: playsnd 450, 100:

playsnd 500, 100: playsnd 450, 200: playsnd 600, 200:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 600, 100: playsnd 400, 100:

playsnd 450, 100: playsnd 500, 200: playsnd 0, 100:

playsnd 0, 100:

playsnd 520, 100: playsnd 520, 100: playsnd 520, 200:

playsnd 520, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 600, 100: playsnd 600, 100: playsnd 520, 100:

playsnd 450, 100: playsnd 400, 200: playsnd 0, 100:

playsnd 300, 100: playsnd 500, 100: playsnd 450, 100:

playsnd 400, 100: playsnd 300, 200: playsnd 0, 100:

playsnd 300, 100: playsnd 500, 100: playsnd 450, 100:

playsnd 400, 100: playsnd 330, 200: playsnd 0, 100:

playsnd 330, 100: playsnd 520, 100: playsnd 500, 100:

playsnd 450, 100: playsnd 370, 200: playsnd 0, 100:

playsnd 600, 100: playsnd 600, 100: playsnd 520, 100:

playsnd 450, 100: playsnd 500, 200: playsnd 0, 100:

playsnd 300, 100: playsnd 500, 100: playsnd 450, 100:

playsnd 400, 100: playsnd 300, 200: playsnd 0, 100:

playsnd 300, 100: playsnd 500, 100: playsnd 450, 100:

playsnd 400, 100: playsnd 330, 200: playsnd 0, 100:

playsnd 330, 100: playsnd 520, 100: playsnd 500, 100:

playsnd 450, 100: playsnd 600, 100: playsnd 600, 100:

playsnd 600, 200: playsnd 0, 100:

playsnd 650, 100: playsnd 600, 100: playsnd 520, 100:

playsnd 450, 100: playsnd 400, 200: playsnd 0, 100:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 600, 100: playsnd 400, 100:

playsnd 450, 100: playsnd 500, 200: playsnd 0, 100:

playsnd 0, 100:

playsnd 520, 100: playsnd 520, 100: playsnd 520, 200:

playsnd 520, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 450, 100: playsnd 450, 100:

playsnd 500, 100: playsnd 450, 200: playsnd 600, 200:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 500, 100: playsnd 600, 100: playsnd 400, 100:

playsnd 450, 100: playsnd 500, 200: playsnd 0, 100:

playsnd 0, 100:

playsnd 520, 100: playsnd 520, 100: playsnd 520, 200:

playsnd 520, 100: playsnd 500, 100: playsnd 500, 200:

playsnd 600, 100: playsnd 600, 100: playsnd 520, 100:

playsnd 450, 100: playsnd 400, 200: playsnd 0, 100:

end sub

function playsnd(byval x as long, byval y as long)

if x <> 0 then

beep x, y * 3

doevents

sleep 50

else

sleep y * 3

end if

end function

'放在模組中,設啟動窗體為sub main

2樓:vb綠手

vb吧一貼

'//給你一個例子

'//周杰倫的回到過去

private declare function beep lib "kernel32" (byval dwfreq as long, byval dwduration as long) as long

private sub form_load()

playsnd 587, 100: playsnd 784, 100: playsnd 880, 100:

playsnd 988, 100:: playsnd 988, 200: playsnd 0, 100

playsnd 988, 100: playsnd 880, 100: playsnd 988, 100:

playsnd 1047, 200: playsnd 988, 100: playsnd 988, 100

playsnd 880, 100: playsnd 100, 150: playsnd 880, 100:

playsnd 784, 100:: playsnd 988, 100: playsnd 0, (5)

playsnd 988, 100: playsnd 0, (5)::: playsnd 988, 100:

playsnd 0, (5):::: playsnd 988, 100: playsnd 880, 100

playsnd 784, 100: playsnd 740, 100: playsnd 784, 200:

playsnd 100, 200:: playsnd 784, 100: playsnd 880, 100

playsnd 784, 100: playsnd 988, 100: playsnd 0, (5):::

playsnd 988, 100:: playsnd 0, (5)::: playsnd 988, 100

playsnd 0, (5)::: playsnd 988, 100: playsnd 100, 100:

playsnd 587, 100:: playsnd 784, 100: playsnd 1175, 100

playsnd 0, (5)::: playsnd 1175, 99: playsnd 988, 100:

playsnd 0, (5):::: playsnd 988, 100: playsnd 0, (5)

playsnd 987, 100: playsnd 100, 100: playsnd 784, 100:

playsnd 0, (5):::: playsnd 784, 100: playsnd 880, 200

playsnd 784, 100: playsnd 0, (5)::: playsnd 784, 100:

playsnd 0, (5):::: playsnd 784, 50:: playsnd 659, (50)

playsnd 784, 100: playsnd 659, 100: playsnd 784, 100:

playsnd 880, 100:: playsnd 100, 100: playsnd 587, 110

playsnd 784, 120: playsnd 880, 130: playsnd 740, 140:

playsnd 784, 200:: playsnd 1, 1::::: playsnd 1, 1

end sub

function playsnd(byval x as long, y as long)

beep x, y * 3

doevents

end function

蟈蟈是怎麼發聲的,蟈蟈用什麼發聲

默默她狠傷 蟈蟈發聲 蟈蟈後背長有透明膜狀發生薄片,發聲時靠翅膀高速震動摩擦產生聲音。蟈蟈的右翅疊在左翅上面,右翅基部下有一個音銼,左翅的表現剛好在音銼下面,形成尖的摩擦緣。當兩翅升起或分開就引起音銼和摩擦緣摩擦而發出聲音。那些善鳴的昆蟲只有雄蟲才有發音器,它們的發聲主要是為吸引雌蟲向其接近,以便交...

怎樣用氣息發聲?用氣息發聲技巧

用氣息發聲技巧如下 1 呼吸。唱歌的大部分技巧都是基於呼吸技巧之上的。呼吸的方法大致分為3種 腹式呼吸 胸腔呼吸和混合呼吸。腹式呼吸就是靠小腹的收縮來呼吸,吸氣的時候小腹會鼓起來。腹式呼吸可以幫助你的運氣下沉,發展你的丹田。胸腔呼吸就是靠胸腔的收縮來呼吸,吸氣的時候胸腔會開啟,並會伴隨著出現輕微聳肩...

蟬是如何發聲的,蟬是怎樣發聲的?

會鳴的蟬是雄蟬,它的發音器就在腹部,像蒙上了一層鼓膜的大鼓,鼓膜受到振動而發出聲音,由於鳴肌每秒能伸縮約一萬次,蓋板和鼓膜之間是空的,能起共鳴的作用,所以其鳴聲特別響亮。並且能輪流利用各種不同的聲調激昂高歌。雌蟬的樂器構造不完全,不能發聲,所以它是 啞巴蟬 米 格 蟬隸屬於同翅目蟬科。蟬的一生分為四...