Electronics WorkBench Idea

Harvey Devoe Thornburg harv23 at leland.Stanford.EDU
Sun Nov 15 20:27:07 CET 1998


> 
> I've been mucking around with the circuit simulation program 
> Electronics Work Bench for a while now, mainly for uni stuff,
> but i have tried out a few filter designs and ring modulator
> things. 
> 
> The really cool thing is that you can view the waveforms on the 
> virtual oscilliscopem, and even save the information as a sersies
> of numbers.
> 
> What i was wondering is if i could somehow convert the saved
> file to a wav file so i can actually hear what my designs sound like.
> If i could, it would mean i can preview everything i do virually, before
> anything is even built!
> 
> Perhaps Matlab could be used? Anyone have any ideas?
> 

Very easy to do in Matlab.  Save the numbers in a simple 
format separated by whitespace, stripping headers if necessary.
Let's say this file is called waveform, then you start up Matlab
and type "load waveform".  Now you have an array called waveform.
Check to see if the values are floating point between -1 and 1; if not,
normalize by "waveform = waveform/max(waveform)". Use the command 
"wavwrite" to output a .WAV format file, as in "wavwrite(waveform,
<sampling rate>, 'waveform.wav')".

Good luck,
--Harvey




More information about the Synth-diy mailing list