As long as we're going off the rails...
This provoked me into learning something new:
https://stackoverflow.com/questions/24177503/how-does-the-c-preprocessor-handle-circular-dependencies
So interestingly those two #define's together would have no effect!
-Ethan
On Thu, Mar 19, 2020 at 7:34
Hi Pierre,
This email list is a fine place to look, and there may be people who are
interested. But it's hard to tell from your description -- the more detail
you can give about what you're looking for, the better!
-Ethan
On Fri, Mar 22, 2019 at 7:06 AM Pierre Du Toit
wrote:
> Dear music-dsp
If you're just talking about recording (for example) 1 second of audio at
8kHz and playing it back at 9kHz, this will have two effects:
1) the pitch will be shifted up by a factor of 9/8, or 12*log(9/8)/log(2) =
~2.04 semitones
2) your recording will play back 9/8 faster, so it will be done in
You probably won't need to correct the amplitude every sample because the
error introduced every tick should be tiny. You can do it every N samples
and just see what value of N introduces an acceptable amount of noise. Or
just fold the amplitude management in as Robert suggests, that way you get
A very simple oscillator recipe is:
a(t+1) = C*a(t) - S*b(t)
b(t+1) = S*a(t) + C*b(t)
Where C=cos(w), S=sin(w), w being the angular frequency. a and b are your
two state variables that are updated every sample clock, either of which
you can use as your output.
There won't be any phase or
detects a string of stationary inputs it can fold them together
> into one big high-res DCT and code that instead.
>
> On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn wrote:
>
>> I don't think that's correct -- DIF involves first doing a single stage
>> of butterfly oper
Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for
> realtime synthesis?
> From: "Ethan Fenn"
> Date: Mon, November 5, 2018 10:17 am
> To: music-dsp@music.columbia.edu
> --
>
>
It's not exactly Cooley-Tukey. In Cooley-Tukey you take two _interleaved_
DFT's (that is, the DFT of the even-numbered samples and the DFT of the
odd-numbered samples) and combine them into one longer DFT. But here you're
talking about taking two _consecutive_ DFT's. I don't think there's any
>
> In any case, most signals are not sums of stationary sinusoids. And since
> signals are typically buried in noise, or superimposed on top of each
> other, so the problem is not well posed. For two very simple examples:
> consider two stable sine waves at 440Hz and 441Hz -- you will need a very
I haven't thought through the details for any particular application, but
the chirp z-transform might be a useful trick to keep in mind for these
sorts of things. It lets you calculate an IFFT with an arbitrary spacing
between bins, or even an arbitrary fundamental in case you want to detune
the
You've got it backwards -- downsample means fewer samples. If you have a
240-sample buffer at 48kHz, then resample to 8kHz, you'll have 240/6=40
samples.
-Ethan
On Sat, Oct 6, 2018 at 4:10 AM, Alex Dashevski wrote:
> Hi,
> Let's assume that my system has sample rate = 48Khz and audio buffer
And if you want to stick with BLEP-like approaches, rather than BLEPs
followed by an integrator you can use a pre-integrated BLEP, usually called
a BLAMP (Band-Limited rAMP). This gives you a short waveform you can mix in
any time there is a discontinuity in the first derivative of your signal,
Another alternative to calling sin() repeatedly is to use some kind of
recursive oscillator which just takes a few operations to output each
sample.
This article is a very readable starting point and presents a few options:
http://vicanek.de/articles/QuadOsc.pdf
As for whether an FFT would do
Let's let t be the time, and s be the position in the buffer. So, for
example, playing back at double speed you'd just have s=2*t.
To make it exponential, and have s=0 at t=0, we can write:
s = C*R*(e^(t/C) - 1)
Here R is the initial playback rate (R=1 if it should start at normal
pitch), and C
ave an adaptive notch filter ?
>
> Does your above equation works in identifying a fixed frequency tone ?
> For example by doing (x(t) + x(t-2)) / (2*x(t-1)) can we isolate a
> single tone frequency ?
>
> -ben
>
> --
> *From:* Ethan Fenn <
ic-dsp-boun...@music.columbia.edu <music-dsp-bounces@music.
> columbia.edu> on behalf of Ethan Fenn <et...@polyspectral.com>
> *Sent:* Wednesday, January 10, 2018 10:33 PM
> *To:* music-dsp@music.columbia.edu
> *Subject:* Re: [music-dsp] Finding discontinuity in a sine wave.
If the sine frequency is f and the sample rate is sr:
Let C = cos(2*pi*f/sr)
For each sample compute:
y(t) = x(t) - 2*C*x(t-1) + x(t-2)
y(t) should be 0 for every t... if not it indicates a discontinuity. This
is just an FIR filter with a zero at the given frequency.
-Ethan
On Wed, Jan
>
> Since only the speed difference between sender and receiver does matter:
> No.
> This article is pretty thorough on this topic:
> https://en.wikipedia.org/wiki/Doppler_effect
Well, according to the article the pitch change will not be identical in
those two scenarios. But it will be
ve
>> changed the data rate (not the signal) when we insert zeros. Most of the
>> time, we want to also change the signal (by getting rid of the aliases,
>> that were above half the sample rate and now below). That’s why my article
>> made a big deal (point #3) of pointing o
think real insight and
intuition in DSP is built up by comparing what basic operations look like
in each of these different universes (as well as in their frequency domain
equivalents).
-Ethan
On Mon, Sep 4, 2017 at 2:14 PM, Ethan Fenn <et...@polyspectral.com> wrote:
> Time variance is a
verting back to analog or interpreting discrete time operations in
>> analog terms (i.e., what physical frequency is the filter cut-off at,
>> etc.).
>>
>> The other big pedagogical problem with impulse train representation is
>> that it can't be graphed in a useful way
ited functions
> that interpolate any given set of samples. These get used in "bandpass
> sampling," which is uncommon in audio but commonplace in radio
> applications.
>
> Ethan D
>
> On Fri, Sep 1, 2017 at 1:31 PM, Ethan Fenn <et...@polyspectral.com> wrote:
>
Thanks for posting this! It's always interesting to get such a good glimpse
at someone else's mental model.
I'm one of those people who prefer to think of a discrete-time signal as
representing the unique bandlimited function interpolating its samples. And
I don't think this point of view has
So I guess the general idea with these frequency shifters is something like:
pre-filter -> generate Hilbert pair -> multiply by e^iwt -> take the real
part
Am I getting that right?
Now that I think about it, another application might be in stereo imaging.
Start with a mono signal, generate the
Some very interesting references.
I'm curious what uses people find for the Hilbert transform for in audio.
An instantaneous amplitude envelope, for use in compressors and other
envelope-driven effects? Or something else?
-Ethan
On Sun, Feb 5, 2017 at 10:13 AM, Eric Brombaugh
r!
On Wed, Dec 14, 2016 at 11:47 AM, Ethan Fenn <et...@polyspectral.com> wrote:
> Very interesting ideas Robert, thanks.
>
> Some observations:
>
> * Regarding the use of a polynomial to limit the range of spurious
> frequency components -- a good goal, but if the input
Very interesting ideas Robert, thanks.
Some observations:
* Regarding the use of a polynomial to limit the range of spurious
frequency components -- a good goal, but if the input signal actually goes
outside [-1,1] this is no longer strictly true.
* Since f'(0) != 1 for these curves, they're
Doesn't make sense to me either. If the inputs are two pure sines, you'll
get combination tones showing up in the output. And they won't be
particularly quiet either.
-Ethan
On Sat, Dec 10, 2016 at 2:31 PM, robert bristow-johnson <
r...@audioimagination.com> wrote:
>
>
> it's this Victor Toth
Yes, that will give you an approximate answer -- if you replace the FFT's
with z transforms and the IFFT with an inverse z transform that will give
you the theoretically exact answer.
And if you actually want to implement this allpass filter you'll have to
deal with the fact that it almost
One thing that might be interesting to try is to grab a slice of audio,
apply a smooth window, and then convolve it with an ongoing stream of white
noise. Sort of the opposite of a usual convolution reverb -- rather than a
fixed "kernel" and a new chunk of "signal" every frame, you'd have a fixed
Wow, my very own hyphenated algorithm. :o)
Thanks for sharing this, Evan, it's impressive how concise the code ends up
being.
I'd echo the general feeling (which you also express in your Future Work
section) that for DSP work it really wants to be implemented using a ring
buffer. Neither
>
> Perfect reconstruction isn't my interest in oversized windows,
> either---and I don't believe it would be possible. My interest is, rather,
> expanding the available characteristics of window functions for purposes of
> frequency-domain analysis. For instance, the frequency response of a bin
Also keep in mind that even in the constant frequency case, you probably
don't want to be constrained to an integer number of samples in your
periods. So you'll probably want to think about some kind of interpolation,
and once you have that it's not clear if this phase drift is really a
problem.
A few years ago I built a mixing engine for games. Some aspects of the
design sound similar to what you're thinking about.
Every audio frame (I think it was every 256 samples at 48k), the
single-threaded "supervisor" would wake up and scan the graph of audio
objects, figuring out what needed
ou'd like between two samples.
The "wiggles" you get this way tend to be tiny compared to the surrounding
samples, so I think you can safely ignore this sort of thing in practice.
-Ethan
On Thu, Jul 28, 2016 at 12:18 AM, Ross Bencina <rossb-li...@audiomulch.com>
wrote:
>
>
> Because I don't think there can be more than one between any two adjacent
> sampling times.
This really got the gears turning. It seems true, but is it a theorem? If
not, can anyone give a counterexample?
Back to the main question... I think you're really going to need to
oversample by at
> - IIUC, none the other algos mentioned can cheaply vary the window size
> at run-time, right?
I don't think what I've been calling "the Tito method" can cheaply vary the
window size, unless I've missed something clever. Or unless you're willing
to accept a "crossover period" during which the
Yeah, with a binary search, you're doing O(log(w)) work, but you might not
end up discarding any samples. With the paper's linear search, you might do
O(w) work, but only if you end up discarding O(w) samples. So, it turns out
to be worth it, as long as you can tolerate the spike.
The thinking
ic used in realtime hash-table migration and make that discard step run
> in constant time per sample---but that's a little more tango than I feel
> like dancing today!
>
> – Evan Balster
> creator of imitone <http://imitone.com>
>
> On Wed, Jul 20, 2016 at 11:04 A
--
> Subject: Re: [music-dsp] highly optimised variable rms and more
> From: "Ethan Fenn" <et...@polyspectral.com>
> Date: Tue, July 19, 2016 9:45 am
> To: music-dsp@music.columbia.edu
>
r b-j
>>
>>
>>
>>
>>
>>
>>
>> Original Message
>> Subject: Re: [music-dsp] highly optimised variable rms and more
>> From: "Ross Bencina" <rossb-li...@audiomulch.com>
>> Date: Mon, July 18, 2016 10:52 am
>> To: music-dsp@music.columbi
..@audiomulch.com>
wrote:
> On 19/07/2016 12:29 AM, Ethan Fenn wrote:
>
>> a $ b = max(|a|, |b|)
>>
>> which I think is what you mean when you describe the peak hold meter.
>> Certainly an interesting application! And one where I don't think
>> anything analogo
1 AM, Bart Brouns <b...@magnetophon.nl> wrote:
> Hi Ethan,
>
> From: Ethan Fenn <et...@polyspectral.com>
>>
>> In the language of z transforms, your algorithm is based on this kind of
>> identity:
>>
>> (1+z^-1+z^-2+...+z^-15)/16 =
>> ((1+z^-
It's a neat idea... I also don't know a name for it.
In the language of z transforms, your algorithm is based on this kind of
identity:
(1+z^-1+z^-2+...+z^-15)/16 =
((1+z^-8)/2)*((1+z^-4)/2)*((1+z^-2)/2)*((1+z^-1)/2)
Whereas Tito's technique boils down to:
(1+z^-1+z^-2+...+z^-15)/16 =
Keep in mind that windowing (or just using a finite-length sample, which is
the same as using a rectangular window) is going to smear the FFT spectra
out, making it hard to draw any conclusion from looking at individual bins.
I'm guessing you also don't have the tail of the allpass filter --
Neat, I had never heard of this illusion before.
Nothing I've read mentions simply offsetting one of the channels with a
delay. Rather it sounds like one of the channels should have a 180 degree
phase offset in a narrow band around the target frequency, implemented via
an an allpass filter. This
>
> Are you trying to:
> 1) generate an arbitrary sound that has maximum perceived loudness OR
> 2) maximize the loudness of spoken voice?
I was thinking of 1) but it's always interesting to see the directions
different minds go in! And I really don't have any practical application in
mind, just
Purely for amusement and edification:
Let's say I wanted to make a one second, 44.1/16 mono wav file which was as
loud as it could possibly be.
The only real results I know about loudness are the equal loudness
contours, which suggest I should put as much energy as possible in the
region around
se of the complete set and the zero set, the two halves of the
> range equal; in this case we would want to use an odd or even MSB, or some
> other pattern, to distinguish between the special cases.
>
> – Evan Balster
> creator of imitone <http://imitone.com>
>
> On Fri,
My money's still on this being not merely impractical but complete nonsense.
People with actual interesting new ideas tend to present them in a
straightforward way, rather than filling a slide deck with "What Big
Mathematics Doesn't Want You To Know About This New Encoding."
-Ethan
On Fri,
), the
SORN concept quickly becomes untenable.
-Ethan
On Fri, Apr 15, 2016 at 9:03 AM, Ethan Fenn <et...@polyspectral.com> wrote:
> I really don't think there's a serious idea here. Pure snake oil and
> conspiracy theory.
>
> Notice how he never really pins down one precise
I really don't think there's a serious idea here. Pure snake oil and
conspiracy theory.
Notice how he never really pins down one precise encoding of unums... doing
so would make it too easy to poke holes in the idea.
For example, this idea of SORNs is presented, wherein one bit represents
the
t,
Ethan
On Mon, Mar 28, 2016 at 8:31 AM, vadim.zavalishin <
vadim.zavalis...@native-instruments.de> wrote:
> Ethan Fenn писал 2016-03-25 20:57:
>
> oscillator. The update step looks like this:
>>
>> y := p + b0*x
>>
>> p := -(a1/2)*p + (sigma/2)*q + (b1 - a
So the idea I mentioned earlier in this thread about matching signal value
and derivative didn't really turn out to make much sense when I tried it
out. But I did hit upon a topology that seems interesting. By changing the
basis of the state space and computing some new coefficients, a biquad can
ed appropriately to get it working with only summing? I understand we
> derive null frequencies based on microphone positions but I do not see null
> frequency in my results.
>
> If I do not go for Beamforming I better have a proper reason why not.
>
> Thanks & Regards,
>
ents.
>
> I'm not sure quite how this would work for discrete time? Is the idea to
> interpret them as continuous-time filters for the purposes of the state
> update?
>
> E
>
> On Thu, Mar 3, 2016 at 11:34 AM, Ethan Fenn <et...@polyspectral.com>
> wrote:
>
>
As a simple fix, I would also try just leaving the state alone rather than
zeroing it out. I've done this plenty of times before and it's always
sounded okay for moderate/gradual changes of the coefficients.
As for doing it "correctly" -- I haven't read up on this but my thinking
would go like
When you ask if there is an implementation
of something available, you don't expect people to teach you programming
lessons and sprout about
how useful it would be for your personal development to implement things
yourself.
Honestly, it wasn't clear if that's what you were asking for or not. Had
I'm not sure exactly what your requirements are (e.g. does it need to be a
cubic resampler?). But I've used the resampler that is part of the speex
library in the past and it did a fine job. It uses the table-based windowed
sinc approach. I believe it's a BSD-style license, and it's well-separated
>
> again, Evan, what i would like to hear from you is, given your offered
> algorithm for spectral centroid, if you play, say a piano into it, one note
> at a time, does C# have a 6% greater spectral centroid or 12% higher than
> C? or less than 6%?
It seems to me, with the sqrt in the latest
>
> 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
hes the
> power of the time domain signal:
>
>
> https://gist.github.com/RossBencina/a15a696adf0232c73a55/bdefe5ab0b5c218a966bd6a04d9d998a708faf99
>
>
> On 6/11/2015 12:02 AM, Ethan Fenn wrote:
>
>> And is psd[w] in exactly the same units as the magnitude squar
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, Ethan Fenn <et...@p
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
64 matches
Mail list logo