Pieter Palmers wrote:
> Robin Gareus wrote:
>> Erik de Castro Lopo wrote:
>>> Robin Gareus wrote:
>>>
>>> When Spice loads the libsndfile component, can the component find out
>>> the inter-sample period used by Spice?
>>
>> no. Spice does not use a constant interval; else it would be straight
>> forward to use libsamplerate.
>>
>>> If the above is not possible, I suggest that you up sample the audio
>>> by say 128 times and then linearly interpolate to get whatever inter
>>> sample values you need.
>>
>> sounds like a great idea.
>>
>> I should do that with the output too, but it's a little more complex
>> there: In the beginning I've tried to take the average for all the
>> "spice"-samples matching the corresponding audio-sample. I've only tried
>> that up to 1/(4*Fsample) and it gave much worse results than just taking
>> the closest sample... - combining interpolation and resampling could be
>> the solution.
>>
>> now that I've got the framework, I'll dig into the details..
>
> Since you're patching ngspice anyway, maybe introducing a fixed-timestep
> behavior into ngspice is easier? IMHO it's the 'correct' solution (cfr
> other mails).
I have not dug that deep into ngSpice - but from what I've gathered
every instance can modify the time-step depending on different
conditions for each element during the simulation. - That would be a
reason to implement the audio-sink as element (or model) rather than
'print' command..
ngSpice too interpolates points during a transient analysis, and a 1st
order might be the best one can get anyway.
gnucap might have been the better choice. - When I started, I thought
it'd be a nice /afternoon/ project to fire up SPICE. yawn. - I'll try
upsampling and interpolating input-samples and the reverse on the output
- but else I'm heading back to the drawing board.. and other endeavors.
more later, gotta run now.
robin
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Fri Jun 1 20:15:04 2007
This archive was generated by hypermail 2.1.8 : Fri Jun 01 2007 - 20:15:04 EEST