Maker Pro
Maker Pro

Music to Ppice

R

reaman4ever

Jan 1, 1970
0
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
 
J

Joel Kolstad

Jan 1, 1970
0
reaman4ever said:
How do I convert a music file into something pspice can use? I figured
out that I can use the VPWL_FILE if I have a .txt with a time and
voltage column, but how do I create that .txt file?

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

Mike Engelhardt

Jan 1, 1970
0
reaman4ever,
How do I convert a music file into something
pspice can use? I figured out that I can use
the VPWL_FILE if I have a .txt with a time and
voltage column, but how do I create that .txt file?
How do I convert a music file into something pspice
can use? I figured out that I can use the VPWL_FILE
if I have a .txt with a time and voltage column, but
how do I create that .txt file?

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
 
R

reaman4ever

Jan 1, 1970
0
[/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
 
J

Jim Thompson

Jan 1, 1970
0
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

Mike,

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

...Jim Thompson
 
M

Mike Engelhardt

Jan 1, 1970
0
Jim,
Will it create a PWL file, or is it internal
use only?

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
 
J

Jim Thompson

Jan 1, 1970
0
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

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
 
M

Mike Engelhardt

Jan 1, 1970
0
Jim,
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.)

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
 
J

Jim Thompson

Jan 1, 1970
0
Jim,
[snip]

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

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
 
F

Fred Bartoli

Jan 1, 1970
0
Jim Thompson said:
Jim,
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}

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

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

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!

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?
 
Q

qrk

Jan 1, 1970
0
On Mon, 26 Jun 2006 21:07:54 +0200, "Fred Bartoli"

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

Obviously, a computer using an Intel processor will sound better due
to the thermal emission characteristics of the CPU!
 
R

reaman4ever

Jan 1, 1970
0
Thanks
Does anyone know how to get pspice to take sample points at exactly
certain sample rate
 
J

Jim Thompson

Jan 1, 1970
0
On 29 Jun 2006 17:15:42 GMT,
Thanks
Does anyone know how to get pspice to take sample points at exactly a
certain sample rate?

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
 
Top