[VB6] How can i measure a volume of the sound entering the microphone of my computer.
-
I am using Visual Basic 6. I am trying to write a program that would gather statistics on the loudness of the input on the microphone for an expiriment. (I have a USB microphone.) WHAT command in Visual Basic would allow me to get a numeric value for the loudness of the sound coming from the microphone? I would like to see a text of the program that does that. Thanks.
-
I am using Visual Basic 6. I am trying to write a program that would gather statistics on the loudness of the input on the microphone for an expiriment. (I have a USB microphone.) WHAT command in Visual Basic would allow me to get a numeric value for the loudness of the sound coming from the microphone? I would like to see a text of the program that does that. Thanks.
You have a problem. The loudness of a sound is not accurate because of settings in the sound card, quality of microphone, calibration, type of microphone, ... I hope you're not using the data for anything in particular. But, you've got a bunch of options to look at - here[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
You have a problem. The loudness of a sound is not accurate because of settings in the sound card, quality of microphone, calibration, type of microphone, ... I hope you're not using the data for anything in particular. But, you've got a bunch of options to look at - here[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
i know how to use google, thanks i am using visual basic 6 so vb.net is no good for me they are different languages i found some code in c#, but even if i imply it into vb6, i will have to change it, so i don't think that it will work for me
cavemen wrote:
i know how to use google, thanks
Great. Then you know how to replace "VB.NET" in the query with "VB6".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
i know how to use google, thanks i am using visual basic 6 so vb.net is no good for me they are different languages i found some code in c#, but even if i imply it into vb6, i will have to change it, so i don't think that it will work for me
cavemen wrote:
i am using visual basic 6 so vb.net is no good for me they are different languages
Well, welcome to reality. VB6 is crap, it always was, but now, it's unsupported crap. VB.NET is free. What possible reason could you have to use VB6 ?
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
cavemen wrote:
i am using visual basic 6 so vb.net is no good for me they are different languages
Well, welcome to reality. VB6 is crap, it always was, but now, it's unsupported crap. VB.NET is free. What possible reason could you have to use VB6 ?
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
vb6 is user friendly no memory allocation, headers and all that bull$#!+, friendly syntax plus this is the only compiler that i have I cannot program VB.net, I am not a professional programmer to learn new languages every year. I am just asking if you remember how to solve this issue using the methods of VB6. Thanks.
-
vb6 is user friendly no memory allocation, headers and all that bull$#!+, friendly syntax plus this is the only compiler that i have I cannot program VB.net, I am not a professional programmer to learn new languages every year. I am just asking if you remember how to solve this issue using the methods of VB6. Thanks.
Well, you better pick up VB.NET and fast. VB6 is not supported under Windows Seven. Once you do learn it, you'll find that VB6 is NOT user friendly in the least and you'll feel like you've been writing code in the Dark Ages.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Well, you better pick up VB.NET and fast. VB6 is not supported under Windows Seven. Once you do learn it, you'll find that VB6 is NOT user friendly in the least and you'll feel like you've been writing code in the Dark Ages.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Thank you for your advise but I am trying to solve a real problem with whatever technology available.
cavemen wrote:
I am trying to solve a real problem with whatever technology available.
Visual Studio 2008 Express Edition is free and can be downloaded from the internet, without having to register or anything. Technology can't be much more available than that. You don't need to be concerned about vb.net's syntax being a whole lot different from VB6's. The biggest difference is, that a lot things have been simplified. Certain things that would take you 5 lines of code in vb6, can be accomplished with a single method in vb.net. And if you can't figure out how to do something in vb.net, that you do know how to do in vb6, you can reference vb6 in vb.net and then still use the old functions after all. Now more to the point of your problem, vb6 is not only no longer supported by MickeySoft, but has also been all but abandoned by programmers. This means that you'll be much more likely to get help solving your problem in vb.net, than in vb6. Also you'll find many many more examples on the net, and possibly ready made drivers and libraries to help you. Trust me, when I switched from vb6 to vb.net, I was very frustrated for all of a week (maybe a week and a half). After that I felt, like Dave so aptly put it, like I had been writing code in the dark ages. Save yourself a month of frustration in vb6 (and still not find the solution to your problem), by suffering a week and a half in vb.net.
My advice is free, and you may get what you paid for.
-
Thank you for your advise but I am trying to solve a real problem with whatever technology available.
cavemen wrote:
Thank you for your advise but I am trying to solve a real problem with whatever technology available.
You are trying to solve a real problem with inappropriate technology. Choice of language apart, using a USB mic through a sound card in a PC will not give you any kind of accurate measurement of volume. (It's even debatable what you might mean by "volume" anyway...)
There are three kinds of people in the world - those who can count and those who can't...
-
cavemen wrote:
Thank you for your advise but I am trying to solve a real problem with whatever technology available.
You are trying to solve a real problem with inappropriate technology. Choice of language apart, using a USB mic through a sound card in a PC will not give you any kind of accurate measurement of volume. (It's even debatable what you might mean by "volume" anyway...)
There are three kinds of people in the world - those who can count and those who can't...
Like the quote :laugh: To my shame I must say it actually took me a second look to get it.
My advice is free, and you may get what you paid for.