[PD-dev] signal object test template for automated unit testing

Hans-Christoph Steiner hans at at.or.at
Tue Oct 25 19:04:30 CEST 2011


On Oct 25, 2011, at 10:23 AM, Roman Haefeli wrote:

> On Mon, 2011-10-24 at 22:11 +0200, katja wrote:
>> Hans, thanks for your comments
>>
>> On Mon, Oct 24, 2011 at 7:35 PM, Hans-Christoph Steiner <hans at at.or.at 
>> > wrote:
>>>
>>> That looks really good on many levels. :)  I like the layout, I  
>>> hadn't
>>> thought of standard deviation, that makes sense as long as we can  
>>> specify
>>> "exact" as a possibility.  My guess is that some of this stuff  
>>> should
>>> produce the same bit sequence every time, but I could be wrong  
>>> there.
>>
>> If you specify tolerance zero, that's exact. But we found that
>> tolerance is needed for different reasons:
>>
>> - floats are stored as text by Pd, and differences between computed
>> and stored values occur because of the truncated stored floats
>
> Wouldn't it make more sense to load the reference table from some  
> binary
> format (like WAV file) instead of some textual (lossy)  
> representation in
> order not to lose any precision?
>
> Both, [writesf~] and [soundfiler], support WAV files with 32-float bit
> resolution (according to their help patches).


That's a good idea, plus it should be easier to manage a .wav file for  
the reference rather than having it stored in an array in a Pd patch.   
That should make it possible to have 32-bit float tests that are bit- 
accurate. I guess we'll still need a standard deviation for when  
loading 32-bit floats into 64-bit double Pd.

.hc

----------------------------------------------------------------------------

Looking at things from a more basic level, you can come up with a more  
direct solution... It may sound small in theory, but it in practice,  
it can change entire economies.     - Amy Smith





More information about the Pd-dev mailing list