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

2016-07-25 Thread Wen Xue
I suggest the cubic spline interpolator. It expresses the underlying function as piecewise trinomial so that the maxima/minima can be computed by solving binomial equations. It is also known to be close to the ideal sync interpolation alias-wise. Xue From: Paul

Re: [music-dsp] efficient running max algorithm

2016-07-21 Thread Wen Xue
The trick is to count the total number of operations, not for each incoming sample as the window moves. The algorithm maintains a buffer that pushes at the back and pops at both front and back. Each sample is pushed onto the buffer and popped out of it exactly once. If R samples are popped

Re: [music-dsp] Does a neutral wire exist

2014-04-08 Thread Wen Xue
Just copy an mp3 file from one drive to another and there you have this perfectly neutral wire. Don't use itunes though. -Original Message- From: Theo Verelst Sent: Wednesday, April 09, 2014 6:44 AM To: A discussion list for music-related DSP Subject: [music-dsp] Does a neutral wire

Re: [music-dsp] family of soft clipping functions.

2013-11-02 Thread Wen Xue
But, soft-clipping is not going to change periodicity, is it? So if you soft-clip a sine wave, be it polynomial or not, the outcome is periodical at the same period, so contains only perfect harmonics. It cannot behave in the folded alias way one usually suspect. Xue On 02/11/2013 06:36,

Re: [music-dsp] PSOLA pitch shifting - resample or not?

2013-10-29 Thread Wen Xue
On 29/10/2013 08:42, robert bristow-johnson wrote: Rob, i think what Thilo is referring to is the subsample positioning of an entire grain when it is launched in the PSOLA system. i have heard this done both ways (grain positioning accurate to subsample precision vs. accurate only to sample

Re: [music-dsp] PSOLA pitch shifting - resample or not?

2013-10-26 Thread Wen Xue
one paradigm of asymmetric windows is to convolve a symmetric one (like the Hann) with a filter. So what they actually do is 1) inverse-filter the sound; 2) PSOLA it with Hann window; 3) filter the outcome. Seems there are plenty of papers discussing using the linear-predictive filter in 1) and

Re: [music-dsp] PSOLA pitch shifting - resample or not?

2013-10-23 Thread Wen Xue
? and is it better to use asymmetrical windows? Ross. On 23/10/2013 2:05 AM, Robert Bielik wrote: Wen Xue skrev 2013-10-22 16:53: One issue I find with 2N is that if you downshift by more than one octave you get gaps between the grains. Exactly. This is the point :) Otherwise you won't get

Re: [music-dsp] PSOLA pitch shifting - resample or not?

2013-10-22 Thread Wen Xue
One issue I find with 2N is that if you downshift by more than one octave you get gaps between the grains. In such case I'm thinking you may use something like 3N or 4N or 5N so that the output grains also have ample coverage on the time axis. For example if you choose the smallest kN larger

Re: [music-dsp] PSOLA pitch shifting - resample or not?

2013-10-21 Thread Wen Xue
Many thanks Rob. I'm somewhat puzzled by the grain size being possibly smaller than N (i.e. 2MN), for that means we lose whole pieces of data (every N-2M per N) in time domain. Maybe I'm slow to see the truth but right now it just doesn't feel right to me. Is there some well accepted

[music-dsp] PSOLA pitch shifting - resample or not?

2013-10-19 Thread Wen Xue
Maybe a beginner's question here: when pitch-synchronized OLA is used to modify speech pitch, do we resample the original signal or not? In the traditional view that pitch_shifting = time_scaling + resampling, the overlapped parts should be resampled, so that the wave shape of each period

Re: [music-dsp] note onset detection

2013-08-05 Thread Wen Xue
literally novelty is something going on now that wasn't before - see now perfectly that matches the idea of note onsets. ideally a complete onset detector shall test that 1) a note exists at t1 and 2) it hadn't existed at t0 to signal a positive between t0 and t1. for some reason most of

Re: [music-dsp] Songify?

2013-03-19 Thread Wen Xue
In the old days the text to songs must be verse, as opposed to prose, in that they needed comply with such things as measure and rhythm, which would automatically make some sense when adapted to music with the same matrices. This still governs many songs today, although there's the tendency of

Re: [music-dsp] Efficiency of clear/copy/offset buffers

2013-03-09 Thread Wen Xue
I think one can trust the compiler to handle a/3.14 as a multiplication. If it doesn't it'd probably be worse to write a*(1/3.14), for this would be a division AND a multiplication. -Original Message- From: Nigel Redmon Sent: Saturday, March 09, 2013 5:15 PM To: A discussion list

Re: [music-dsp] crossover filtering for multiband application

2013-03-01 Thread Wen Xue
On 01/03/2013 20:18, Theo Verelst wrote: ... - *All* filtering you can do, either analog or digital, will inevitably have phase shifting as a consequence, no matter what people will try to tell you about correcting networks (check out the theory and preferably do your homework: ALWAYS

Re: [music-dsp] crossover filtering for multiband application

2013-02-28 Thread Wen Xue
Not that I pretend to know much theory -- but I think these filters don't add up simply because they're not designed to do so. If one wants these filters to add up he has to patch them in some way. But at this stage it's already complicated by the uncooperative design. Some observation on

Re: [music-dsp] crossover filtering for multiband application

2013-02-28 Thread Wen Xue
On 01/03/2013 00:29, robert bristow-johnson wrote: On 2/28/13 5:44 PM, Wen Xue wrote: Not that I pretend to know much theory -- but I think these filters don't add up simply because they're not designed to do so. Linkwitz-Riley filters *do* add up to an all-pass filter and they are designed

Re: [music-dsp] M4 Music Mood Recommendation Survey

2013-02-21 Thread Wen Xue
They have to agree upon some measurement of emotion before making a point at each other. Maybe a geometric average of blood pressure and heart rate? I remember someone making a connection between music-induced emotion with goosebumps on the forearm - he literally counted the bumps!

Re: [music-dsp] filter smoothly changeable from LP-BP-HP?

2013-02-11 Thread Wen Xue
I think in his serial LP-HP topology you're meant to use your parameter to control the cut-off frequencies, not the gains. It makes possible to have the filter be either LP, BP or HP at ANY time. If you use parallel LP-BP-HP and tune the gains, it's very likely that at some point the filter's

Re: [music-dsp] Overlap-add settings for pitch detection?

2013-01-24 Thread Wen Xue
-dsp-boun...@music.columbia.edu] On Behalf Of Wen Xue Sent: Tuesday, January 22, 2013 4:31 PM To: A discussion list for music-related DSP Subject: Re: [music-dsp] Overlap-add settings for pitch detection? Hi Danijel, the choice of window size has much to do with what your pitched source is like

Re: [music-dsp] Overlap-add settings for pitch detection?

2013-01-22 Thread Wen Xue
Hi Danijel, the choice of window size has much to do with what your pitched source is like. Usually the window should be long enough to include plenty of cycles to fight against noise, but short enough to finish before any dramatic pitch change. So if the pitch is known to be stable, the

Re: [music-dsp] Calculating the gains for an XY-pad mixer

2013-01-18 Thread Wen Xue
Somehow I feel it's the correlated case that deserves more attention. Things being uncorrelated simply means their correlation coefficients are zero; but things being correlated these can be anything from -1 to 1 but zero. You probably don't want to handle all these cases with a same set of

Re: [music-dsp] Mmultichannel pitch detection?

2013-01-16 Thread Wen Xue
Hi Danijel, I don't think there's a standard way to it, for people take different approaches to suit their detectors and the signals. But roughly there are three schemes: 1. Adapt the pitch detector to multi-channel inputs. In a Bayesian detector, for example, this is done by replacing the

Re: [music-dsp] Precision issues when mixing a large number ofsignals

2012-12-10 Thread Wen Xue
To only way to guarantee precision is to use enough bits for intermediate results. Given your running sum formulation, the worst-case quantization error for any N is 0.5*Pi + 0.25*Pm*(N+2)(N-1)/N where Pi is the precision of inputs (the summed signals) and Pm is that of the partial sum

Re: [music-dsp] Ghost tone

2012-12-06 Thread Wen Xue
I played it out of my laptop speaker and picked it with my laptop mic. Surprisingly (or maybe not for some) the second half comes back some 5 times stronger in partial amplitudes than the first half. I have not observed any additional harmonic. I assume that shows speaker distortion is not an

Re: [music-dsp] Ghost tone

2012-12-06 Thread Wen Xue
It's easy to imagine a 1000hz and a 1200hz generate a 200hz, or a 1200hz and a 1400hz generate another 200hz, for there is the common divisor. But, say, will a 500hz and a 900hz generate a 400hz? xue -Original Message- From: Richard Dobson Sent: Thursday, December 06, 2012 1:27 PM

Re: [music-dsp] stuck with filter design

2012-11-19 Thread Wen Xue
As far as I could remember, with sampled signals we always try to forget values *between* samples, for they are always uniquely determined by values *at* the samples, so if we get these right, those must be right as well. The problem with mimicking an analogue filter with digital is that the

Re: [music-dsp] DC blocking (again :)

2012-08-01 Thread Wen Xue
as the moving average output is kept below. Xue -Original Message- From: Domagoj Saric Sent: Wednesday, August 01, 2012 9:39 AM To: music-dsp@music.columbia.edu Subject: Re: [music-dsp] DC blocking (again :) On 31.7.2012. 12:54, Wen Xue wrote: 5ms moving-average doesn't sound very right

Re: [music-dsp] Window presum synthesis

2012-05-16 Thread Wen Xue
: Monday, May 14, 2012 10:36 AM To: music-dsp@music.columbia.edu Subject: Re: [music-dsp] Window presum synthesis Hi, everyone, apologies for the delay...was on a short vacation ;) On 25 April 2012 02:22, Wen Xue mr.x@gmail.com wrote: Yes, it's very right that you can't recover a and b from a+b

Re: [music-dsp] Window presum synthesis

2012-04-23 Thread Wen Xue
Time-aliasing is just another formulation of delay-add. If you look at the definition of convolution y=x*h in terms on y(t)=... then it's clearly time-aliasing. In your example it's a convolution with a pulse train where the pulse period is K=N/4, provided the same treatment is applied to all

Re: [music-dsp] Window presum synthesis

2012-04-23 Thread Wen Xue
be observed, a similar illusion. -Original Message- From: Domagoj Šarić Sent: Monday, April 23, 2012 11:40 AM To: A discussion list for music-related DSP Subject: Re: [music-dsp] Window presum synthesis On 23 April 2012 10:52, Wen Xue mr.x@gmail.com wrote: Time-aliasing is just another

Re: [music-dsp] WOLA and the phase vocoder

2012-04-20 Thread Wen Xue
Pre- and post- windows do not have to be identical. Post-windowing is more about eliminating discontinuities at the ends of a frame. It has nothing to do with DFT so one doesn't care about the spectral qualities. I use Hamming forpre-windowing and {Hann divided by Hamming} for

Re: [music-dsp] WOLA and the phase vocoder

2012-04-20 Thread Wen Xue
The sine window is exactly the square-root of the Hann. (I've seen Hann window called square-sine window in some textbooks.) M or M-1 determine the actual window size (time taken by the window function to go from 0 to 0, not to be confused with DFT size). If you prefer to use same window and

Re: [music-dsp]   Splitting audio signal into N frequency bands

2011-11-02 Thread Wen Xue
Filtering a signal x(t) with a LP filter H(z) then subtract the result from x(t) itself is equivalent to filtering x(t) with a filter 1-H(z), which is a HP filter only if H(j2*pi*f) is close to 1 in the pass band (i.e. unit gain and zero phase). Otherwise the result after subtraction will still

Re: [music-dsp] Splitting audio signal into N frequency bands

2011-10-31 Thread Wen Xue
Subtracting the LP part makes sense only if the LP filter is zero-phase. I believe the typical way is to directly construct a series of steep band-pass filters to cover the whole frequency range. This is very flexible but usually means the individual parts do not accurately add up to the

Re: [music-dsp] Multichannel Stream Mixer

2011-08-30 Thread Wen Xue
Is FramesRecorder(...) a macro or a function call? And why multiply vol=1.0 when everything is floating-point already? -Original Message- From: music-dsp-boun...@music.columbia.edu [mailto:music-dsp-boun...@music.columbia.edu] On Behalf Of StephaneKyles Sent: 30 August 2011 12:13 To: 'A