Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Everything Else Anything related to audio / video / electronics etc) BUT remember- we have many new forums where your thread may now fit! .... Parts, Equipment & Tools, Construction Tips, Software Tools......

SwitcherCAD .wav file I/O
SwitcherCAD .wav file I/O
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 1st March 2005, 09:58 PM   #1
I_Forgot is offline I_Forgot  United States
diyAudio Member
I_Forgot's Avatar
Join Date: Jan 2005
Location: Phoenix, Az.
Default SwitcherCAD .wav file I/O

One of the more interesting and educational features of SwitcherCAD is .wav file input and output. You can use a standard .wav file ripped from a CD as input to a circuit, then have the circuit output another .wav file. You can use this to try out filters, equalizers, crossovers, generate test signals (that you burn to CD), and etc.

I have attached a schematic of a demo circuit that shows how to use .wav I/O.

This is a simple inverted stereo crossfeed circuit. All you need to do is provide a stereo .wav file named input.wav in the d:\temp directory (or just edit the text on the schematic page to point at any file you want in whatever directory it is in). The output file will be called output.wav- you can edit the name and directory for that as well.

I used a 10MB .wav for input and got a 10 MB .wav for output (duh!). The simulator generates a data file with .raw extension in the same directory as the schematic file (.asc). The .raw file in this case was about 300MB, so be sure you do this on a HDD with lots of space. It takes 1600 seconds to complete the 59 second simulation on my PC. shutting off the "marching waveforms" will reduce that to about 1400 seconds.

The .tran statement sets the time the simulation will run (in real seconds of audio). In this case I have it set for 59 seconds. You can adjust that as required by the length of time you want it to run up to the length (in seconds) of your input file.

Have fun!

  Reply With Quote
Old 1st March 2005, 10:06 PM   #2
I_Forgot is offline I_Forgot  United States
diyAudio Member
I_Forgot's Avatar
Join Date: Jan 2005
Location: Phoenix, Az.
Default Here is the file

Here it is...
Attached Files
File Type: zip wavtest.zip (1.4 KB, 35 views)
  Reply With Quote
Old 18th May 2006, 12:23 PM   #3
oca is offline oca  Switzerland
diyAudio Member
Join Date: May 2006
I'm looking for that for a while now ! fantatstic !
  Reply With Quote
Old 18th May 2006, 08:47 PM   #4
Tom2 is offline Tom2  United States
diyAudio Member
Join Date: Jun 2004
Location: Central CA

Try using the .save spice directive to reduce the size
of the data in the .raw file. (The big multi-megabit file you mentioned)

For example in your wavetest.asc file, add the
spice directive .save V(LEFT).

This saves only the V(LEFT) data in the .raw file.
This does not effect the saving of the left and right data in the wave file.

I've used the Ltspice wave command to make my own tones
and other sound effects. Then I burn them to a CD and then I can play
them on a hifi.

The most interesting thing I did was make my own burn in CD.
I modified the Lorenz Attractor file I got from the LTspice users
group on Yahoo to create my own chaos sound cd. It might be considered
kind of snake-oil, but it did not cost me anything.

  Reply With Quote
Old 19th May 2006, 02:04 PM   #5
I_Forgot is offline I_Forgot  United States
diyAudio Member
I_Forgot's Avatar
Join Date: Jan 2005
Location: Phoenix, Az.
I had not noticed that command. That should reduce the size considerably, especially with a complex circuit. Thanks for the heads-up!

  Reply With Quote


SwitcherCAD .wav file I/OHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.slb file (translated library file)...! spice freak Solid State 0 28th October 2008 04:20 PM
File Uploader - php script with file validation lineup The Lounge 5 11th February 2007 10:09 AM
SwitcherCAD richie00boy Everything Else 4 24th September 2006 10:00 AM
Switchercad symbols Bas Horneman Tubes / Valves 10 24th July 2004 04:54 AM
Strange Switchercad behavior capslock Solid State 2 17th April 2003 02:07 AM

New To Site? Need Help?

All times are GMT. The time now is 08:04 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.79%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio