7 Replies - 418 Views - Last Post: 08 February 2014 - 08:31 PM

#1 rpant1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 03-January 14

Inputting Sound into Web-Based Application

Posted 03 January 2014 - 08:19 AM

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).

Is This A Good Question/Topic? 0
  • +

Replies To: Inputting Sound into Web-Based Application

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9387
  • View blog
  • Posts: 35,242
  • Joined: 12-June 08

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/
Was This Post Helpful? 0
  • +
  • -

#3 rpant1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 03-January 14

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?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9387
  • View blog
  • Posts: 35,242
  • Joined: 12-June 08

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.
Was This Post Helpful? 1
  • +
  • -

#5 zakhrov  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 35
  • Joined: 23-October 13

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.
Was This Post Helpful? 0
  • +
  • -

#6 rpant1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 03-January 14

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)?
Was This Post Helpful? 0
  • +
  • -

#7 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 436
  • View blog
  • Posts: 1,588
  • Joined: 15-January 14

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.
Was This Post Helpful? 0
  • +
  • -

#8 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 343
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

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!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1