FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Electronix » cad
Music to Ppice
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
Author Message
reaman4ever
electronics forum beginner


Joined: 16 Jun 2006
Posts: 3

PostPosted: Fri Jun 16, 2006 3:00 pm    Post subject: Music to Ppice
Subject description: How do I convert a music file into something pspice can use?
Reply with quote

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?
Thanks
Back to top
Joel Kolstad
electronics forum Guru


Joined: 03 May 2005
Posts: 695

PostPosted: Fri Jun 23, 2006 1:40 am    Post subject: Re: Music to Ppice Reply with quote

"reaman4ever" <agielchinsky@gmail-dot-com.no-spam.invalid> wrote in message
news:449b2ce2$0$14810$892e7fe2@authen.yellow.readfreenews.net...
Quote:
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.
Back to top
Mike Engelhardt
electronics forum addict


Joined: 14 May 2005
Posts: 61

PostPosted: Fri Jun 23, 2006 1:57 am    Post subject: Re: Music to Ppice Reply with quote

reaman4ever,

Quote:
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
Back to top
reaman4ever
electronics forum beginner


Joined: 16 Jun 2006
Posts: 3

PostPosted: Fri Jun 23, 2006 4:39 pm    Post subject: Re: Music to Ppice Reply with quote

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

Yes I do, How do I do that?
Thank you
Back to top
Jim Thompson
electronics forum Guru


Joined: 06 May 2005
Posts: 5440

PostPosted: Fri Jun 23, 2006 5:24 pm    Post subject: Re: Music to Ppice Reply with quote

On Fri, 23 Jun 2006 01:57:17 GMT, "Mike Engelhardt" <nospam@spam.org>
wrote:

Quote:
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


Mike,

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

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
Mike Engelhardt
electronics forum addict


Joined: 14 May 2005
Posts: 61

PostPosted: Fri Jun 23, 2006 8:13 pm    Post subject: Re: Music to Ppice Reply with quote

Jim,

Quote:
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?

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
Back to top
Jim Thompson
electronics forum Guru


Joined: 06 May 2005
Posts: 5440

PostPosted: Fri Jun 23, 2006 9:27 pm    Post subject: Re: Music to Ppice Reply with quote

On Fri, 23 Jun 2006 20:13:36 GMT, "Mike Engelhardt" <nospam@spam.org>
wrote:

Quote:
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?

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
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
Mike Engelhardt
electronics forum addict


Joined: 14 May 2005
Posts: 61

PostPosted: Sat Jun 24, 2006 4:07 am    Post subject: Re: Music to Ppice Reply with quote

Jim,

Quote:
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?

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.

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
Back to top
Jim Thompson
electronics forum Guru


Joined: 06 May 2005
Posts: 5440

PostPosted: Sat Jun 24, 2006 3:43 pm    Post subject: Re: Music to Ppice Reply with quote

On Sat, 24 Jun 2006 04:07:56 GMT, "Mike Engelhardt" <nospam@spam.org>
wrote:

Quote:
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!

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
Fred Bartoli
electronics forum Guru


Joined: 02 May 2005
Posts: 457

PostPosted: Mon Jun 26, 2006 7:07 pm    Post subject: Re: Music to Ppice Reply with quote

"Jim Thompson" <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> a écrit dans
le message de news:c0nq921n9248s9nudk95pb8uil1tgc8k9a@4ax.com...
Quote:
On Sat, 24 Jun 2006 04:07:56 GMT, "Mike Engelhardt" <nospam@spam.org
wrote:

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?


--
Thanks,
Fred.
Back to top
qrk
electronics forum Guru Wannabe


Joined: 07 May 2005
Posts: 167

PostPosted: Thu Jun 29, 2006 2:44 am    Post subject: Re: Music to Ppice Reply with quote

On Mon, 26 Jun 2006 21:07:54 +0200, "Fred Bartoli"
<fred._canxxxel_this_bartoli@RemoveThatAlso_free.fr_AndThisToo> wrote:

[snippage]
Quote:

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!
Back to top
reaman4ever
electronics forum beginner


Joined: 16 Jun 2006
Posts: 3

PostPosted: Thu Jun 29, 2006 5:00 pm    Post subject: re:Music to Ppice Reply with quote

Thanks
Does anyone know how to get pspice to take sample points at exactly a certain sample rate?
Back to top
Jim Thompson
electronics forum Guru


Joined: 06 May 2005
Posts: 5440

PostPosted: Thu Jun 29, 2006 5:19 pm    Post subject: Re: Music to Ppice Reply with quote

On 29 Jun 2006 17:15:42 GMT,
agielchinsky@gmail-dot-com.no-spam.invalid (reaman4ever) wrote:

Quote:
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
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
The time now is Tue Jun 27, 2017 7:07 am | All times are GMT
Forum index » Electronix » cad
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Music Student in Need of Help bg_ie@yahoo.com design 12 Sun Jul 02, 2006 11:44 pm
No new posts Electret and loud music Bruce W.1 components 10 Thu May 04, 2006 12:34 pm
No new posts music , marketing , education forums nonstopeme.com Misc 0 Sun Apr 23, 2006 6:40 am
No new posts music , marketing , education forums nonstopeme.com Basics 0 Sun Apr 23, 2006 6:40 am
No new posts music , marketing , education forums nonstopeme.com Basics 0 Sun Apr 23, 2006 6:40 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums |  Medicine forum |  Science forum  |  Send and track newsletters


Powered by phpBB © 2001, 2005 phpBB Group