Re: [LAD] simulating analog audio devices

From: Erik de Castro Lopo <mle+la@email-addr-hidden-nerd.com>
Date: Fri Jun 01 2007 - 13:03:08 EEST

Robin Gareus wrote:

> hehe, right. ATM i don't interpolate at all.
> The input just stays for the duration of the sample.

Thats called zero order hold:

    http://en.wikipedia.org/wiki/Zero_Order_Hold

and is a really crappy sound sample rate converter. Signal to noise
ratio is about 10dB.

> Can I feed the rabbit at irregular intervals: ie. specify time and sample?

No, not really.

When Spice loads the libsndfile component, can the component find out
the inter-sample period used by Spice? If so, the best solution would
be to use the Rabbit to up sample to that inter-sample period.

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.

> So far I've only found the command to set the *maximum* time-step, not
> an option to enforce it. - setting it to 1/Fsample is ok. setting it to
> 0.25/Fsample and using only about every 4th value gives much better
> results.. using 0.01/Fsample makes me fetch a few more coffees;

I suspect that using 0.01/Fsample will give you a result much closer
to the real device. I suspect that what you get at 1/Fsample produces
results that may not match reality.

Erik

-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Islam makes it incumbent on all adult males, provided they are not disabled
or incapacitated, to prepare themselves for the conquest of countries so that
the writ of Islam is obeyed in every country in the world."
-- Ayatollah Khomeini
_______________________________________________
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 16:15:02 2007

This archive was generated by hypermail 2.1.8 : Fri Jun 01 2007 - 16:15:02 EEST