Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Kenneth Ciszewski
As I remember it, the sampling theorem says that the sampling rate used to 
sample a signal must be at least twice the highest frequency being sampled in 
order to get a faithful reproduction when the samples are turned back into a 
(continuous) output signal. In practice, because it is necessary to band limit 
most signals to prevent aliasing artifacts, the sampling rate usually needs to 
be about 2.2 times the highest frequency being sampled, since it is impossible 
in practice to create low pass filters that are extremely steep, steep enough 
to allow a sampling rate of only 2 times the highest frequency involved to 
prevent aliasing.

Take the standard 8000 Hz sampling rate for telephone toll quality voice used 
with mu-law and a-law voice codecs for long distance digital transmission.  The 
specified upper frequency is about 3400 Hz, as I recall.  8000 Hz is more than 
2 times 3400 Hz, it's close to 2.2 times.

I think you can have frequencies  changing amplitude and jumping in and out 
subject to the constraints given above.  Obviously, telephone voice signal will 
have different frequencies at different times depending on the speaker and the 
words being spoken. Music has different frequencies and amplitudes throughout a 
particular performance.

I'm not sure what you mean by discontinuous.  When people speak on the 
telephone, there are often periods of silence between periods of speech signal. 
 

Signals that have sharp rising edges like the unit step function and the 
infinite impulse (Dirac Delta) function will obviously be band limited and 
their shape  and frequency content changed by the anti-aliasing low pass filter 
used before sampling takes take place.  

I don't think you get an exact reconstruction of the signal, but with proper 
filtering after being converted by a digital to analog converter, you can get a 
signal that sounds (or looks like, on an oscilloscope) a lot like the original 
signal, such that it is recognizable and intelligible.

Music is band limited to 20 KHz and sampled at at least 44,100 Hz for recording 
on CDs.  

What is your application?







 From: Doug Houghton doug_hough...@sympatico.ca
To: A discussion list for music-related DSP music-dsp@music.columbia.edu 
Sent: Wednesday, March 26, 2014 10:42 PM
Subject: [music-dsp] Nyquist–Shannon sampling theorem
 

I can't seem to get to the bottom of this with the usual internet pages.

Is the test signal, while possibly containing any number of wave compenents at 
various frequencies, required to be continous ansd uniform?

By this I mean you can't have frequencies jumping in and out, changing in 
amplitude etc...

I'm guessing this somehow scratches at the surface of what I've read about no 
signal being properly band limited unless it's infinit.

I fail to see how a readable proof is possible to explain exact reconstruction 
of any real recording sound, whether it's music or crickets chirping.

I sort of see maybe how an infinit signal could solve some of these issues, 
meaning any amplitude/frequency  complexities over infinity may simply resolve 
to something that can be bandlimited and described as a frequency of a steady 
signal, something like that.

Curouis, I am starting to suspect there is a lot of typical misconceptions 
about what the math really proves, I can't read the equations I'm turning to 
this list. 
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Doug Houghton
The application is music.  I understand the basics, my question is in the 
constraints that might be imposed on the signal or functon as referenced 
by the theory.  Is it understood to be repeating? for lack of a better term, 
essentually just a mash of frequencies that bever change from start to 
finish.


I'm thinking the math must consider it this way, or rather the difference is 
abstracted since the signal is assumed to be band limited, which means 
infinit, which means you can create any random signal by inject the required 
freuencies at the reuired amplitides and phase from start to finish, even a 
20k 2ms blip in the middle of endless silence.


Is that making any sense? I'm struggling with the fine points.  I bet this 
is obvious if you understand the math in the proof. 


--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Nyquistâ?Shannon sampling theorem

2014-03-26 Thread Doug Houghton

consider this from a wiki page

A bandlimited signal can be fully reconstructed from its samples, provided 
that the sampling rate exceeds twice the maximum frequency in the 
bandlimited signal. This minimum sampling frequency is called the Nyquist 
rate. This result, usually attributed to Nyquist and Shannon, is known as 
the Nyquist-Shannon sampling theorem.


An example of a simple deterministic bandlimited signal is a sinusoid of the 
form . If this signal is sampled at a rate  so that we have the samples , 
for all integers , we can recover  completely from these samples. Similarly, 
sums of sinusoids with different frequencies and phases are also bandlimited 
to the highest of their frequencies.




The example may imply that the bandlimited signal to satisfy the theory is 
at it's most a complex sum of various sinusoids at different frequencies 
phases, amplitudes.





aa9a7b3fc744c653a5629d4b3d6ae5fd.pngfb409984dea7c4b5f093208b3174ac4c.png269e6a3cdee35a7eec719c55abbf640a.png7b8b965ad4bca0e41ab51de7b31363a1.pnge34fd49d79f3869d9033f958be91021e.png--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Doug Houghton

sorry about all the attachments, didn't see that coming.
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Nigel Redmon
Hi Doug,

I think you’re overthinking this…

There is the frequency-sensitive requirement that you can’t properly sample a 
signal that has frequencies higher than half the sample rate. For music, that’s 
not a problem, since our ears have a significant band limitation anyway.

So, if we have a musical signal with lots of discontinuities, resulting in 
strong frequencies to, say, 100 kHz, and we make a copy with everything 
stripped off above 20 kHz with a lowpass filter, the two waveforms will not 
look alike. But they will sound alike to us. Now sample that at 44.1 kHz, 
24-bit. Then push that out to a D/A converter back to a third analog waveform. 
It *will* look just like the second waveform, and it will sound like both it 
and the original waveform.

By 20k 2ms blip”, I assume you mean a 2 ms step that has been band limited to 
20 kHz. Sure, no problem.


On Mar 26, 2014, at 9:23 PM, Doug Houghton doug_hough...@sympatico.ca wrote:

 The application is music.  I understand the basics, my question is in the 
 constraints that might be imposed on the signal or functon as referenced 
 by the theory.  Is it understood to be repeating? for lack of a better term, 
 essentually just a mash of frequencies that bever change from start to finish.
 
 I'm thinking the math must consider it this way, or rather the difference is 
 abstracted since the signal is assumed to be band limited, which means 
 infinit, which means you can create any random signal by inject the required 
 freuencies at the reuired amplitides and phase from start to finish, even a 
 20k 2ms blip in the middle of endless silence.
 
 Is that making any sense? I'm struggling with the fine points.  I bet this is 
 obvious if you understand the math in the proof. 
 --

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Doug Houghton



There is the frequency-sensitive requirement that you can’t properly sample 
a signal that has frequencies higher than half the sample rate. For music, 
that’s not a problem, since our ears have a significant band limitation 
anyway.


This is intuitive.  I think perhaps what I'm asking has more to do directly 
with the fourier series than sample theory.


It's my understanding that the fourier theory says any signal can be 
created by summing various frequencies at various phases and amplitudes.  So 
this would answer my question then that it's not really a stipulation of the 
function persay, since any signal at all can be described this way. 


--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Nigel Redmon
It's my understanding that the fourier theory says any signal can be created 
by summing various frequencies at various phases and amplitudes.

OK, now recall that the Fourier series describes a subset of “any signal” with 
a subset of “various frequencies”. It’s more like one cycle of any waveform can 
be created by summing sine waves of multiples of that cycle at various phases 
and amplitudes (a little awkward, but trying to modify your words). Fourier 
figured that out by observing the way heat traveled around an iron ring (hence 
the focus on cycles)–he wasn’t really into the recording scene back then ;-)

(It’s true that Fourier techniques can be used to create more arbitrary 
signals, but that somewhat in the manner that movies are made from many still 
pictures.)

So, it seems that you’re trying to match the theory of a very specific, limited 
portion of a signal, with one that doesn’t have those limitations.

On Mar 26, 2014, at 9:46 PM, Doug Houghton doug_hough...@sympatico.ca wrote:
 
 There is the frequency-sensitive requirement that you can’t properly sample 
 a signal that has frequencies higher than half the sample rate. For music, 
 that’s not a problem, since our ears have a significant band limitation 
 anyway.
 
 This is intuitive.  I think perhaps what I'm asking has more to do directly 
 with the fourier series than sample theory.
 
 It's my understanding that the fourier theory says any signal can be 
 created by summing various frequencies at various phases and amplitudes.  So 
 this would answer my question then that it's not really a stipulation of the 
 function persay, since any signal at all can be described this way. 
 --

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Doug Houghton
so is there a requirement for the signal to be periodic? or can any series 
of numbers be cnsidered periodic if it is bandlimited, or infinit?  Periodic 
is the best word I can come up with. 


--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Thor Harald Johansen

I'm guessing this somehow scratches at the surface of what I've read
about no signal being properly band limited unless it's infinit.


You're talking about Sinc filtering (ideal low pass filter), which is 
essentially an IIR filter that needs infinite past and future samples. 
In practice, a very steep filter is used to attenuate the signal above 
the Nyquist frequency to almost nothing. A Lanczos (windowed Sinc) 
filter will be close to ideal.


For synthesis of non-sinusoidal test waveforms, a BLIT (Band-Limited 
Impulse Train) oscillator will give you a perfectly band limited signal.


Thor




smime.p7s
Description: S/MIME Cryptographic Signature
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Nyquist–Shannon sampling theorem

2014-03-26 Thread Nigel Redmon
On Mar 26, 2014, at 10:07 PM, Doug Houghton doug_hough...@sympatico.ca wrote:
 so is there a requirement for the signal to be periodic? or can any series of 
 numbers be cnsidered periodic if it is bandlimited, or infinit?  Periodic is 
 the best word I can come up with. 
 --

Well, no—you can decompose any portion of waveform that you want…I’m not sure 
at this point if you’re talking about the discrete Fourier Transform or 
continuous, but I assume discrete in this context…but it’s not that generally 
useful to, say, do a single transform of an entire song. Sorry, I’m not sure 
where you’re going here…

So, let’s back off. The sampling theorem says that you can recreate any signal 
as long as you sample at a rate of more than twice the highest frequency 
component. Now, how do you feel that conflicts with Fourier theory, 
specifically?
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp


Re: [music-dsp] Dither video and articles

2014-03-26 Thread Sampo Syreeni

On 2014-03-26, Nigel Redmon wrote:

Maybe this would be interesting to some list members? A basic and 
intuitive explanation of audio dither:


https://www.youtube.com/watch?v=zWpWIQw7HWU


Since it's been quiet and dither was mentioned... Is anybody interested 
in the development of subtractive dither? I have a broad idea in my 
mind, and a little bit of code (for once!) as well. Unfortunately 
nothing too easily adaptable though... Willing to copy and explain all 
of it, though. :)


The video will be followed by a second part, in the coming weeks, that 
covers details like when, and when not to use dither and noise 
shaping. I’ll be putting up some additional test files in an article 
on ear level.com in the next day or so.


In any case, thank you kindly. Dithering and noise shaping, both in 
theory and in practice is *still* something far too few people grasp for 
real.

--
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 -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp