![]() | All Advertisers |
| Member Services Directory | Classifieds | Reviews | Jobs | Deal Zone | Merchandise | Marketplace | Facebook App | Books, DVDs & Gadgets | Video Vault | Tips & Techniques |
| |||||||
New Reply | Thread Tools | Search this Thread |
| | #1 |
| Gear addict Joined: Jun 2009
Posts: 479
Thread Starter | OK, so REALLY, 44.1khz was never enough! 44100 samples / 22050 cycles = 2 samples / cycle 2 samples per cycle...you can quote me! Thats not a lot! Thats a square wave at 22050khz no matter what.... This time, I broke out my big guns, "Programming Windows" by Charles Petzold. " With pulse code modulation, the sample rate is a constant. Let's assume the sample rate is 11,025 Hz because that's what I use in the SINEWAVE program. If you wish to generate a sine wave of 2,756.25 Hz (exactly one-quarter the sample rate), each cycle of the sine wave is just 4 samples. For a sine wave of 25 Hz, each cycle requires 441 samples. In general, the number of samples per cycle is the sample rate divided by the desired sine wave frequency. Once you know the number of samples per cycle, you can divide 2 (2 times pi) radians by that number and use the sin function to get the samples for one cycle. Then just repeat the samples for one cycle over and over again to create a continuous waveform. The problem is the number of samples per cycle may well be fractional, so this approach won't work well either. You'd get a discontinuity at the end of each cycle. The key to making this work correctly is to maintain a static "phase angle" variable. This angle is initialized at 0. The first sample is the sine of 0 degrees. The phase angle is then incremented by 2 (2 times pi) times the frequency, divided by the sample rate. Use this phase angle for the second sample, and continue in this way. Whenever the phase angle gets above 2 (2 times pi) radians, subtract 2 (2 times pi) radians from it. But don't ever reinitialize it to 0. For example, suppose you want to generate a sine wave of 1000 Hz with a sample rate of 11,025 Hz. That's about 11 samples per cycle. The phase angles and here I'll give them in degrees to make this a little more comprehensible for approximately the first cycle and a half are 0, 32.65, 65.31, 97.96, 130.61, 163.27, 195.92, 228.57, 261.22, 293.88, 326.53, 359.18, 31.84, 64.49, 97.14, 129.80, 162.45, 195.10, and so forth. The waveform data you put in the buffer are the sines of these angles, scaled to the number of bits per sample. When creating the data for a subsequent buffer, you keep incrementing the last phase angle value without reinitializing it to zero." This guy pretty much designed the windows implementation of the .wav file. I reccomend this book to EVERYONE on planet Earth who uses Windows... and no I didn't get info for the first post from this book directly, I remembered it wrong off the top of my head lol. You will need to know C or C++ to read the rest of the book, but the 100 page chapter on digital audio makes the $45 and 1400 pages very worth it. Thanks for correcting my last post, hope this makes up for it! |
| | |
| | #2 |
| Lives for gear Joined: Jun 2009
Posts: 3,397
| |
| | |
| | #3 |
| Gear addict Joined: Jun 2009
Posts: 479
Thread Starter |
This also might be of interest.... "Experimenting with Additive Synthesis For many years going back to Pythagoras at least people have attempted to analyze musical tones. At first it seems very simple, but then it gets complex. Bear with me if I repeat a little of what I've already said about sound. Musical tones, except for some percussive sounds, have a particular pitch or frequency. This frequency can range across the spectrum of human perception, from 20 Hz to 20,000 Hz. The notes of a piano, for example, have a frequency range between 27.5 Hz to 4186 Hz. Another characteristic of musical tones is volume or loudness. This corresponds to the overall amplitude of the waveform producing the tone. A change in loudness is measured in decibels. So far, so good. And then there is an unwieldy thing called "timbre." Very simply, timbre is that quality of sound that lets us distinguish between a piano and a violin and a trumpet all playing the same pitch at the same volume. The French mathematician Fourier discovered that any periodic waveform no matter how complex can be represented by a sum of sine waves whose frequencies are integral multiples of a fundamental frequency. The fundamental, also called the first harmonic, is the frequency of periodicity of the waveform. The first overtone, also called the second harmonic, has a frequency twice the fundamental; the second overtone, or third harmonic, has a frequency three times the fundamental, and so forth. The relative amplitudes of the harmonics governs the shape of the waveform. For example, a square wave can be represented as a sum of sine waves where the amplitudes of the even harmonics (that is, 2, 4, 6, etc) are zero and the amplitudes of the odd harmonics (1, 3, 5, etc) are in the proportions 1, 1/3, 1/5, and so forth. In a sawtooth wave, all harmonics are present and the amplitudes are in the proportions 1, 1/2, 1/3, 1/4, and so forth. To the Grman scientist Hermann Helmholtz (1821_1894), this was the key in understanding timbre. In his classic book On the Sensations of Tone (1885, republished by Dover Press in 1954), Helmholtz posited that the ear and brain break down complex tones into their component sine waves and that the relative intensities of these sine waves is what we perceive as timbre. Unfortunately, it proved to be not quite that simple. Electronic music synthesizers came to widespread public attention in 1968 with the release of Wendy Carlos's album Switched on Bach. The synthesizers available at that time (such as the Moog) were analog synthesizers. Such synthesizers use analog circuitry to generate various audio waveforms such as square waves, triangle waves, and sawtooth waves. To make these waveforms sound more like real musical instruments, they are subjected to some changes over the course of a single note. The overall amplitude of the waveform is shaped by an "envelope." When a note begins, the amplitude begins at zero and rises, usually very quickly. This is known as the attack. The amplitude then remains constant as the note is held. This is known as the sustain. The amplitude then falls to zero when the note ends; this is known as the release. The waveforms are also put through filters that attenuate some of the harmonics and turn the simple waveforms into something more complex and musically interesting. The cut-off frequencies of these filters can be controlled by an envelope so that the harmonic content of the sound changes over the course of the note. Because these synthesizers begin with harmonically rich waveform, and some of the harmonics are attenuated using filters, this form of synthesis is known as "subtractive synthesis." Even while working with subtractive synthesis, many people involved in electronic music saw additive synthesis as the next big thing. In additive synthesis you begin with a number of sine wave generators tuned in integral multiples so that each sine wave corresponds to a harmonic. The amplitude of each harmonic can be controlled independently by an envelope. Additive synthesis is not practical using analog circuitry because you'd need somewhere between 8 and 24 sine wave generators for a single note and the relative frequencies of these sine wave generators would have to track each other precisely. Analog waveform generators are notoriously unstable and prone to frequency drift. However, for digital synthesizers (which can generate waveforms digitally using lookup tables) and computer-generated waveforms, frequency drift is not a problem and additive synthesis becomes feasible. So here's the general idea: You record a real musical tone and break it down into harmonics using Fourier analysis. You can then determine the relative strength of each harmonic and regenerate the sound digitally using multiple sine waves. When people began experimenting with applying Fourier analysis on real musical tones and generating these tones from multiple sine waves, they discovered that timbre is not quite as simple as Helmholtz believed. The big problem is that the harmonics of real musical tones are not in strict integral relationships. Indeed, the term "harmonic" is not even appropriate for real musical tones. The various sine wave components are inharmonic and more correctly called "partials." It was discovered that the inharmonicity among the partials of real musical tones is vital in making the tone sound "real." Strict harmonicity yields an "electronic" sound. Each partial changes in both amplitude and frequency over the course of a single note. The relative frequency and amplitude relationships among the partials is different for different pitches and intensities from the same instrument. The most complex part of a real musical tone occurs during the attack portion of the note, when there is much inharmonicity. It was discovered that this complex attack portion of the note was vital in the human perception of timbre. In short, the sound of real musical instruments is more complex than anyone imagined. The idea of analyzing musical tones and coming up with relatively few simple envelopes for controlling the amplitudes and frequencies of the partials was clearly not practical." THE DEFICIENCY WITH DIGITAL ISN'T DYNAMIC RANGE, BUT IT'S INABILTY TO REPRESENT HIGH FREQUENCY PARTIALS ABOVE 11,025Hz which recieves the minimum of 11 samples per cycle needed to acheive a fairly detailed "lower highs" but not much beyond that...also digital creates a fair amount of high frequency distortion (cold brittleness) in recorded signals at 44.1khz due to the frequencies above 11025 resembling square waves to a greater degree as they approach 22050Hz......... phew...glad that's over. (yea right!) And most people would have done this when they were wrong ![]() PS: I will not post in haste. I will not post in haste. I will not post in haste........ |
| | |
| | #4 |
| Gear addict Joined: Jun 2009
Posts: 479
Thread Starter | |
| | |
| | #5 | |
| Lives for gear Joined: Jun 2009
Posts: 3,397
| Quote:
But what about 1 khz and 1.000000.....000001 khz? At what point is the difference lost to rounding? | |
| | |
| | #6 | |
| Lives for gear Joined: Jun 2009
Posts: 1,022
Verified Member | Quote:
Given more than two points per cycle you'll get a changing set of levels, which will not LOOK like the original waveform, but there's only one bandlimited line that passes through them, the original waveform. Oh, and Charles Petzold isn't a big gun in DSP, he's a fine programmer but any idiot could devise the WAV format given a simple set of requirements. I recommend you buy a decent book on the subject, read it, and then read it again. | |
| | |
| | #7 |
| Lives for gear Joined: May 2008 Location: Karlsruhe, Germany
Posts: 2,747
Verified Member | |
| | |
| | #8 | |
| Gear addict Joined: Jun 2009
Posts: 479
Thread Starter | Quote:
Also, I know Petzold isn't into DSP, but I'm sure he tought a lot of the big boys how to rumble.... I'm glad to see some programmers coming out of the woodwork...I thought there would be way more on this forum...being how straightforward it is to make your own DSP tools with the right knowlege. Please post more subjects like this! Even cool source code if you can, I know I'm probably not the only one interested... ![]() Also, I understand that those 2 samples still have full dynamic range, and that there is the fraction of a sample that must cycle but never round off and that the only integration (right word? extrapolation?) of those samples is the original waveform...but it still ISN'T the original waveform, so without top-notch converters, digital still kinda sucks at 44.1khz, relative to even 48khz correct? Isn't that why 48khz exists? | |
| | |
| | #9 | |
| Lives for gear Joined: Jun 2009
Posts: 1,022
Verified Member | Quote:
It's hard to describe the characteristics of a sample stream without diagrams, but I'll try. Start with a bandlimited signal, bandlimited to less than say 20kHz (we'll use 40kHz sampling to simplfy the numbers), now imagine that plotted in the frequency domain. Let's say the frequency plot looks something like this :.::.. Now sample it at 40kHz, so instead of a smooth continuous waveform you have have a series of impulses which are the height of the original waveform at those points, and zero in between. Now if you look at this in the frequency domain, you will see a pattern like this :.::.. ..::.::.::.. ..::.::.::.. ..::..::..::.. (ad infinitum) Hopefully you can see what I mean, that series of impulses has the same content below the nyquist frequency (the first space in my "diagram" above), then it is mirrored above nyquist, then repeated above nyquist * 2, mirrored above nyquist * 3, and so on. So what you have is a waveform that looks very different from the original, but actually contains the exact same information below nyquist, if you want the original waveform back then you need to filter away everything above nyquist. People often describe the reconstruction filter as "joining the dots", that's tends to make people think it's some sort of guesswork, what the filter is actually doing is throwing away stuff we don't want, the information we do want is already there. Sampling works with a series of impulses, not with the stepped waveforms usually shown, now at the DAC we can't have impulses so we have steps, which changes things slightly (a 1.5dB drop at nyquist), but we can compensate for that. 44.1kHz versus 48 is actually a result of early systems storing data on video tapes and the difference between the European and US video formats, though 48 does make things slightly easier for filter implementation. Practical implementation issues make some extra bandwidth a good thing, but it's not a question of not having enough resolution to correctly represent a waveform at a given sample rate. | |
| | |
| | #10 | |
| Lives for gear Joined: Jun 2009
Posts: 3,397
| Quote:
Increasing bit depth does not increase dynamic resolution, just dynamic range. Similarly, increasing sample rate will not increase frequency resolution, just frequency bandwidth. | |
| | |
| | #11 |
| Lives for gear Joined: Jun 2009
Posts: 3,397
| I thought going to 24 bits from 16 bits just adds the extra 8 bits to the bottom with the top 16 bits unchanged?
|
| | |
| | #12 |
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| But in your other thread you said that authorities such as books are not to be trusted. ![]() Dood, 44.1 KHz is indeed perfect sound forever. In the research described HERE it was proven beyond doubt that nobody can hear a difference after hi-res audio was "downgraded" to 44.1 KHz at 16 bits. So this one research project disproves both of your current threads. ![]() --Ethan |
| | |
| | #13 | |
| Lives for gear Joined: Jun 2009
Posts: 3,397
| Quote:
Doesn't mean MP3 is "perfect sound forever". | |
| | |
| | #14 | |
| Lives for gear Joined: Mar 2006 Location: Austin, Texas
Posts: 1,960
Verified Member | Quote:
Moorer's comment about the microsecond timing between L/R I hadn't thought of. I think the important step for us audio professionals is that we work at high resolution when we can, allowing for the best processing, and "deliver" at the needed format of 16-bit 44.1Hz or 48k for the final destination. JT p.s. I still love my collection of DVD-A and SACD.
__________________ Terra Nova Mastering Celebrating 21 years of Mastering! Using analog, digital, tape, tubes, transformers, plug-ins, hardware, etc... whatever best serves the project. | |
| | |
| | #15 | |
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| Quote:
--Ethan | |
| | |
| | #16 |
| 3 + infractions, forum membership suspended. Joined: Apr 2009 Location: NYC
Posts: 457
|
same old friggin' stupid debates: "OMG, i can hear a huge difference between 44.1 and 48kHz....or... i can hear better than u caus I hear the diff between 192kHz and 96K" Sick of all these idiotic ideas Ya.... and for the newbs out there talkin sh*t abot mp3, even at 44.1/16 bit the mp3 is a compressed format which can be more or less heard only if u have state of the art speakers which i doubt most of uu's own!
|
| | |
| | #17 | |
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| Quote:
--Ethan | |
| | |
| | #18 |
| Gear addict Joined: Dec 2007
Posts: 317
|
Ethan (not to push you more towards the 7000 marker unnecessarily) you are saying that there is nothing to gain from using 24/44.1 over 16/44.1? And that using values above that is even more silly? I would very much like a somewhat.. ehh.. kinda 'conclusive' answer to that since I lost track of up and down in this debate a long time ago. For the time being I work in 24/88.2 and think I'm clever. - I would love to know if I'm not and why so? |
| | |
| | #19 |
| 3 + infractions, forum membership suspended. Joined: Apr 2009 Location: NYC
Posts: 457
|
i don't think this about depth...i do believe that constantly processing at 16 bit does have at some point a subtle if not audible effect on the data.. that's why processing at 24 bit, mixing or mastering, should always be the norm. that said, i don' think Ethan was talking in this context,..
|
| | |
| | #20 | ||
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| Wow, I missed the entirely. Woo hoo, here comes 7,000! ![]() Quote:
Quote:
![]() --Ethan | ||
| | |
| | #21 | |
| Gear addict Joined: Oct 2006 Location: Minneapolis
Posts: 325
| Quote:
Not only is this incorrect, this is pretty much opposite of reality. A D/A converter filters the content above the Nyquist frequency to PREVENT such aliasing. A square wave consists of a fundamental with an infinite number of harmonics above that. The only component a 44.1Khz sampling system could capture would be the sine-wave fundamental at 22.05Khz. So, if you shove a 22.05Khz sine wave into a 44.1Khz system, you get a 22.05khz sine wave back out of the D/A. Even if you shove a 22.05Khz square wave into a 44.1Khz system, you STILL get a 22.05Khz sine wave back out of the D/A.
__________________ Michael Sandstedt | |
| | |
| | #22 | |
| 3 + infractions, forum membership suspended. Joined: Oct 2008
Posts: 1,978
| Quote:
square wave is just sine wave with sine odd harmonics. triangle is just a sine wave with sine even harmonics. but.... things get worse! harmonic cancelations becouse the wordclock jitter, pitch problems becouse the wordclock drift. digital cable not transparent enough, effecting the clock and digital signal, creating more jitter & more distortions. higher sample rates need more accurate clock, less jitter. or the aperture errors ocurr. dirty AC power affects Xtal clocks, creating more jitter. harmonics have alias. the anti-alias filters affect the converter sound. harmonics foldback at the nyquist frequency 44.1khz, creating a brighter sound than x2 or x4 sample rates. sampling errors becouse of the jitter. jitter & clock drift becomes accumulative; AD + DA jitter & clock drift. also has drift and jitter problems with midi. etc... | |
| | |
| | #23 |
| Gear addict Joined: Dec 2007
Posts: 317
|
Ethan - Thank you for clarifying.
|
| | |
| | #24 |
| Lives for gear Joined: Dec 2005 Location: Toronto
Posts: 1,421
|
16 bit 44.1 = acceptable format for depth and sound image for delivery to customers , BIG plus.... format is accepted WORLDWIDE 24- 44.1 / 88.2 = ideally best scenerio... downside.... on a large scale have to convince people is worth the exchange of their CDs players for something else...that means replacing their car CD home CD etc. with a DVD-A capable system.
__________________ _____________________________________________ Jay McGill Suffering from one of Lifes greatest atrocities..and one of its greatest triumphs ~ Self Education |
| | |
| | #25 | |
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| Quote:
--Ethan | |
| | |
| | #26 |
| Gear maniac | You could always start from where it all began: http://www.loe.ee.upatras.gr/Comes/Notes/Nyquist.pdf
__________________ Take care. -Loren Nerell |
| | |
| | #27 | |
| Lives for gear Joined: Aug 2005 Location: Norway
Posts: 1,741
Verified Member | Quote:
And repeat it again: "for most pop music anyway". ![]() (for those who don't know: this is an old topic with plenty enough blindtesting to prove 24 bits to be worth it. it may be hard to blind test but it's far from impossible) | |
| | |
| | #28 | |||||
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| Quote:
Quote:
Quote:
Quote:
Quote:
![]() --Ethan | |||||
| | |
| | #29 | ||
| Lives for gear Joined: May 2008 Location: Karlsruhe, Germany
Posts: 2,747
Verified Member | Quote:
Quote:
| ||
| | |
| | #30 | ||
| Gear Guru Joined: Oct 2002 Location: New Milford, CT, USA
Posts: 12,334
| Quote:
![]() Quote:
As always, my real objection is when people say that 24 bits is "hugely better" than 16 bits, or that using more bits increases bass fullness and spaciousness etc. That is simply not true. Further, the reason some newbie's mix sucks is never ever due to using "only" 16 bits. Also, this is the 44.1 KHz thread, not the 16 bit thread. ![]() --Ethan | ||
| | |
New Reply
Facebook
Twitter
LinkedIn
| Thread Tools | Search this Thread |
| Similar Threads | ||||
| Thread | Thread starter | Forum | Replies | Last Post |
| need 24 bit, 44.1khz converter- little help? | eor | So much gear, so little time! | 7 | 7th May 2008 06:57 PM |
| How to go from 24bit 48khz to 16bit 44.1khz??? | eric maltz | Mastering forum | 11 | 1st April 2008 07:20 PM |
| 96kHz or 44.1kHz for recording? | terryko | Electronic Music Instruments & Electronic Music Production | 33 | 23rd March 2008 11:05 PM |
| To record at 44.1kHz or 88.2kHz ? | Alex Wyler | So much gear, so little time! | 21 | 11th May 2007 08:05 PM |
| Long live 44.1khz! | Dewtch | So much gear, so little time! | 22 | 29th January 2006 10:52 AM |
| |