16 Replies Latest reply: Apr 14, 2014 1:46 AM by SteveG(AudioMasters) RSS

    Sample rates do not match

    JSGoud Community Member

      Hi.

      I am trying to generate a sweep waveform with 48KHz sampling frequency. However, I see that the lower frequencies have a 48KHz sampling frequencies but the higher frequencies have a bad sampling frequencies.

      Can someone tell me how to generate tones with the same sampling frequencies?

       

      It is the same issue with higher frequencies even if the waveform is single frequency (example 9khz waveform cannot be generated at 48khz freq). I am using a trial version Adobe Audition CC Build 732 (64 bit)

        • 1. Re: Sample rates do not match
          Bob Howes MVP

          When you say "sampling frequency" do you actually mean the sample rate is varying (a fault I've never heard of before) or that the frequency you're generating doesn't remain constant?

           

          If it's the latter, the solution is probably simple.

           

          On the Effect/Generate Tones screen, the default is to generate a frequency sweep so the frequency you enter is only the starting point and it sweeps to a different frequency as preset.  There are start point and end point tabs at the top of the Generate Tones control panel--just set the two ends to what you want.

           

          If you want a single frequency, there's tick box at the top left hand side of the Generate Tones control panel.  Just untick the Sweep Frequencies option.

           

          I've just generated a single 9kHz tone and then a sweep from 1 kHz to 10 kHz and both were fine as measure in the Audition frequency window.

           

          If your sample rate really is varying, I think we're going to need a lot more info about the hardware you're using (computer and audio interface) and the steps you're taking to generate the tones (and also how you're determining that your sample rate is varying).

          • 2. Re: Sample rates do not match
            JSGoud Community Member

            Hi Bob,

            I compared the number of samples in 1KHz sine wave with the number of samples of 9KHz sine wave, 16KHz sine wave FOR THE SAME DURATION and found that the samples differ. Hence the query.

            • 3. Re: Sample rates do not match
              JSGoud Community Member

              >> When you say "sampling frequency" do you actually mean the sample rate is varying

              yes. I mean the sampling rate is varying.

              • 4. Re: Sample rates do not match
                SteveG(AudioMasters) Community Member

                JSGoud wrote:

                 

                I compared the number of samples in 1KHz sine wave with the number of samples of 9KHz sine wave, 16KHz sine wave FOR THE SAME DURATION and found that the samples differ. Hence the query.

                Of course they do! The sample rate is fixed, and up to the Nyquist frequency (half of the sample rate) all frequencies can be represented accurately - whatever you think by looking at the results.

                 

                You need to study this carefully:

                 

                • 5. Re: Sample rates do not match
                  ryclark Community Member

                  Can you quote the number of samples that you measured to compare your 1kHz, 9kHz and 16kHz of identical duration? It might help us shine some light on to the origin of your problem.

                  • 6. Re: Sample rates do not match
                    Bob Howes MVP

                    As per my previous, I'm curious about how the OP is determining what he describes as the "sampling frequency".

                     

                    Short of selecting exactly one second of the clip and manually counting up to 48,000 dots I'm not sure where he's getting his information.

                    • 7. Re: Sample rates do not match
                      SteveG(AudioMasters) Community Member

                      Everything he's written (especially the bit I quoted) indicates a fundamental misunderstanding of how sampling works - hence the link to the (excellent) video. Bob, he only has to select one cycle of his file at each frequency to establish that the number of sample positions is different - he doesn't have to count a second of them!

                      • 8. Re: Sample rates do not match
                        JSGoud Community Member

                        Greetings.

                        I take a 1 mS period at 48KHz sampling rate of a 1 KHz sine wave. I see 48 samples.

                        Then I take the same 1 mS period for a 9KHz signal and see 42 samples. similarly for 18 KHZ - 36 samples. For 16 KHz it is 48 samples

                        • 9. Re: Sample rates do not match
                          JSGoud Community Member

                          Steve, Thank you. The video is really very helpful especially from 3:42. However, I still am curious about this- I take a 1 mS period at 48KHz sampling rate of a 1 KHz sine wave. I see 48 samples.

                          Then I take the same 1 mS period for a 9KHz signal and see 42 samples.

                          • 10. Re: Sample rates do not match
                            SteveG(AudioMasters) Community Member

                            Either you can't count , or as I strongly suspect, you managed to set the sample rate for the 9kHz tone to 44.1k (and still can't quite count...). I just tried this myself in CC to make sure that it was working as it should be, and it's fine. Yes, I even counted the samples, despite the fact that you don't have to:

                             

                            Generate tone @ 48k. Set the time line to display samples, and generate whatever tone you like. Highlight the first 48 samples, and then switch the time display to be decimal time, and you will find that it's sitting on 1ms, as it should be.

                            • 11. Re: Sample rates do not match
                              Bob Howes MVP

                              I just did Steve's test (gee, I must be bored) except I did a 1k to 16k sweep and did the measurement near the beginning, in the middle and near the end.  1 got 1ms for each test as expected.

                              • 12. Re: Sample rates do not match
                                JSGoud Community Member

                                Thank you all for the support. I can count . If both of have seen it, i better check it on another system or use another version to check the samples. Thank you all. Bye

                                • 13. Re: Sample rates do not match
                                  Bob Howes MVP

                                  I had an overnight thought (no, I don't ALWAYS dream about Audition, but...) and am curious about something that maybe Steve can answer.

                                   

                                  When recording an external source, is Audition dependent (as I'm guessing) on the Wordclock in whatever audio interface is in use, either externa or just the computer sound card?

                                   

                                  And, if so, what about things internal to Audition like, in this case, Generate Tones?

                                   

                                  My thought is that, if the computer sound card is involved, it's entirely within the realms of possibility that the Wordclock there is drifting.  A litte bit of drift is commonplace (as anyone who's tried to sync computer and camera recordings done without timecode will know) so, given the appalling quality of the internal sound devices on most computers, I can quite believe that there could be larger fluctuations in the Wordclock.

                                  • 14. Re: Sample rates do not match
                                    SteveG(AudioMasters) Community Member

                                    Generate Tones uses an entirely internal timing system, and effectively isn't influenced by any clocks at all. But even if you assumed that an internal clock drifted, it wouldn't account for anything like these apparent discrepancies. As an example, consider a 48k clock with a 2% error - which is way worse than you'd ever find these days. If you counted the number of samples over a millisecond, that would, unless you were extremely unlucky, still give you 48, because a 2% error is only 0.96 of a sample over that period.

                                     

                                    But, if you opened up this recording in Audition as 48k, it would display it just the same as internally generated tone - so you'd get 48 samples anyway. What would be wrong when you played back the file (using an accurate sample reference for the playback) would be the pitch of your recording, and if it was a good drift, you could even end up with wow and flutter!

                                     

                                    The answer to the question about recording external sources though is that it depends... If you have a S/PDIF input, it will use the clock from that (or you get a huge glitch when the sample rates drift to a one sample error). Same thing happens with a USB mic - the sync has to be established from the A-D clock source in the mic, and with a cheap example, that could be even worse than a computer-generated clock. So, it's only non-digital devices connected to the on-board sound device that are subjected to the vagiaries of the internal clock.

                                     

                                    And yes, it's because I've considered this in some depth that I'm just a little sceptical about what's happening with the OP, if you see what I mean...

                                    • 15. Re: Sample rates do not match
                                      JSGoud Community Member

                                      Seeve, Bob,

                                      When I generate any waveform in Adobe, I use some other software (audacity etc) to authenticate the correctness of the generated waveform. In the case of 9K and 18K, the sampling point matched exactly at the 0 cross over and was not visible in Audacity.

                                      It is my fault. I apologise for creating this un-necessary flutter!!

                                      • 16. Re: Sample rates do not match
                                        SteveG(AudioMasters) Community Member

                                        JSGoud wrote:

                                         

                                        Seeve, Bob,

                                        When I generate any waveform in Adobe, I use some other software (audacity etc) to authenticate the correctness of the generated waveform. In the case of 9K and 18K, the sampling point matched exactly at the 0 cross over and was not visible in Audacity.

                                        I do find it faintly amusing that you are using a piece of free junkware with at best, flaky stability to 'authenticate' something created in Audition!