Jump to content

Clockwatch sound activated using php?


mic8310

Recommended Posts

Hi

Id like to create a little stopwatch program. A start button will activate the stopwatch, a sound above a set decibel level (external microphone) will capture laptimes when the sound hits the required db level and log the data, this all needs to be live.

Is this possible to do using php and if so, can anyone point me in the right direction for the sound part please! lots of codes for stopwatches but the sound activation I cannot seem to find any info on.

 

Many thanks 

Link to comment
Share on other sites

It's unclear to me what exactly your goal is, but most likely the answer is no.  PHP doesn't really have the ability to play sounds or listen for sounds.

Try and clarify what your end goal is and maybe some better help could be provided.   For example, are you talking making a web page with a stop watch, or some CLI script?

  • Great Answer 1
Link to comment
Share on other sites

You would need to involve javascript. You could do this almost all in javascript then do an ajax call to send the data to php. Here's a guide that shows how to listen for sound and make a reactive page. It should give you an idea of how to start.  https://hackernoon.com/creative-coding-using-the-microphone-to-make-sound-reactive-art-part1-164fd3d972f3

  • Thanks 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.