Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Multisim users, sound files

  1. Oct 29, 2015 #1
    Is it possible to import a sound file into multisim and run it thru a circuit eg a passive low pass RC filter and send the signal to a speaker and save the clean signal say as a wav file.
  2. jcsd
  3. Oct 29, 2015 #2


    User Avatar
    Gold Member

    You can generally input data from a file into a simulation, operate on it, then capture that data to a signal and write it to a file. You can then convert it to whatever format you choose.

    The actual commands to do that depends on the simulator, but it is basically learning to make use of the various $read and $write simulator functions.
    Not sure what multisim has available, if anything.

    For example the following (from an ncsim file, not multisim)
    $fwrite(tester_vectorsFPGA_filehandle,"%s %s %b %b //%0d\n",dpstringFPGA, dmstringFPGA, txoe, testeroe, vector_num12);

    will write to the file represented by the filehandle: two strings (contained in dpstringFPGA, dmstringFPGA) , and 2 binary values (contained in txoe, testeroe) and a decimal value vector_num12

    You just capture the data into a variable at each clock edge, and write it out.

    You do a similar thing to read a file into a 2 dimensional array, then iterate through the array on each clock edge (or as you need the data).
    Generally the array needs to be large enough to hold the whole file.

    Others may have more experience with multisim.
  4. Oct 29, 2015 #3
    Is ncsim a circuit simulator?

    Not sure if it is valid code language but I read a lot of random symbols in yr code.

    Same happens to math eqtns I read here so I think it is prob my end.
  5. Oct 29, 2015 #4


    User Avatar
    Gold Member

    ncsim is a Cadence multilanguage simulator that I use at work.
    I guess what I wrote won't help you with multisim. Sorry.

    I recommend you ask your question in the NI multisim forums. I assume there are symbols to access file data for read and write, but I don't know how to do it.
  6. Oct 30, 2015 #5
    Links to Cadence overview?
  7. Oct 30, 2015 #6


    User Avatar
    Gold Member

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook