I worked with SwitcherCad and found it very useful. Mike did a really
good job and he is a very good in helping others too.
...
> Hello,
> SwitcherCADIII has done a big step towards easy audio signal processing
> with a SPICE program.
> Now you can feed .
wav-files directly to your filters and generate
> a new
output file in .
wav format or you can generate sounds with
> circuits in SPICE and store them in .
wav files for later playing
> with your sound card.
> I can promise you it is a great pleasure to see the signals of any
> .
WAV files in the
output window of SwitcherCADIII.
> Thanks to Mike for picking up the idea brougth up by Martin Griffith
> in the thread "Dumb SPICE question" in the newsgroup
> sci.electronics.design.
> The free SPICE software SwitcherCADIII can be dowloaded from
> http://www.linear.com/software/ .
> If you already have SwitcherCADIII, you must upgrade to the latest
> version 1.13p. The man who manage and do the work on SwitcherCADIII
> is Mike Engelhardt working for Linear Technology.
> Best Regards
> Helmut
> Appendix:
> ---------
> This is the summary of the threads regarding SwitcherCADIII
> implementation of the .wave command.
> The original threads can be found in "Dumb SPICE question"
> in the newsgroup sci.electronics.design.
> General decription from Mike:
> -----------------------------
> I just made it up an implemented it in LTspice/
> SwCADIII (I'm the author of the program) The syntax
> means create a file with absolute path "C:\output.wav"
> and digitize nodes left and right into with 16 bit
> resolution and a sample rate of 44000 samples per
> second. You just place the command on the schematic
> as a SPICE directive. You can read the .wav file
> into another simulation by giving a voltage source a
> value of wavefile=C:\ouput.wav instead of something
> like 5V or PULSE(...) By default it will pick the
> first channel which is called channel 0. To pick the
> second channel set the value of a voltage source to
> wavefile=C:\ouput.wav chan=1
> Mor e details about the syntax from Mike:
> -----------------------------------------
> To play a .wav file, give a voltage source a value of
> wavefile="C:\input.wav" To play the right channel of a stero
> track, add chan=1 to the above. Then to save a nodes as .wav
> file, add the spice directive
> .wave C:\ouput.wav 16 44K V(left) V(right)
> Additional explanations
> -----------------------
> Example for the values of voltage sources for left and rigth cahnnel.
> Value of first source:
> wavefile="c:\test.wav" chan=0
> Value of second voltage source:
> wavefile="c:\test.wav" chan=1
> The parameter chan=0/1 uses left/rigth channel of the .wav file.
> Define the simulation time as usual.
> .TRAN x
> The x is the time in seconds.
> The 16 mean 16 bits. 1 to 32bits are allowed. The 44K means
> sample 44,000 times per second. Each node name puts another
> channel in the file.
> You can also play it as .wav file into your sound
> card, but beware that most PC codes won't, e.g.,
> play more than 16 bits, so you have to be careful
> to pick something you can play, like 8 or 16 bits and
> mono or stereo, while the .wav format and LTspice
> can do 1 to 32 bits and 65536 channels.
> The syntax allows double quotes around the file name
> so you can use names that include spaces. You don't
> need absolute path names, but can default to computing
> path path off the the source schematic(or netlist).
> Example: .wave "C:\out put.wav" 16 44K V(left) V(right)
> Example from Mike Engelhardt:
> -----------------------------
> It generates a .wav file in SPICE.
> *
> V1 left 0 sine(0 1 1K)
> V2 right 0 sine(0 1 2K)
> .wave C:\output.wav 16 44K V(left) V(right)
> .tran .1
> .end
> If you use a file name with a space in it, use double quotes.
> You do need the latest version of SwCADIII, though. Look on
> the "help about" box. Check if you see today's date.
> My example:
> -----------
> It reads the left and rigth channel of a .wav file into the simulation
> and feed the signals to two filters. The filtered output is written
> again to a two channel(stereo) .wav file.
> First put two voltage sources on the schematic and then add an
> R/C-filter to each source.
> The value(V) of the voltge sources have to be changed to
> wavefile="c:\test.wav" chan=1
> wavefile="c:\test.wav" chan=0
> You must name the output nets of the R/C-filter e.g. left and rigth.
> Then add with the .op button the two SPICE commands:
> .wave C:\ouput.wav 16 44K V(left) V(right)
> .TRAN 1
> That's all. Let's RUN.
> This examples plays and records 1 second of your .wav file.