FAQ!!!!如何用声卡发指定频率的声音?老话题了!(100分)

  • 主题发起人 北京男人
  • 开始时间

北京男人

Unregistered / Unconfirmed
GUEST, unregistred user!
我想用声卡直接发出do re mi,比如频率为1425Hz的声音,我想做个电脑钢琴
之类的东东!高手请教,我搜索大富翁、CSDN都搜索了没找到,请教,
小弟感激不尽!!!!!
 
我有个电脑钢琴你要不要?并且还不错!如果有好音像和真实钢琴差不多
 
我要Delphi源代码:发到这里吧:
tzdgg@sohu.com
 
procedure TForm1.Button1Click(Sender: TObject);
var
handle: HMIDIOUT;
begin

// Open default MIDI Out device */
if midiOutOpen(@handle, Cardinal(-1), 0, 0, CALLBACK_NULL) =0 then

begin

// Output the C note (ie, sound the note) */
midiOutShortMsg(handle , $00403C90);

// Output the E note */
midiOutShortMsg(handle, $00404090);

// Output the G note */
midiOutShortMsg(handle, $00404390);

// Here you should insert a delay so that you can hear the notes sounding */
Sleep(1000);

// Now let's turn off those 3 notes */
midiOutShortMsg(handle, $00003C90);
midiOutShortMsg(handle, $00004090);
midiOutShortMsg(handle, $00004390);

// Close the MIDI device */
midiOutClose(handle);
end;
 
这么简单的问题都美人回答!气死我了,我是从国外论坛得到答案的!》
 

Similar threads

I
回复
0
查看
588
import
I
I
回复
0
查看
766
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
632
import
I
顶部