[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Speaker SPICE modeling with gschem and ng-spice/gnucap
On Mon, Sep 12, 2011 at 2:39 PM, John Doty <jpd@xxxxxxxxx> wrote:
>
> On Sep 12, 2011, at 3:09 PM, Hannu Vuolasaho wrote:
>
>> I have been playing with one guitar amplifier project for a while and so far the amplifier design has been more or less copy and paste and simulate and guess from graphs. However I bumped in net this blog post
>>
>> http://nordicnerd.blogspot.com/2011/08/active-speakers-spice-with-actual-audio.html
>>
>> Is it possible to do same thing? Input wav to simulator and get speaker's output and hear it? I know it's not perfect but it could be very helpful. Has someone done this before and provide some hints, examples or links?
>
> Shouldn't be too hard. ngspice seems to have no limit to the length of a PWL spec. Put the audio in some simple form (like raw binary samples), write a tiny program to convert to PWL. Generate output with .PRINT, write another tiny program to convert to binary samples.
>
Here's the spice raw reader that jpd and Hannu are both missing out on:
http://www.h-renrew.de/h/python_spice/spicedata.html
Even outputs to hdf5: http://www.hdfgroup.org/HDF5/
You'd probably be able to glue together the spice raw reader and this
fairly quickly to get wav output from ngspice:
http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/audiolab/
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user