Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Playing Audio Using Keystrokes: Is It Possible?

Annabelle5893

Gold Coder
I'm wondering, how would I make an app that plays audio files using the keys on the number pad? Specifically, I want to make an app that triggers "Rotary Pulse 1" by pressing 1 on the numeric keypad, all the way up to "Rotary Pulse 0" on the 0 key. A dial tone will be toggled on by pressing the spacebar, which will begin with a "receiver pickup" noise. The dial tone turns off when digits are dialed via the numeric keypad. If you press the spacebar either when the dial tone is on, or after dialing a number, a "Receiver Hang Up" noise will be triggered. With the rotary dial sounds, the dial turning to the fingerhole is triggered at key down, and the release of the dial returning to the resting position will be triggered by releasing of the number corresponding to the fingerhole (1, 2, 3, 4, 5, 6, 7, 8, 9, 0). This will be accompanied by the internal sound of the dial pulses as heard in a telephone. What is the code I would use to make this audio app using HTML?
 
What exactly do you mean by 'toggle the dial tone'? As far as off-hook tone, yes, just didn't get a chance to implement it. I will also add that for this next update
The spacebar would turn on/off the jazz music, and the enter key would turn on/off the dial tone. N triggers the Nickel tone, D triggers the dime tone, Q triggers the quarter tone, H triggers the half dollar tone, and $ triggers the Dollar tone. Those tones briefly interrupt the dial tone, as they would on a payphone. You know, like when you make a call, you hear the dial tone, you insert a coin and the dial tone is interrupted, then returns once the coin has been detected. Then you can dial the numbers as usual.
 
The spacebar would turn on/off the jazz music, and the enter key would turn on/off the dial tone. N triggers the Nickel tone, D triggers the dime tone, Q triggers the quarter tone, H triggers the half dollar tone, and $ triggers the Dollar tone. Those tones briefly interrupt the dial tone, as they would on a payphone. You know, like when you make a call, you hear the dial tone, you insert a coin and the dial tone is interrupted, then returns once the coin has been detected. Then you can dial the numbers as usual.
oh the dial tone is already implemented 🙂 So currently, once you click ok on the warning, you have 5 seconds until it starts ringing. If you press the hookswitch before those 5 seconds are up, you will hear the dial tone. Or, if you aren't able to make it happen before the it starts ringing, then after you press the hookswitch to hang up, you have 5 seconds to pick it up and hear the dial tone. give it a try. I will be adding these changes in this next update
 
Any updates to my audio program?
Hi there Annabelle,

Sorry for the late reply. I have not been able to wrap up your project since our last conversation. Life has thrown several curve balls my way that have made it difficult to even focus on things. As soon as I have everything squared away, which should be in the next few weeks or so, I will make it my highest priority to get this back to you.
 
Hi there Annabelle,

Sorry for the late reply. I have not been able to wrap up your project since our last conversation. Life has thrown several curve balls my way that have made it difficult to even focus on things. As soon as I have everything squared away, which should be in the next few weeks or so, I will make it my highest priority to get this back to you.
I sure hope everything's OK. And I really do hope you'll have a happy holiday season this year. I certainly will. Mom's comin' over on Christmas morning and we're gonna have breakfast together and open gifts.
 
I sure hope everything's OK. And I really do hope you'll have a happy holiday season this year. I certainly will. Mom's comin' over on Christmas morning and we're gonna have breakfast together and open gifts.
Thank you Annabelle, I hope you also have a great holiday season. I hope you and your family have a great time and many blessings
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom