Measure intensity of particular instrument sound

Go To Last Post
35 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. Need to measure the intensity or loudness of particular musical instrument like guitar and based on its loudness i have to send a signal to pc.
More the sound more the signal value and lesser the sound lesser the value

2. How to do it?

3. One thing i thought of placing a mic and read by adc. But problem in that is i have to measure only that instrument noise and reject any other noise like of nearby humans or any other

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Why have you posted this on an AVR forum. Sounds like a job for FFTs probably on a DSP or at least a fairly powerful CPU luke a Cortex M4 or M7.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you ask for a specific note (such as 'A')? Or, must it be any arbitrary note (or, even, chord) that the instrument player chooses to play?

 

Are there other instruments playing at the same time, or is the background to be rejected non-musical?

 

Can you place the microphone or sensor in or on the instrument? Or, must it be some distance from the instrument?

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Aug 24, 2018 - 05:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's difficult to isolate instrument sounds from other sounds.  This is why recording studios

have soundproof rooms and keep the instruments separated.  If you have a problem with

noise from people, keep the people away from your recording equipment.  Placement of

microphones can help reduce this effect if they're much closer to the sound you want to

pick up and further from unwanted sounds.  Electric guitars use pickups which do not "hear"

other noise (except if they aren't shielded properly and there is a nearby EM noise source),

so if you are measuring electric guitars and basses you may not need to worry about voices

or other sounds interfering.

 

Regarding the other requirements, human perception of sound volume is logarithmic and

is measured in decibels.  Three decibels equates to a doubling of volume.  There are many

charts available showing the decibel levels of various sounds from whispers to car engines

to jackhammers.

 

--Mike

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I forgot to mention that the circuit you want is called an "envelope follower"

which as the name suggests produces a signal which tracks the amplitude of

a signal (the envelope).  You can build one with an open-collector comparator,

a capacitor and two resistors.  Sorry I don't have a way to post a schematic

as I'm traveling....

 

--Mike

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What kind of signal are you sending to the PC?  Is it a number that is dependent on the loudness of the sound, or the electrical envelope amplitude of the sound?   Google for "electric guitar effects  envelope filter   Dr Q. "     Your audio will come from the microphone and be amplified to line-input level (about 1 v p-p AC for a moderately loud sound).  This will go into the envelope follower,  which is an op-amp analog amplifier with the output going into a diode, then a resistor and capacitor.  You want the cap to charge up to the max volume and only lose a tiny voltage when the input signal going to the other peak.   Then the output of the envelope follower goes into a analog-digital convertor.    This number can be sent to the PC through a USB-serial port,  or you can convert it to a decibel value  which is something like 20* log10 of the signal voltage.

   In the 1970s, guitar signals were fed into envelope filters and then the envelope voltage set the center frequency of a bandpass filter.   You got a "wah-wah" sound according to how hard that you hit the strings.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could devise an audio "tap" where you connect to the output of the guitar(if it's electric) with a pass through and place a high impedance buffer on the pass through to pass the signal to your processor.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 This is why recording studios have soundproof rooms and keep the instruments separated.

Of course there are Musical recording studies and then there are Engineering recording studios.

 

The "roller-coaster" hanging from the ceiling holds the microphone array.

 

Timing is everything, I was just at this building this past weekend! 

 

JC

 

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This seems to be a typical post from the OP, no reply, and possibly posted in more than one forum.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks interesting!  Which AVR are they using for post-processing?

--Mike

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which AVR are they using for post-processing?

...if they used a STAMP then it it would be a PIC.....

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

its sort of game in kids play. the louder the instrument played by kids, more the score like in bar graph display.

its not only guitar, it may be any musical instrument, will be fixed first.

 

so measure instrument loudness only.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Much like the old LM3916 VU meter IC?

 

YOU are not giving much information on the design.  Is the circuit supposed to be programmable to the type of instrument connected to it, or is this circuit supposed to be able to tell the guitar from a drum for example?

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vindhyachal Takniki wrote:
its sort of game in kids play. the louder the instrument played by kids, more the score like in bar graph display.

So that really doesn't answer any of the key questions that you have been asked - does it?

 

  • Are the instruments playing one at a time, or all together?
  • If playing together, does each instrument have a separate microphone?

 

Vindhyachal Takniki wrote:
measure instrument loudness only.
 

Define what you mean by, "loudness".

 

That is a subjective measure!

 

And remember that human hearing is not linear ...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Aug 27, 2018 - 08:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avr-mike wrote:
recording studios have soundproof rooms and keep the instruments separated.

or have a separate microphone for each instrument, placed close to the instrument - see close mikinghttps://en.wikipedia.org/wiki/Microphone_practice#Basic_techniques

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. there will be only one instrument, plus surrounding noise & people

2. loundness means, more loud the instrument higher the score

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vindhyachal Takniki wrote:
1. there will be only one instrument

and is it always the same instrument?

 

ie, different people take turns on the one instrument?

 

Quote:
2. loundness means, more loud

But, again:

That is a subjective measure!

 

And remember that human hearing is not linear ...

and are you just concerned about peak amplitude? Or sustained over some period? Or what ... ?

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mr. Takniki---why do you not provide much info?  For example how much louder than the audience will the instrument be?  2x,  10x, 100x?

 

Just try using a directional microphone , the A/D and your leds...try it out...then come back if the results are not good.  Anything else at this point is a stab in the dark. 

You may find the background noise  barely makes a difference compared to the loud up close instrument.  Also, maybe tell the audience to be quiet.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
Mr. Takniki---why do you not provide much info?

THis is somewhat typical.  He is making a consumer/commercial product and comes here for help, but wants to keep most of the information to himself so no one tries to make the gizmo and sell it first.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps a glance at an old schematic would help.  The envelope (loudness detector) circuit is on the bottom.  The top part is used to make your electric guitar sound like a duck, hence the name "Dr. Quack" or "Dr. Q" of the original design.  In the voltage-controlled bandpass filter section at the top, the transistor acts like a voltage-controlled potentiometer.  The varying voltage output of the envelope follower changes the center frequency of the filter according to how hard the guitar strings are played.

 

  An alternative to a bandpass filter is to use the envelope-follower voltage to modify the speed of a "bucket-brigade" flanger/chorus IC.  In this case, the intensity of the strum on the guitar strings changes the "swirling" speed and attack of the flanger/chorus chip.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hence the name "Dr. Quack"

Now I'm getting it! cheeky

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We will try to blow out as loud as one grown person can. Then fix around 1.3 times to highest value, to mark it as loudest while we do our testing.  Once loundess is fixed, then rest of it are measured wrt to max value recorded.

 

made a preamp & filter ckt, will try tomorrow & will share if it works

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

How is this (as the title suggests) measuring the sound of a particular instrument? That would be a very hard thing to do. You just seem to mean a sound meter. The fact it happens to come from an instrument is almost entirely irrelevant.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
How is this (as the title suggests) measuring the sound of a particular instrument?

Or even as the OP suggested!

 

You just seem to mean a sound meter

Agreed.

 

The Title and OP seem to be complete misdirection!

 

frown

 

The fact it happens to come from an instrument is almost entirely irrelevant.

Indeed.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And, for the record, Amazon has a range of sound meters, from $17 USD to > $200.

 

Even the ~$20 units look quite refined!

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

and there are plenty of free apps for your smartphone

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is simply a "sound level" problem. The fact that there is background sound is relatively unimportant. The fact that different instruments are involved is relatively unimportant. 

 

Recommend: Use one of the sound level apps for your smart phone. 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

and there aren't even different instruments involved - see #16 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, one instrument at a time, but it could be used with different instruments (#16):

its not only guitar, it may be any musical instrument

Jim 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Sounds like they're auditioning for new members of Spinal Tap, recognized for being one of the UK's "loudest" bands.

 

--Mike

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Image result for goes up to 11

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All the way up!

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

right now we have done a workaround. attached a small mcu, small battery & adc pin of mcu behind the instrument & just measured its value.

it is giving relatively good results at the moment. As noise remains less for most of time & when instrument blows, it has much higher value on adc, as adc is just connected on back with microphone.

 

checking sound apps also, will let u know if that works too

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds Good!    Say, after spending all that time and company money on researching the internal structure of a simple audio detector,  here's one on eBay selling for the price of a candy bar: https://www.ebay.com/itm/Practic...

 

Ichiban numba one rule for doing advanced embedded-system design in the 21st-century:   Before doing anything else, first check on eBay to see if what you are interested in designing is already available for pennies!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:
Before doing anything else, first check on eBay to see if what you are interested in designing is already available for pennies!

 

But that device does not do what the OP wants.  The OP essentially wants to measure the SPL of several instruments as part of a game as eluded to in post #16. the device you are suggesting is a threshold detector where you need to manually set the trip level.  Of course the OP is only feeding us fragments of their Guitar HEro type device so for all matters you could also be spot on too.

 

 

Jim

 

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user