Connect with us

Music to Ppice

Discussion in 'CAD' started by reaman4ever, Jun 23, 2006.

Scroll to continue with content
  1. reaman4ever

    reaman4ever Guest

    How do I convert a music file into something pspice can use? I figure
    out that I can use the VPWL_FILE if I have a .txt with a time an
    voltage column, but how do I create that .txt file
    Thank
     
  2. Joel Kolstad

    Joel Kolstad Guest

    Do you have access to Matlab? It'll happily read in .WAV files and write out
    the type of text file you're after.
     
  3. reaman4ever,
    FYI, LTspice can directly play .wav files into your
    simulation. The syntax is

    V1 X 0 wavefile=.\ring.wav chan=0

    Example using the technique are installed as
    C:/Programme/LTC/SwCADIII/examples/Educational/{wavein.asc,waveout.asc}

    --Mike
     
  4. reaman4ever

    reaman4ever Guest

    [/quote
    Do you have access to Matlab? It'll happily read in .WAV files an
    write out
    the type of text file you're after.[/quote

    Yes I do, How do I do that
    Thank yo
     
  5. Jim Thompson

    Jim Thompson Guest

    Mike,

    Will it create a PWL file, or is it internal use only?

    ...Jim Thompson
     
  6. Jim,
    LTspice can read/write .wav files. This is so
    you can play a track of music from a .wav into a
    simulated HiFi amp while writing the amp's output
    to another .wav file. (Then you can replace the
    tubes with transistors and see if you like that
    sound better -- all without getting near any
    hardware.)

    LTspice can also do the PSpice "PWL FILE=..."
    syntax. But to create that file you'd have to
    export the simulation data to a file and delete
    the header with data labels to get the format you
    need for the "PWL FILE=..." syntax.

    --Mike
     
  7. Jim Thompson

    Jim Thompson Guest

    Mike,

    How do you get the simulation data into ASCII format? (PSpice has a
    block to check for CSDF, but I couldn't find a similar setting in
    LTSpice.)

    ...Jim Thompson
     
  8. Jim,
    You export the data from the waveform viewer:
    (Active waveform window)=>File Export. You get
    a file of time, value pairs that can be used as
    the input for a source using the "PWL FILE=..."
    syntax. Except you have to remove the first line
    of this file which will look something like
    time V(n001)
    0.000000e+000 1.000000e+000
    1.012000e-006 1.200000e-002
    2.012000e-006 9.880000e-001
    3.012000e-006 1.200000e-002

    --Mike
     
  9. Jim Thompson

    Jim Thompson Guest

    OK. Found it. Thanks!

    Turns out that PSpice can export like that as well to a *.txt file.
    I'd just never used it... my usual way was to simply ctrl-C a waveform
    and paste into Excel.

    The reading-in of *.wav files is a super idea!

    ...Jim Thompson
     
  10. Fred Bartoli

    Fred Bartoli Guest

    Intusoft can do that too.

    Maybe it's time to do a simulator's sound contest: same amplifier design,
    different simulator. Which simulator sounds best?
     
  11. qrk

    qrk Guest

    On Mon, 26 Jun 2006 21:07:54 +0200, "Fred Bartoli"

    [snippage]
    Obviously, a computer using an Intel processor will sound better due
    to the thermal emission characteristics of the CPU!
     
  12. reaman4ever

    reaman4ever Guest

    Thanks
    Does anyone know how to get pspice to take sample points at exactly
    certain sample rate
     
  13. Jim Thompson

    Jim Thompson Guest

    On 29 Jun 2006 17:15:42 GMT,
    Depends on what you mean by "sample".

    If you use a .PRINT statement, you can specify the timestep for which
    data is recorded.

    This data will appear in the .OUT file

    ...Jim Thompson
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-