我该如何开始提示音,并让它运行下去直到我明确地阻止它?到我、让它、我该、提示音

2023-09-06 05:11:05 作者:﹏゛Aeljinh陌琳

我试图写我的孩子钢琴应用程序。什么我做的是使用一个WinForm里面的KeyDown和KeyUp事件。这样做是为了启动通过在KeyDown事件扬声器冒落的频率,然后停止其在KEYUP事件。就像在钢琴:)

I am trying to write a Piano application for my kid. What I am doing is using KeyDown and KeyUp Events inside a WinForm. The idea is to start emiting a frequency through the speaker in KeyDown event and then stop it in Keyup event. Just like in a piano :)

不过,这是与音频或视频什么我的第一dabling。那么,有没有办法做到这一点? IZ有没有更好的办法做我的建议。请注意,我没有使用MIDI或WAV文件或任何类似。因此,我不能开始使用的样本,让我这样做。另外请注意,我打算去的不仅仅是钢琴频率。

However, this is my first dabling in anything with Audio or Video. So, Is there a way to do it? Iz there a better way to do what I am suggesting. Note that I don't have access to midi or wav files or anything similar. Hence I can't start using samples that allow me to do this. Also note that I plan to go for more than just Piano frequencies.

此外,这还只是一个孩子玩得开心(谁是只有15个月大的:)) 任何帮助是AP preciated。

Again, this is just for a kid to have fun (who is just 15 months old :)) Any help is appreciated.

推荐答案

尝试寻找这些物品。

声音的基础知识:如何让音乐出什么都没有

声音发生器 - 如何利用数学创造外星人的声音 公式

Sound Generator – How to create alien sounds using mathematic formulas

音频-Real低水平声音生成的C#?