473,382 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Making computer sound a specific tone

I'm familiar with the beep function but is there any function that enables
you to determine the pitch and duration of a tone produced by the computer's
speaker?

John
Nov 20 '05 #1
2 1577
The API call to the beep function can accomplish this, but be warned, it
only works on NT-based OS's, NT4, 2000, XP and 2003

--
HTH,
-- Tom Spink, ber Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations

"John S. Ford, MD" <jo***************@hotmail.com> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...
I'm familiar with the beep function but is there any function that enables
you to determine the pitch and duration of a tone produced by the computer's speaker?

John

Nov 20 '05 #2
* "John S. Ford, MD" <jo***************@hotmail.com> scripsit:
I'm familiar with the beep function but is there any function that enables
you to determine the pitch and duration of a tone produced by the computer's
speaker?


For NT systems:

\\\
Private Auto Declare Sub Beep Lib "kernel32.dll" ( _
ByVal dwFreq As Int32, _
ByVal dwDuration As Int32 _
)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter | last post by:
I've embedded a midi file as background sound in my "index.html" which links to other pages on the site and I want the the same background sound to play on all pages "without interruption (and...
19
by: Anon Email | last post by:
Hi everyone, Let's see, now. This question is about the capabilities of ANSI C++. I want to write and compile code in ANSI C++ that, when compiled, will make the computer speaker beep; or, at...
1
by: Marco Krechting | last post by:
Hi All, I have a database with the timer function set to warn the user that arecord is due to expire. Is there a Win API that I can use so a loud warning will go off. Not this simpel beep in...
0
by: seo gang ho | last post by:
this is my source :$ (tone generator) how to play sound in outputbuffer? please help me...teach me detail...:$ using System;
5
by: djc | last post by:
what choices do I have to play sounds in a program using vb.net? Or, I guess if nothing vb specific what windows API(s) should I look at? I am interested to find out whats needed for playing short...
351
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
4
by: sravan_reddy001 | last post by:
i want a sound to be generated when and event occurs. especially when a message box is displayed and when an user want to close a form(i want to include this in the form closing event) thanks... ...
5
by: Slickuser | last post by:
I want to play a note in C# .NET giving a frequency like the one show below. Is it possible? C 261.6 C# 277.2 D 293.7 D# 311.1 E 329.6
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.