For a school project, I'm attempting to make a web-based application that allows a user to play a guitar into the application and measures his/her playing based off of already inputted correct notes in the form hertz. I know there are cables that go from 1/8 in. to USB. However, how could I write a program that interprets that in the form of hertz? Also, which language would be best for this? I'd be willing to learn another language as I don't know many (Java and PHP).
Inputting Sound into Web-Based Application
Page 1 of 17 Replies - 1003 Views - Last Post: 08 February 2014 - 08:31 PM
Replies To: Inputting Sound into Web-Based Application
#2
Re: Inputting Sound into Web-Based Application
Posted 03 January 2014 - 08:28 AM
Well.. my first thoughts were to get the audio into a more digital format.. something you can transmit to a server for analysis and so forth.. the immediate thought was an arduino middle man.
http://www.instructa...no-Audio-Input/
http://www.instructa...no-Audio-Input/
#3
Re: Inputting Sound into Web-Based Application
Posted 03 January 2014 - 02:21 PM
Thanks for the reply. Is there a way to do it using an 1/8 in. to USB cable?
#4
Re: Inputting Sound into Web-Based Application
Posted 03 January 2014 - 02:29 PM
I would assume you need something to translate the analog into digital.. and typically that is not just in a cable.
#5
Re: Inputting Sound into Web-Based Application
Posted 04 January 2014 - 04:19 AM
I am guessing you want to make a web based guitar tuner. First off, you are going to need to convert that audio input into digital format. You will need 1/8 in to std headphone cable (3.5mm i think).Plug that into your computers microphone jack and. I would go with something ffmpeg based to convert your audio input into WAV. Then you will need a program to analyze the waveform and get the frequency to compare it to the predefined musical note. Then you need to send that output in some form to the web page. All this stuff is going to require some heavy audio processing in real time. Unfortunately I have zero experience in audio analysis so I have no idea how to give you advice on that.
#6
Re: Inputting Sound into Web-Based Application
Posted 03 February 2014 - 11:36 AM
How can I convert the audio input to WAV in real time (versus saving a recording and then processing it in the application)?
#7
Re: Inputting Sound into Web-Based Application
Posted 03 February 2014 - 12:09 PM
Doing this online is going to require some special tools. I know Flash can accept and transmit audio, and I'm almost positive that a Java applet would also be able to send audio data to the server. There are some features for that being worked on by Mozilla and a few others for Javascript, but I don't think you'll be able to find that in any major browser at this point.
Ultimately though, getting the audio to WAV is probably going to be the same regardless of whether or not it's real time. At the end you need the audio data in memory, so you're either reading from a file or a buffer, but it's the same thing. Doing everything in real time is going to be a challenge, that's a lot of data to send across the network and it's going to require some decent computing power to support multiple users.
There's a project here that uses Flash to send audio to the server:
https://code.google..../wami-recorder/
There's some information from Adobe here:
http://help.adobe.co...90204-7d1d.html
As far as converting the audio, like zakhrov mentioned I would look into ffmpeg, which you're going to have to install on the server.
Ultimately though, getting the audio to WAV is probably going to be the same regardless of whether or not it's real time. At the end you need the audio data in memory, so you're either reading from a file or a buffer, but it's the same thing. Doing everything in real time is going to be a challenge, that's a lot of data to send across the network and it's going to require some decent computing power to support multiple users.
There's a project here that uses Flash to send audio to the server:
https://code.google..../wami-recorder/
There's some information from Adobe here:
http://help.adobe.co...90204-7d1d.html
As far as converting the audio, like zakhrov mentioned I would look into ffmpeg, which you're going to have to install on the server.
#8
Re: Inputting Sound into Web-Based Application
Posted 08 February 2014 - 08:31 PM
Your best bet is to look into the Web Audio API, this allows sound capture in real time. Typically you would use a microphone but I have seen it done with a guitar too!
Page 1 of 1