Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] BW limited peak computation?

From: "Ross Bencina" 

Date: Tue, July 26, 2016 6:21 pm

To: music-dsp@music.columbia.edu

--



> On 27/07/2016 7:09 AM, Sampo Syreeni wrote:

>> Now, what I wonder is, could you still somehow pinpoint the temporal

>> location of an extremum between sampling instants, by baseband logic?

>> Because I don't think there can be more than one between any two

>> adjacent sampling times.

>

> Presumably the certainty of such an estimate would depend on how many

> baseband time samples you considered. Sinc decays as 1/x so that gives

> you some idea of the potential influence of distant values -- not sure

> exactly how that maps into distant sample's influence on peak location

> though.

>
for normal bandlimited interpolation, i don't think you need to go more than 
+16 and -15 samples from the interpolated region (which is between 0 and 1) and 
i don't think you'll need to have more than 16 or 32 phases. �and i think you 
can decently apply quadratic interpolation
between those 1/16th or 1/32nd sample values and you'll have, for all 
quantitative purposes, a very good interpolation of the peak.
dunno what exactly is meant by "baseband logic".

--
�


r b-j � � � � � � � � � � �r...@audioimagination.com
�


"Imagination is more important than knowledge."
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread Ross Bencina

On 27/07/2016 7:09 AM, Sampo Syreeni wrote:

Now, what I wonder is, could you still somehow pinpoint the temporal
location of an extremum between sampling instants, by baseband logic?
Because I don't think there can be more than one between any two
adjacent sampling times.


Presumably the certainty of such an estimate would depend on how many 
baseband time samples you considered. Sinc decays as 1/x so that gives 
you some idea of the potential influence of distant values -- not sure 
exactly how that maps into distant sample's influence on peak location 
though.


Ross.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread Sampo Syreeni

On 2016-07-26, Stefan Stenzel wrote:

the acid test is when the pre-upsampled data is alternating signs on 
a large amplitude with *one* sample missing.  like:


 ... -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, 
+A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, ...

you might get an unnaturally large peak (many times bigger than |A|) 
with that.


Should be something like the sum of all 2A/(pi*(t+0.5)) for t an 
integer going from zero to infinity. Not sure if that converges.


It doesn't. Intuitively speaking, after some heady limit arguments, a 
pure ...,+1, -1, +1,-1,... train decodes as a sinusoid at the Nyquist 
frequency. It does so because of phase cancellation between the various, 
in-phase but at least double in period sinusoids which go into the 
Nyquist-Shannon reconstruction.


What this particular sequence does is, it sums two one-sided alternating 
sequences together, too. But it does it so that it leaves out a single 
sample at the origin, and by doing so, pushes those otherwise nicely 
cancelling, marginal cosines from the various sinc(x) functions into 
phase between two sampling times. Obviously what you get then is not 
convergence, but very fast divergence. All within the band-limited 
interpolation theorem, which in the limit only applies in general 
strictly below the Nyquist frequency. (This stuff for once doesn't 
converge even in the weak, distribution sense.)


Now, what I wonder is, could you still somehow pinpoint the temporal 
location of an extremum between sampling instants, by baseband logic? 
Because I don't think there can be more than one between any two 
adjacent sampling times. And if you can pinpoint its location, then I 
believe you could derive an iterative algorithm relying on higher and 
higher, recursively computed interpolation formulae which could drive 
the uncertainty in its location as low as necessary. On the fly. 
Irrespective of what the real *amplitude* of the thing really is.


If you could do that, I think you could then put upper bounds on both 
the L^1 and L^2 norms of the deviation above full range, between the 
sampling instants, in closed form. And once you'd done that, I think you 
could pretty much tame any sonically/musically relevant problem 
happening "between the samples", as well: just take note of where the 
peak seems to be for phase stuff, and then take note of how rapidly your 
interpolands grow, for an approximation of what you should do wrt

amplitude.
--
Sampo Syreeni, aka decoy - de...@iki.fi, http://decoy.iki.fi/front
+358-40-3255353, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] confirm 43faf083a74f8908a6a586c833cb878b

2016-07-26 Thread robert bristow-johnson



�
that friendly anonymous someone is, again, displeased with a post of mine and 
would like me to shut up.




 Original Message 

Subject: confirm 43faf083a74f8908a6a586c833cb878b

From: music-dsp-requ...@music.columbia.edu

Date: Tue, July 26, 2016 3:58 pm

To: r...@audioimagination.com

--



> Mailing list removal confirmation notice for mailing list music-dsp

>

> We have received a request for the removal of your email address,

> "r...@audioimagination.com" from the music-dsp@music.columbia.edu

> mailing list. To confirm that you want to be removed from this

> mailing list, simply reply to this message, keeping the Subject:

> header intact. Or visit this web page:

>

> https://lists.columbia.edu/mailman/confirm/music-dsp/43faf083a74f8908a6a586c833cb878b

>

>

> Or include the following line -- and only the following line -- in a

> message to music-dsp-requ...@music.columbia.edu:

>

> confirm 43faf083a74f8908a6a586c833cb878b

>

> Note that simply sending a `reply' to this message should work from

> most mail readers, since that usually leaves the Subject: line in the

> right form (additional "Re:" text in the Subject: is okay).

>

> If you do not wish to be removed from this list, please simply

> disregard this message. If you think you are being maliciously

> removed from the list, or have any other questions, send them to

> music-dsp-ow...@music.columbia.edu.

>

>





--
r b-j � � � � � � � � � � �r...@audioimagination.com
"Imagination is more important than knowledge."
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] BW limited peak computation?

From: "Stefan Stenzel" 

Date: Tue, July 26, 2016 3:28 pm

To: r...@audioimagination.com

music-dsp@music.columbia.edu

--



>

>> On 26 Jul 2016, at 19:37 , robert bristow-johnson 
>>  wrote:

>> []

>> the acid test is when the pre-upsampled data is alternating signs on a large 
>> amplitude with *one* sample missing. like:

>>

>> ... -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, 
>> +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, ...

>>

>> you might get an unnaturally large peak (many times bigger than |A|) with 
>> that.

>

> Should be something like the sum of all 2A/(pi*(t+0.5)) for t an integer 
> going from zero to infinity.

> Not sure if that converges.
Stefan, we both know that
�
� �+inf
� �SUM{ �(1/n)^p �}
� �n=0

�
doesn't converge until p gets larger than 1. �(according to Calvin and Hobbes, 
instead of the "Big Bang", it's the "Horrendous Space Kablooey".)
�
so the gooder your band-limited interpolation is done, the nastier that 
bandlimited
"singularity" (lacking for a better term, maybe "anomaly") gets.
but since the summation is finite, you always get a number, but it might be a 
lot bigger than the ostensible amplitude of the signal.

--
r b-j � � � � � � � � � � �r...@audioimagination.com
"Imagination is more important than knowledge."
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread Stefan Stenzel

> On 26 Jul 2016, at 19:37 , robert bristow-johnson  
> wrote:
> []
> the acid test is when the pre-upsampled data is alternating signs on a large 
> amplitude with *one* sample missing.  like:
> 
>  ... -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, 
> +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, -A, +A, ...
> 
> you might get an unnaturally large peak (many times bigger than |A|) with 
> that.

Should be something like the sum of all 2A/(pi*(t+0.5)) for t an integer going 
from zero to infinity. 
Not sure if that converges.


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] BW limited peak computation?

From: "Stefan Stenzel" 

Date: Tue, July 26, 2016 12:08 pm

To: music-dsp@music.columbia.edu

--



>

> It all depends what you consider a peak. Imagine a single sample of one, 
> surrounded by nothing but zeros left and right, upsampling this signal would 
> bring up many peaks that you might not be interested in.

>
�
my guess would also be upsampling by some factor (say 8 or 16) and picking out 
the maximum values (and then maybe quadratic interpolation around the discrete 
but upsampled peak).
the upsampling would likely be the ol' polyphase interpolation thing that is 
common.
�maybe 16 or 32 samples in the summation at most
the acid test is when the pre-upsampled data is alternating signs on a large 
amplitude with *one* sample missing. �like:
�...�-A, +A,�-A, +A, -A, +A,�-A, +A,�-A, +A,�-A, +A,�-A, +A,�-A,
+A,�-A, +A, +A, -A, +A,�-A, +A,�-A, +A,�-A, +A,�-A, +A,�-A, +A,�-A, +A,�-A, +A, 
...
you might get an unnaturally large peak (many times bigger than |A|) with that.

--
r b-j � � � � � � � � � � �r...@audioimagination.com
"Imagination is more important than knowledge."
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] BW limited peak computation?

2016-07-26 Thread Stefan Stenzel
Paul,

It all depends what you consider a peak. Imagine a single sample of one, 
surrounded by nothing but zeros left and right, upsampling this signal would 
bring up many peaks that you might not be interested in.

For practical purposes I suggest you start with the simple approach to search 
for a sample with neighbours smaller in magnitude, refine the fractional 
position of the peak and then evaluate the peak value at this position. A 
simple quadratic function and its derivative for this:

suppose a,b,c are successive samples and b having maximum magnitude:

fraction(a,b,c)  = (a-c)/(2a-4b+2c)
value(a,b,c,fraction) = ((a-2b+c)fraction^2 + (c-a)fraction + 2b)/2

This would work well with the data in your graphs.

Stefan

> On 25 Jul 2016, at 23:00 , Paul Stoffregen  wrote:
> 
> Does anyone have any suggestions or references for an efficient algorithm to 
> find the peak of a bandwidth limited signal?
> 
> If I just look only at the numerical values of the samples (yeah, that's what 
> I've been doing), when a signal is close to an integer division of Fs, even 
> collecting data over many cycles tends to miss the phases of the waveform 
> containing the peaks.  For example:
> 
> 
> Image also available here: 
> https://forum.pjrc.com/threads/35478-Problems-Plotting-Filter-Response?p=110442&viewfull=1#post110442
> 
> The only solution I'm imagining would involve expensive upsampling and 
> filtering.  Even then, if I multiply the sample rate by 16 or more and the 
> filter is good enough, I still might not get a sample right at the peak.
> 
> Is there a better way?
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp

___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp