Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

speaker tones program

Status
Not open for further replies.

peterpann

Programmer
Jun 19, 2007
63
GB
How can Javascript, or Java/Basic/VB/C/Python. program tones of several different pitches, durations and
preferably different volume levels from a Win 10 PC's external speakers ? The program can be specific
to my PC but I want control from the mouse/keyboard, not a preprogrammed sequence. Thanks.
 
The program can be specific
to my PC

So probably not javascript then, as javascript is a browser language designed to run in a HTTP:context not as a 'desktop' application.

So:
Forum278, (audiogen library)
Forum539,
forum205

Plus any of the M$ 'DOTNET' languages (VB.NET, C~, J# etc.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Public domain .wav files are very easy to find. I put tea-pot-whistle.wav in my current directory.
Code:
<head>
<script>
function PlayWave(waveElem) {
  var sound = document.getElementById(waveElem);
  sound.Play();
}
function StopWave(waveElem) {
  var sound = document.getElementById(waveElem);
  sound.Stop();
}
<embed src="tea-pot-whistle.wav" autostart="false" width="0" height="0" id="waveFile" enablejavascript="true">
</head>
<html>

<button onclick="PlayWave('waveFile')">Play</button> <button onclick="StopWave('waveFile')">Stop</button>

<button 
</html>

Lyndon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top