Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. [VB6] How can i measure a volume of the sound entering the microphone of my computer.

[VB6] How can i measure a volume of the sound entering the microphone of my computer.

Scheduled Pinned Locked Moved Visual Basic
question
11 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C cavemen

    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.

    D Offline
    D Offline
    Dave Kreskowiak
    wrote on last edited by
    #2

    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

    C 1 Reply Last reply
    0
    • D Dave Kreskowiak

      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

      C Offline
      C Offline
      cavemen
      wrote on last edited by
      #3

      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

      D C 2 Replies Last reply
      0
      • C cavemen

        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

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #4

        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

        1 Reply Last reply
        0
        • C cavemen

          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

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #5

          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

          C 1 Reply Last reply
          0
          • C Christian Graus

            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

            C Offline
            C Offline
            cavemen
            wrote on last edited by
            #6

            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.

            D 1 Reply Last reply
            0
            • C cavemen

              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.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #7

              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

              C 1 Reply Last reply
              0
              • D Dave Kreskowiak

                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

                C Offline
                C Offline
                cavemen
                wrote on last edited by
                #8

                Thank you for your advise but I am trying to solve a real problem with whatever technology available.

                J M 2 Replies Last reply
                0
                • C cavemen

                  Thank you for your advise but I am trying to solve a real problem with whatever technology available.

                  J Offline
                  J Offline
                  Johan Hakkesteegt
                  wrote on last edited by
                  #9

                  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.

                  1 Reply Last reply
                  0
                  • C cavemen

                    Thank you for your advise but I am trying to solve a real problem with whatever technology available.

                    M Offline
                    M Offline
                    molesworth
                    wrote on last edited by
                    #10

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

                    J 1 Reply Last reply
                    0
                    • M molesworth

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

                      J Offline
                      J Offline
                      Johan Hakkesteegt
                      wrote on last edited by
                      #11

                      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.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups