Well, I can see why the maths might make my formula:jademan wrote:When I tried sandwiching a 10s silence between two 10s tones, I got in your first case:Gale Andrews wrote: Imagine 10 seconds of silence in a 30 seconds track:
Settings of min 100, max 5000 give you:
compression 1: 5s
compression 2: 5s
compression 4: 2.5s
compression 10: 1s
Settings of min 2000, max 5000 give you:
compression 1: 6.888s
compression 2: 6.888s
compression 4: 5.416s
compression 10: 4.499s
Settings of min 2001, max 2001 give you:
compression 1: 3.889 seconds
Settings of min 1, max 2001 and min 1000, max 2001 both give you:
compression 1: 2.000 s
compression 4: 529 ms (why not 500)? ...
4.999s, 4.999s, 2.574, 1.089s
in the second case:
6.888s, 6.888s, 5.416s, 4.499s
In the third case:
3.889
and in the fourth case:
2.000s, 1.279s.
Min Silence: 1ms
Max Silence: <your required silence> + 1ms (so if you want 10ms, put 11ms here)
Silence compression: 1
produce the resultant silence you want for every silence, but how many cases in the quote above have you tried where the maths gives the expected result (and fundamentally, why do we get a resultant silence greater than the maximum)?
If I have that 30 seconds tone with a 1 seconds silence from 5s to 6s, and 10 seconds silence from 10s to 20s, then min silence 2000, max 4000 and compression 1, I might expect (ignoring maths) that the first silence will be left untruncated and the second will be 4 seconds long. The first silence is ignored and the second ends up at 5.888 seconds.
No, that's (possibly) for the Manual. But I think what is going on needs clarifying first.jademan wrote:Yes. This helps. So inputs that are shorter in length than min are ignored (left alone). And inputs that are longer than min are compressed but only by the extent that they exceed the minimum (ignore) length. And the output is not to exceed the maximum specified.Gale Andrews wrote: I'm not a mathematician, so I've asked Phil (the author) if he can drop by and comment on the above findings, in particular the 529/500 ms discrepancy in the last example above, and whether the unequal truncation is expected in the scenarios quoted. If it helps, Phil quotes the maths as follows:
(output) = ((min) + (input - min)/compression) with the constraint that output < max
However, since it is not intuitively obvious, don't you think this formula should be posted on the Truncate Silence Parameter screen ?
Probably not.jademan wrote: Perhaps also because the whole objective of this new algorithm is to compress the spaces, do you think the compression factor should be specified first, then the minimum and maximum?
I omitted one part of the initial information Phil gave, which was that "If the section starts out with silence, that silence will be truncated to the minimum value."jademan wrote:This leaves the question of why you get 529ms, I get 1.279s, and why our 30s and 45s DTMF tones silence periods don't match the formula. And there was another case (which is why i sandwiched) where a leading silence interval was unaltered altogether.
Gale