Results 1 to 3 of 3

Thread: Square Wave from Sound Card

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2006

    Square Wave from Sound Card

    I would like to generate a square wave using a sound card output using VB. I would like to do more than play a wav file. For Example, I would like to start at about 100 Hz and gradually increase the frequency to 10K Hz. It would also be great to control each channel independently. Does anyone know what Drivers I can use in Visual Basic?

  2. #2
    Join Date
    Feb 2002
    Canada, Toronto

    Re: Square Wave from Sound Card

    This should be easy to modify to create a square wave:

    Though I don't understand why would you do that because theoretically the sound card should not even be able to play square waves.
    The only reason why you hear a square wave is because of the imperfections in the sound card/speakers.

    Ups... Only now I noticed this is for VB.NET amm, I don't know how to do it in VB.NET, you'll have to convert the VB6 code....

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002

    Re: Square Wave from Sound Card

    You'll never generate a clean SW from normal PC hardware. Its just not designed for it. You need special hardware for that. Check out Radioshack or similar they have loads of stuff to do this.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width