Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-18 Thread Theo Verelst
I don't recall the various chapters of Information Theory and practical digtial electronics or something about these kinds of power estimates, so I'm not putting this thread in some direction, except two small considerations. When the power of a signal is concerned, which in the continuous

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-17 Thread Martin Vicanek
>/ > well, pink is -3 dB/octave and red (a.k.a. brown) is -6 dB/octave. a / >/ > roll-off of -12// dB/octave would be very brown. -- r b-j / >/ Those values are for amplitudes - for a power spectrum the slopes double. / no sir. not with dB. this is why we use dB = 20 *

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-16 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Martin Vicanek" Date: Mon, November 16, 2015 3:50 pm To: music-dsp@music.columbia.edu

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-16 Thread Ethan Duni
>> [..] the autocorrelation is >> >> = (1/3)*(1-P)^|k| >> >> (I checked that with a little MC code before posting.) So the power >> spectrum is (1/3)/(1 + (1-P)z^-1) The FT of (1/3)*(1-P)^|k| is (1/3)*(1-Q^2)/(1-2Qcos(w) + Q^2), where Q = (1-P). Looks like you were thinking of the

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-16 Thread robert bristow-johnson
> Am 16.11.2015 20:00, schrieb Martin Vicanek: >> [..] the autocorrelation is >> >> = (1/3)*(1-P)^|k| >> >> (I checked that with a little MC code before posting.) So the power >> spectrum is (1/3)/(1 + (1-P)z^-1), i.e flat at DC and pink at higher >> frequencies. For

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-16 Thread Martin Vicanek
Am 16.11.2015 20:00, schrieb Martin Vicanek: [..] the autocorrelation is = (1/3)*(1-P)^|k| (I checked that with a little MC code before posting.) So the power spectrum is (1/3)/(1 + (1-P)z^-1), i.e flat at DC and pink at higher frequencies. For reasonably small P the corner

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-16 Thread Martin Vicanek
> well, pink is -3 dB/octave and red (a.k.a. brown) is -6 dB/octave. a roll-off of -12 > dB/octave would be very brown. -- r b-j Those values are for amplitudes - for a power spectrum the slopes double. ___ dupswapdrop: music-dsp mailing list

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-12 Thread Theo Verelst
Everywhere in the exact sciences there's the dualism between statistical analysis and deterministic engineering tools, since the major break through in quantum physics at the beginning of the 20th century. Whether that's some sort of diabolical duality or, as it actually is at the higher levels

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-11 Thread Ethan Duni
>there is nothing *motivating* us to define Rx[k] = E{x[n] x[n+k]} except that we >expect that expectation value (which is an average) to be the same as the other definition Sure there is. That definition gets you everything you need to work out a whole list of major results (for example, optimal

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-11 Thread Ethan Duni
>no. we need ergodicity to take a definition of autocorrelation, which we are all familiar with: > Rx[k] = lim_{N->inf} 1/(2N+1) sum_{n=-N}^{+N} x[n] x[n+k] >and turn that into a probabilistic expression > Rx[k] = E{ x[n] x[n-k] } >which we can figger out with the joint p.d.f. That's one

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-11 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ethan Duni" Date: Wed, November 11, 2015 7:36 pm To: "robert bristow-johnson"

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-11 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ethan Duni" Date: Wed, November 11, 2015 5:57 pm To: "robert bristow-johnson"

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-11 Thread Ethan Duni
>all ergodic processes are stationary. (not necessarily the other way around.) Ah, right, there is no constant mean for a time average to converge to if the process isn't stationary in the first place. Been a while since I worried about the details of ergodicity, mostly I have the intuitive

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-10 Thread Theo Verelst
In the course of these discussions, let's not forget the difference between a convolution with 1/(Pi*t) (a Hilbert transform kernel) and the inversion of the transfer function of a linear system. T. ___ dupswapdrop: music-dsp mailing list

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-10 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ethan Duni" Date: Tue, November 10, 2015 8:58 pm To: "A discussion list for music-related DSP"

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-10 Thread Ethan Duni
>(Semi-)stationarity, I'd say. Ergodicity is a weaker condition, true, >but it doesn't then really capture how your usual L^2 correlative >measures truly work. I think we need both conditions, no? >Something like that, yes, except that you have to factor in aliasing. What aliasing? Isn't this

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-10 Thread Sampo Syreeni
On 2015-11-04, robert bristow-johnson wrote: it is the correct way to characterize the spectra of random signals. the spectra (PSD) is the Fourier Transform of autocorrelation and is scaled as magnitude-squared. The normal way to derive the spectrum of S/H-noise goes a bit around these

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-09 Thread Dan Stowell
Hi Ross, Just spotted this. I don't have an answer for you, but a possible helpful literature connection...? The system you describe is a simple Markov model. It's ergodic and time-homogeneous and reversible, and has no hidden state, so I'd guess that there must be results from the Markov model

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-06 Thread Vadim Zavalishin
On 06-Nov-15 11:03, Vadim Zavalishin wrote: Apologies if this question has already been answered, I didn't read the entire thread, just wanted to share the following idea off the top of my head FWIW. Oops, nevermind, I didn't realize that the SnH period is also random in the original

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-06 Thread Vadim Zavalishin
Okay, an updated idea. Represent the signal as a sum of time-shifted box functions of random amplitudes and durations. We assume that the sum is finite and then we can take the limit (if the values approach the infinity as the result, we can normalize them according to the length of the

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Ethan Fenn
> > What is the method that you used to go from ac[k] to psd[w]? Robert > mentioned that psd was the Fourier transform of ac. Is this particular case > a standard transform that you knew off the top of your head? Yes, this is the Fourier transform of P^|k| (following Ethan D's notation). To

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Ross Bencina
Thanks Ethan(s), I was able to follow your derivation. A few questions: On 4/11/2015 7:07 PM, Ethan Duni wrote: It's pretty straightforward to derive the autocorrelation and psd for this one. Let me restate it with some convenient notation. Let's say there are a parameter P in (0,1) and 3

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Ethan Fenn
> > Let's see if I got this right: each bin contains the power for a frequency > interval of 2pi/N radians. If I multiply each bin's power by N/2pi I should > get power values in units of power/radian. > Sounds reasonable to me, but I'm not sure I've got it right so who knows! I think I was

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Ethan Fenn
Yes, thank you! I guess most of the places I typed the word power I really meant energy... units are hard... -Ethan On Thu, Nov 5, 2015 at 7:33 PM, Ethan Duni wrote: > >since the whole signal has infinite power, the units really > >need to be power per unit frequency per

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Ethan Duni
>So for y[n] ~U(-1,1) I should multiply psd[w] by what exactly? The variance of y[n]. For U(-1,1) this is 1/3. From your subsequent post it sounds like you got this ironed out? >What is the method that you used to go from ac[k] to psd[w]? >Robert mentioned that psd was the Fourier transform of

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Ethan Duni
>since the whole signal has infinite power, the units really >need to be power per unit frequency per unit time, which >(confusingly) is the same thing as power. I think you mean to say "infinite energy" and then "energy per unit frequency per unit time," no? E On Thu, Nov 5, 2015 at 8:21 AM,

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread Sampo Syreeni
On 2015-11-05, robert bristow-johnson wrote: I think I was slightly off when I said that the units of psd are power per unit frequency -- since the whole signal has infinite power, no, i don't think so. Me neither. Power is already by definition energy per unit time. Even if an infinitely

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-05 Thread robert bristow-johnson
> I think I was slightly off when I said that the units of psd are power per > unit frequency -- since the whole signal has infinite power, � no, i don't think so. � > the units�really need to be power per unit frequency per unit time, which > (confusingly) is the same thing as power. � the

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-04 Thread Theo Verelst
Ross Bencina wrote: Hi Everyone, Suppose that I generate a time series x[n] as follows: >>> P is a constant value between 0 and 1 At each time step n (n is an integer): r[n] = uniform_random(0, 1) x[n] = (r[n] <= P) ? uniform_random(-1, 1) : x[n-1] Where "(a) ? b : c" is the C ternary

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-04 Thread Ethan Duni
It's pretty straightforward to derive the autocorrelation and psd for this one. Let me restate it with some convenient notation. Let's say there are a parameter P in (0,1) and 3 random processes: r[n] i.i.d. ~U(0,1) y[n] i.i.d. ~(some distribution with at least first and second moments finite)

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-04 Thread Ethan Duni
Yep that's the same approach I just posted :] E On Tue, Nov 3, 2015 at 11:48 PM, Ethan Fenn wrote: > How about this: > > For a lag of t, the probability that no new samples have been accepted is > (1-P)^|t|. > > So the autocorrelation should be: > > AF(t) =

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread Ethan Duni
Wait, just realized I wrote that last part backwards. It should be: So in broad strokes, what you should see is a lowpass spectrum parameterized by P - for P very small, you approach a DC spectrum, and for P close to 1 you approach a spectrum that's flat. On Tue, Nov 3, 2015 at 10:26 AM, Ethan

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread Ethan Duni
Do you mean the literal Fourier spectrum of some realization of this process, or the power spectral density? I don't think you're going to get a closed-form expression for the former (it has a random component). For the latter what you need to do is work out an expression for the autocorrelation

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread robert bristow-johnson
� i have to confess that this is hard and i don't have a concrete solution for you. �it seems to me that, by this description: � r[n] = uniform_random(0, 1) if (r[n] <= P) � �x[n] =�uniform_random(-1, 1); else �x[n] = x[n-1]; � from that, and from the assumption of ergodicity (where all time

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread Ross Bencina
On 4/11/2015 9:39 AM, robert bristow-johnson wrote: i have to confess that this is hard and i don't have a concrete solution for you. Knowing that this isn't well known helps. I have an idea (see below). It might be wrong. it seems to me that, by this description: r[n] =

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread Ross Bencina
On 4/11/2015 5:26 AM, Ethan Duni wrote: Do you mean the literal Fourier spectrum of some realization of this process, or the power spectral density? I don't think you're going to get a closed-form expression for the former (it has a random component). I am interested in the long-term magnitude

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina" Date: Tue, November 3, 2015 11:51 pm To: music-dsp@music.columbia.edu

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina" Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina" Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina" Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] how to derive spectrum of random sample-and-hold noise? From: "Ross Bencina" Date: Wed, November 4, 2015 12:22 am To: r...@audioimagination.com

Re: [music-dsp] how to derive spectrum of random sample-and-hold noise?

2015-11-03 Thread Ethan Fenn
How about this: For a lag of t, the probability that no new samples have been accepted is (1-P)^|t|. So the autocorrelation should be: AF(t) = E[x(n)x(n+t)] = (1-P)^|t| * E[x(n)^2] + (1 - (1-P)^|t|)*E[x(n)*x_new] The second term covers the case that a new sample has popped up, so x(n) and