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. How to play a beep with a particular length

How to play a beep with a particular length

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
4 Posts 2 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.
  • R Offline
    R Offline
    re infecta
    wrote on last edited by
    #1

    I would like to play a beep with a particular lenght in milliseconds. How to do this in VB.net? Is there a way to play the beep with soundcard and not with PC Speaker (the beep function would instead call a wav/mid file and adjust its length according to the target length)? All help is welcome!

    D 1 Reply Last reply
    0
    • R re infecta

      I would like to play a beep with a particular lenght in milliseconds. How to do this in VB.net? Is there a way to play the beep with soundcard and not with PC Speaker (the beep function would instead call a wav/mid file and adjust its length according to the target length)? All help is welcome!

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

      Which version of VB.NET? In 2005, you have the [My.Computer.Audio](http://msdn2.microsoft.com/en-us/library/081ed2x7.aspx)[[^](http://msdn2.microsoft.com/en-us/library/081ed2x7.aspx "New Window")] object that will do something like this. There is no method or function call to resample a wave file and strech/compress it to play in x number of milliseconds. You'll have to find a library to do this for you. I don't know of any off the top of my head.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Which version of VB.NET? In 2005, you have the [My.Computer.Audio](http://msdn2.microsoft.com/en-us/library/081ed2x7.aspx)[[^](http://msdn2.microsoft.com/en-us/library/081ed2x7.aspx "New Window")] object that will do something like this. There is no method or function call to resample a wave file and strech/compress it to play in x number of milliseconds. You'll have to find a library to do this for you. I don't know of any off the top of my head.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        R Offline
        R Offline
        re infecta
        wrote on last edited by
        #3

        Is there a way to generate a sine wave sound with a particular frequency?

        D 1 Reply Last reply
        0
        • R re infecta

          Is there a way to generate a sine wave sound with a particular frequency?

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

          Beep(freq,duration)[^]

          Dave Kreskowiak Microsoft MVP - Visual Basic

          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