Inputting a .wav file in MultiSim

Discussion in 'Programmer's Corner' started by ElectricalEngineer, Jun 17, 2009.

  1. ElectricalEngineer

    ElectricalEngineer Thread Starter New Member

    Joined:
    Jun 17, 2009
    Messages:
    4
    Hey all,

    Let me just explain to you the background of my situation. I am taking a Circuits 1 course and we are nearly done with the semester. We have a bonus assignment that requires us to create a passive filter(either High/Low/BandPass or BandReject) inorder to filter a distortion in an audio file in the form of .wav

    The proffessor told us that this bonus assignment is beyond the scope of this course, and thus it will boost up our final grade upon completion.

    I need someone to guide me in the right direction. She uploaded 2 files, noisyspeech.wav and cleanspeech.wav. After hours of trying to mess around with MultiSim, I have yet to reach a solution to that.

    My gut feeling is that it will be a BandPass filter, hence I can use the Filter Wizard for creating that.

    Here are the files:

    Noisyspeech : http://www.tempfiles.net/download/20...isyspeech.html
    Cleanspeech : http://www.tempfiles.net/download/20...eanspeech.html

    After reading the chapter on Frequency Selective Circuits (Chapter 14, Electric Circuits, Nilsson & Riedel). I think that the filter I need to create is a Bandpass Filter since the human voice has a certain range of frequency, 85 to 155 Hz, hence I will need 2 cuttoff frequencies for the Bandpass filter inorder to filter out the noise in the speech file. I will be using the Filter Wizard, by selecting the Bandpass filter option.

    My question remains as to how to input the .wav file on MultiSim


    Thanks in advance, and please find the speech files attached. :)
    [​IMG]
  2. davebee

    davebee Well-Known Member

    Joined:
    Oct 22, 2008
    Messages:
    532
    Location:
    San Francisco Bay area
    The proper way would be to read the header of the WAV file and decode the encoded sound format, playback rate, bits per sample, mono vs. stereo, and the start location and length of the data section.

    But if you know the format of the WAVs, and it's a simple format, you can take shortcuts. The simplest WAV format are just bytes of digitized voltages. You read a byte, apply its value to a DAC, pause the delay specified by the digitization rate, and repeat to the end of the file. You can skip the first several dozen bytes of the file to jump over the header, then treat all remaining bytes of the file as data. This works in practice for playing WAVs, but I can't say how much your teacher will accept it for a school course. But on the other hand, the WAV header is not that difficult to decode.

    In newer versions of Windows, you can right-click on the WAV file, get properties, and Windows will display many of the WAV file parameters. It seems like my computer network is blocking the file downloads so I can't get the actual files to see their format.

    So I don't know Multisim, but reading data from the WAV file may reduce to as simple as inputting the file bytes, one by one, and treating them as samples of an audio soundwave.
Similar Threads
Forum Title Date
Programmer's Corner Question about C compilation process with respect to include files Oct 13, 2014
Programmer's Corner Software that is intelligent enough to differentiate and save serial data into different file Sep 9, 2014
Programmer's Corner parse pixel data from png file? Jul 23, 2014
Programmer's Corner ide wont accept hex file of kiel Feb 7, 2014
Programmer's Corner Problems with msim.ini file of Pspice Jan 5, 2014

Share This Page